Package com.illumon.iris.importers.util
Class JdbcImport.Builder
java.lang.Object
com.illumon.iris.importers.util.ImportBuilder<JdbcImport.Builder,JdbcImport>
com.illumon.iris.importers.util.JdbcImport.Builder
- All Implemented Interfaces:
JdbcImportBuilder
- Enclosing class:
- JdbcImport
public static class JdbcImport.Builder extends ImportBuilder<JdbcImport.Builder,JdbcImport> implements JdbcImportBuilder
The Builder class allows setting properties for a JDBC import and provides a
build()
method which returns a JdbcImport object that will use the configured properties to import batch data.-
Field Summary
Fields inherited from class com.illumon.iris.importers.util.ImportBuilder
destinationDirectory, destinationPartitions, namespace, outputMode, partitionColumn, schemaService, sourceName, strict, table
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description JdbcImport
build()
Creates a JdbcImport object using the properties that have been set in theJdbcImport.Builder
.protected JdbcImport.Builder
getThis()
Returns this builder.JdbcImport.Builder
setConnectionUrl(String connectionUrl)
Sets a String of the URL to use when connecting to the JDBC data source.JdbcImport.Builder
setDriver(String driver)
Sets a String of the driver to use when connecting to the JDBC data source.JdbcImport.Builder
setPassword(String password)
Sets a String of the password to use when connecting to the JDBC data source.JdbcImport.Builder
setQuery(String query)
Sets a String of the query to execute against the JDBC data source.JdbcImport.Builder
setSourceTimeZone(String sourceTimeZoneID)
Sets the time zone to use when interpreting date/time values from the source.JdbcImport.Builder
setSourceTimeZone(TimeZone sourceTimeZone)
Sets the time zone to use when interpreting date/time values from the source.JdbcImport.Builder
setUser(String user)
Sets a String of the user name to use when connecting to the JDBC data source.Methods inherited from class com.illumon.iris.importers.util.ImportBuilder
setDestinationDirectory, setDestinationPartitions, setDestinationPartitions, setOutputMode, setOutputMode, setPartitionColumn, setSchemaService, setSourceName, setStrict
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.illumon.iris.importers.util.JdbcImportBuilder
setDestinationDirectory, setDestinationPartitions, setDestinationPartitions, setOutputMode, setOutputMode, setPartitionColumn, setSourceName, setStrict
-
Constructor Details
-
Builder
Creates the JdbcImportBuilder object. Normally accessed throughJdbcImport.builder(String, String)
.- Parameters:
namespace
- The String name of the namespace into which data will be imported.table
- The String name of the table into which data will be imported.
-
-
Method Details
-
setDriver
Sets a String of the driver to use when connecting to the JDBC data source.- Specified by:
setDriver
in interfaceJdbcImportBuilder
- Parameters:
driver
- A String of the fully-qualified class name of the JDBC driver.- Returns:
- this builder.
-
setConnectionUrl
Sets a String of the URL to use when connecting to the JDBC data source.- Specified by:
setConnectionUrl
in interfaceJdbcImportBuilder
- Parameters:
connectionUrl
- A String of the connection URL as specified by the particular driver.- Returns:
- this builder.
-
setUser
Sets a String of the user name to use when connecting to the JDBC data source.- Specified by:
setUser
in interfaceJdbcImportBuilder
- Parameters:
user
- A String of the user name.- Returns:
- this builder.
-
setPassword
Sets a String of the password to use when connecting to the JDBC data source.- Specified by:
setPassword
in interfaceJdbcImportBuilder
- Parameters:
password
- A String of the password.- Returns:
- this builder.
-
setQuery
Sets a String of the query to execute against the JDBC data source.- Specified by:
setQuery
in interfaceJdbcImportBuilder
- Parameters:
query
- A String of the query formatted per the JDBC and JDBC driver requirements.- Returns:
- this builder.
-
setSourceTimeZone
Sets the time zone to use when interpreting date/time values from the source.- Specified by:
setSourceTimeZone
in interfaceJdbcImportBuilder
- Parameters:
sourceTimeZone
- ATimeZone
to use as the reference time zone.- Returns:
- this builder.
-
setSourceTimeZone
Sets the time zone to use when interpreting date/time values from the source.- Specified by:
setSourceTimeZone
in interfaceJdbcImportBuilder
- Parameters:
sourceTimeZoneID
- A String of a time zone to be passed toTimeZone.getTimeZone(String)
to use as the reference time zone.- Returns:
- this builder.
-
getThis
Description copied from class:ImportBuilder
Returns this builder. Concrete subclasses mus provide "this" so that the setters can chain properly.- Specified by:
getThis
in classImportBuilder<JdbcImport.Builder,JdbcImport>
- Returns:
- this builder.
-
build
Creates a JdbcImport object using the properties that have been set in theJdbcImport.Builder
.- Specified by:
build
in interfaceJdbcImportBuilder
- Specified by:
build
in classImportBuilder<JdbcImport.Builder,JdbcImport>
- Returns:
- A
JdbcImport
object.
-