deephaven.ImportTools.JdbcImport

Tools for programmatically executing JDBC batch imports.

class JdbcImportBuilder(*args, **kwargs)
build()

Creates a JdbcImport object using the properties that have been set in the JdbcImport.Builder.

Returns

(com.illumon.iris.importers.util.JdbcImport) A JdbcImport object.

property builder

The java builder object.

setConnectionUrl(connectionUrl)

Sets a String of the URL to use when connecting to the JDBC data source.

Parameters

connectionUrl – java.lang.String

Returns

(com.illumon.iris.importers.util.JdbcImport.Builder) this builder.

setDestinationDirectory(destinationDirectory)

Sets the destination directory.

Parameters

destinationDirectory – (java.io.File) - destination directory.

Returns

(ImportBuilder.T) this builder.

setDestinationPartitions(destinationPartitions)

Sets the destination partitions

Overload 1
param destinationPartitions

(java.lang.String) - destination partitions.

return

(ImportBuilder.T) this builder.

Overload 2
param destinationPartitions

(java.lang.String[]) - destination partitions.

return

(ImportBuilder.T) this builder.

setDriver(driver)

Sets a String of the driver to use when connecting to the JDBC data source.

Parameters

driver – java.lang.String

Returns

(com.illumon.iris.importers.util.JdbcImport.Builder) this builder.

setOutputMode(outputMode)

Sets the output mode.

Overload 1
param outputMode

(com.illumon.iris.importers.ImportOutputMode) - output mode.

return

(ImportBuilder.T) this builder.

Overload 2
param outputMode

(java.lang.String) - output mode.

return

(ImportBuilder.T) this builder.

setPartitionColumn(partitionColumn)

Sets the partition column.

Parameters

partitionColumn – (java.lang.String) - partition column.

Returns

(ImportBuilder.T) this builder.

setPassword(password)

Sets a String of the password to use when connecting to the JDBC data source.

Parameters

password – java.lang.String

Returns

(com.illumon.iris.importers.util.JdbcImport.Builder) this builder.

setQuery(query)

Sets a String of the query to execute against the JDBC data source.

Parameters

query – java.lang.String

Returns

(com.illumon.iris.importers.util.JdbcImport.Builder) this builder.

setSchemaService(schemaService)

Sets the schema service.

Parameters

schemaService – (com.illumon.iris.db.schema.SchemaService) - schema service.

Returns

(ImportBuilder.T) this builder.

setSourceName(sourceName)

Sets the source name.

Parameters

sourceName – (java.lang.String) - source name.

Returns

(ImportBuilder.T) this builder.

setSourceTimeZone(*args)

Sets the time zone to use when interpreting date/time values from the source.

Overload 1
param sourceTimeZone

java.util.TimeZone

return

(com.illumon.iris.importers.util.JdbcImport.Builder) this builder.

Overload 2
param sourceTimeZoneID

java.lang.String

return

(com.illumon.iris.importers.util.JdbcImport.Builder) this builder.

setStrict(strict)

Sets strict checking.

Parameters

strict – (boolean) - strict.

Returns

(ImportBuilder.T) this builder.

setUser(user)

Sets a String of the user name to use when connecting to the JDBC data source.

Parameters

user – java.lang.String

Returns

(com.illumon.iris.importers.util.JdbcImport.Builder) this builder.

builder(namespace, table)
Creates a new JdbcImportBuilder object. Method calls on this object can then be used to configure

the import and run it.

Parameters
  • namespace – (java.lang.String) - The String name of the namespace into which data will be imported.

  • table – (java.lang.String) - The String name of the table into which data will be imported.

Returns

(com.illumon.iris.importers.util.JdbcImportBuilder) A new JdbcImportBuilder object.

getServerTimeZone(driver, connectionUrl, user, password)

Utility method to retrieve database server timezone. Used by default for interpreting dates and times on import.

Parameters
  • driver – (java.lang.String) - A String of the fully qualified class name of the JDBC driver to use.

  • connectionUrl – (java.lang.String) - A String connection URL whose formatting is specified by the driver being used.

  • user – java.lang.String

  • password – java.lang.String

Returns

(java.util.TimeZone) A TimeZone