Class JdbcReadOptions.Builder
- java.lang.Object
-
- org.apache.flink.connector.jdbc.internal.options.JdbcReadOptions.Builder
-
- Enclosing class:
- JdbcReadOptions
public static class JdbcReadOptions.Builder extends Object
Builder ofJdbcReadOptions.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanautoCommitprotected intfetchSizeprotected IntegernumPartitionsprotected StringpartitionColumnNameprotected LongpartitionLowerBoundprotected LongpartitionUpperBoundprotected Stringquery
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JdbcReadOptionsbuild()JdbcReadOptions.BuildersetAutoCommit(boolean autoCommit)optional, whether to set auto commit on the JDBC driver.JdbcReadOptions.BuildersetFetchSize(int fetchSize)optional, the number of rows to fetch per round trip.JdbcReadOptions.BuildersetNumPartitions(int numPartitions)optional, the maximum number of partitions that can be used for parallelism in table reading.JdbcReadOptions.BuildersetPartitionColumnName(String partitionColumnName)optional, name of the column used for partitioning the input.JdbcReadOptions.BuildersetPartitionLowerBound(long partitionLowerBound)optional, the smallest value of the first partition.JdbcReadOptions.BuildersetPartitionUpperBound(long partitionUpperBound)optional, the largest value of the last partition.JdbcReadOptions.BuildersetQuery(String query)optional, SQL query statement for this JDBC source.
-
-
-
Field Detail
-
query
protected String query
-
partitionColumnName
protected String partitionColumnName
-
partitionLowerBound
protected Long partitionLowerBound
-
partitionUpperBound
protected Long partitionUpperBound
-
numPartitions
protected Integer numPartitions
-
fetchSize
protected int fetchSize
-
autoCommit
protected boolean autoCommit
-
-
Method Detail
-
setQuery
public JdbcReadOptions.Builder setQuery(String query)
optional, SQL query statement for this JDBC source.
-
setPartitionColumnName
public JdbcReadOptions.Builder setPartitionColumnName(String partitionColumnName)
optional, name of the column used for partitioning the input.
-
setPartitionLowerBound
public JdbcReadOptions.Builder setPartitionLowerBound(long partitionLowerBound)
optional, the smallest value of the first partition.
-
setPartitionUpperBound
public JdbcReadOptions.Builder setPartitionUpperBound(long partitionUpperBound)
optional, the largest value of the last partition.
-
setNumPartitions
public JdbcReadOptions.Builder setNumPartitions(int numPartitions)
optional, the maximum number of partitions that can be used for parallelism in table reading.
-
setFetchSize
public JdbcReadOptions.Builder setFetchSize(int fetchSize)
optional, the number of rows to fetch per round trip. default value is 0, according to the jdbc api, 0 means that fetchSize hint will be ignored.
-
setAutoCommit
public JdbcReadOptions.Builder setAutoCommit(boolean autoCommit)
optional, whether to set auto commit on the JDBC driver.
-
build
public JdbcReadOptions build()
-
-