Package io.deephaven.importers
Interface JdbcSchemaCreator.Builder
- Enclosing class:
- JdbcSchemaCreator
public static interface JdbcSchemaCreator.Builder
A Builder object for
ImmutableJdbcSchemaCreator-
Method Summary
Modifier and TypeMethodDescriptionarrayDelimiter(String arrayDelimiter) The array delimiter to be added to the import source.assessmentMethod(JdbcSchemaCreator.AssessmentMethod assessmentMethod) The {JdbcSchemaCreator.AssessmentMethodto use when inferring the schema.bestFit(boolean bestFit) Whether to try to use smaller types like int and float, or to use bigger types, like long and double.build()Build theJdbcSchemaCreatorcasingStyle(CasingStyle casingStyle) TheCasingStyleto use when generating column names.connectionUrl(String connectionUrl) The connection URL.groupingColumn(String groupingColumn) The grouping column for the table.importStyle(ImportStyle importStyle) TheImportStyle.jdbcDriver(String jdbcDriver) The JDBC driver name.logFormat(int logFormat) The log format to use for loggers.TheLogger.maxError(int maxError) Maximum allowed errors to be added to the schema'sImportSourceas amaxErrorattribute.The namespace for the table.outPackage(String outPackage) The package name for loggers and listeners.outputMode(SchemaCreatorUtils.OutputMode outputMode) TheSchemaCreatorUtils.OutputModeto use.partitionColumn(String partitionColumn) The partition column for the table.The password.replacement(String replacement) String to use for replacements of space or hyphen in source column names.An optionalResultSetinstead of JDBC connection details.schemaPath(String schemaPath) The output path for the schema.sourceName(String sourceName) The import source name.sourcePartitionColumn(String sourcePartitionColumn) The column name in the source data to use for multi-partition imports.The SQL query to execute.The table name for the table.useNanos(boolean useNanos) Whether to try to use nanos for time calculations.The username.
-
Method Details
-
logger
TheLogger.- Parameters:
logger- the logger- Returns:
- this
JdbcSchemaCreator.Builder
-
namespace
The namespace for the table. This is added to the schema in thenamespaceattribute of theTableelement.- Parameters:
namespace- the namespace- Returns:
- this
JdbcSchemaCreator.Builder
-
tableName
The table name for the table. This is added to the schema in thenameattribute of theTableelement.- Parameters:
tableName- the table name- Returns:
- this
JdbcSchemaCreator.Builder
-
groupingColumn
The grouping column for the table. This is added to the schema by addingcolumnType="Grouping"to the specified column's definition.- Parameters:
groupingColumn- the grouping column- Returns:
- this
JdbcSchemaCreator.Builder
-
partitionColumn
The partition column for the table. This is added to the schema by addingcolumnType="Partitioning"to the specified column's definition.- Parameters:
partitionColumn- the partitioning column- Returns:
- this
JdbcSchemaCreator.Builder
-
sourceName
The import source name. This defines the schema'sImportSourcename attribute.- Parameters:
sourceName- the import source name- Returns:
- this
JdbcSchemaCreator.Builder
-
jdbcDriver
The JDBC driver name.- Parameters:
jdbcDriver- the JDBC driver name- Returns:
- this
JdbcSchemaCreator.Builder
-
connectionUrl
The connection URL.- Parameters:
connectionUrl- the connection URL- Returns:
- this
JdbcSchemaCreator.Builder
-
user
The username. If not provided, then theconnectionUrl(java.lang.String)must contain everything needed to connect.- Parameters:
user- the username- Returns:
- this
JdbcSchemaCreator.Builder
-
password
The password. If not provided, then theconnectionUrl(java.lang.String)must contain everything needed to connect.- Parameters:
password- the password- Returns:
- this
JdbcSchemaCreator.Builder
-
sqlQuery
The SQL query to execute.- Parameters:
sqlQuery- the SQL query to execute- Returns:
- this
JdbcSchemaCreator.Builder
-
schemaPath
The output path for the schema.- Parameters:
schemaPath- the output path- Returns:
- this
JdbcSchemaCreator.Builder
-
assessmentMethod
The {JdbcSchemaCreator.AssessmentMethodto use when inferring the schema. The default isJdbcSchemaCreator.AssessmentMethod.META_ONLY.- Parameters:
assessmentMethod- the assessment method to use- Returns:
- this
JdbcSchemaCreator.Builder
-
sourcePartitionColumn
The column name in the source data to use for multi-partition imports.- Parameters:
sourcePartitionColumn- the column name- Returns:
- this
JdbcSchemaCreator.Builder
-
importStyle
TheImportStyle. Default isImportStyle.BATCH.- Parameters:
importStyle- the import style- Returns:
- this
JdbcSchemaCreator.Builder
-
outPackage
The package name for loggers and listeners. Required if generating loggers and listeners.- Parameters:
outPackage- the package name- Returns:
- this
JdbcSchemaCreator.Builder
-
bestFit
Whether to try to use smaller types like int and float, or to use bigger types, like long and double. Iftruethen try to use smaller types. Default is false.- Parameters:
bestFit- if true, use best-fit parsing to determine column types- Returns:
- this
JdbcSchemaCreator.Builder
-
casingStyle
TheCasingStyleto use when generating column names. Default isCasingStyle.None.- Parameters:
casingStyle- the casing style- Returns:
- this
JdbcSchemaCreator.Builder
-
outputMode
TheSchemaCreatorUtils.OutputModeto use. Default isSchemaCreatorUtils.OutputMode.SAFE.- Parameters:
outputMode- the output mode- Returns:
- this
JdbcSchemaCreator.Builder
-
replacement
String to use for replacements of space or hyphen in source column names. Default is_.- Parameters:
replacement- the replacement String- Returns:
- this
JdbcSchemaCreator.Builder
-
arrayDelimiter
The array delimiter to be added to the import source. Default is,.- Parameters:
arrayDelimiter- the array delimiter- Returns:
- this
JdbcSchemaCreator.Builder
-
logFormat
The log format to use for loggers. Default is 1.- Parameters:
logFormat- the log format- Returns:
- this
JdbcSchemaCreator.Builder
-
maxError
Maximum allowed errors to be added to the schema'sImportSourceas amaxErrorattribute. Default is 0, meaning the property isn't added to the schema.- Parameters:
maxError- the maximum allowed errors- Returns:
- this
JdbcSchemaCreator.Builder
-
useNanos
Whether to try to use nanos for time calculations. Default is false.- Parameters:
useNanos- if true, use nanos for time calculations- Returns:
- this
JdbcSchemaCreator.Builder
-
resultSet
An optionalResultSetinstead of JDBC connection details. If this is used then no JDBC connection details should be provided.- Parameters:
resultSet- theResultSet- Returns:
- this
JdbcSchemaCreator.Builder
-
build
JdbcSchemaCreator build()Build theJdbcSchemaCreator- Returns:
- the built
JdbcSchemaCreator
-