Class JdbcToTableAdapter.ReadJdbcOptions

java.lang.Object
io.deephaven.jdbc.JdbcToTableAdapter.ReadJdbcOptions
Enclosing class:
JdbcToTableAdapter

public static class JdbcToTableAdapter.ReadJdbcOptions extends Object
Options applicable when reading JDBC data into a Deephaven in-memory table. Designed to constructed in a "fluent" manner, with defaults applied if not specified by the user.
  • Method Details

    • columnNameFormat

      public JdbcToTableAdapter.ReadJdbcOptions columnNameFormat(JdbcToTableAdapter.CasingStyle casingStyle, @NotNull @NotNull String replacement)
      An option that will convert source JDBC column names to an alternate style using the CasingStyle class. The default is to pass through column names as-is with a minimum of normalization. The source columns must consistently match the expected source format for the to function appropriately. See JdbcToTableAdapter.CasingStyle for more details.
      Parameters:
      casingStyle - if not null, CasingStyle to apply to column names - None or null = no change to casing
      replacement - character, or empty String, to use for replacements of space or hyphen in source column names
      Returns:
      customized options object
    • maxRows

      public JdbcToTableAdapter.ReadJdbcOptions maxRows(int maxRows)
      Maximum number of rows to read, defaults to no limit. A number less than zero means no limit. This is useful to read just a sample of a given query into memory, although depending on the JDBC driver used, it may be more efficient to apply a "LIMIT" operation in the query itself.
      Parameters:
      maxRows - maximum number of rows to read
      Returns:
      customized options object
    • strict

      public JdbcToTableAdapter.ReadJdbcOptions strict(boolean strict)
      Whether to apply strict mode when mapping from JDBC to Deephaven; for example throwing an exception if an out-of-range value is encountered instead of truncating. Defaults to true.
      Parameters:
      strict - use strict mode
      Returns:
      customized options object
    • sourceTimeZone

      public JdbcToTableAdapter.ReadJdbcOptions sourceTimeZone(@NotNull @NotNull TimeZone sourceTimeZone)
      Specify the timezone to use when interpreting date-time/timestamp JDBC values. Defaults to the server time-zone, if discoverable. Otherwise, defaults to the local time zone.
      Parameters:
      sourceTimeZone - the source time zone
      Returns:
      customized options object
    • arrayDelimiter

      public JdbcToTableAdapter.ReadJdbcOptions arrayDelimiter(@NotNull @NotNull String arrayDelimiter)
      Specify the delimiter to expect when mapping JDBC String columns to Deephaven arrays. Defaults to ",".
      Parameters:
      arrayDelimiter - the delimiter
      Returns:
      customized options object
    • columnTargetType

      public JdbcToTableAdapter.ReadJdbcOptions columnTargetType(@NotNull @NotNull String columnName, @NotNull @NotNull Class<?> targetType)
      Specify the target type for the given column. For columns with multiple possible type mappings, this permits the user to specify which Deephaven type should be used. Any columns for which a type is not specified will receive the default type mapping.
      Parameters:
      columnName - the column name
      targetType - the desired Deephaven column type
      Returns:
      customized options object