Packages

final case class JdbcShardedReadOptions[T, S](connectionOptions: JdbcConnectionOptions, tableName: String, shardColumn: String, shard: Shard[S], rowMapper: (ResultSet) => T, fetchSize: Int = JdbcShardedReadOptions.DefaultFetchSize, numShards: Int = JdbcShardedReadOptions.DefaultNumShards) extends Product with Serializable

A bag of options for the JDBC sharded read.

connectionOptions

Connection options

tableName

Name of a table or materialized view to read from

shardColumn

Column to shard by. Should ideally have evenly distributed values. Column type must have a corresponding com.spotify.scio.jdbc.sharded.Shard implementation.

shard

An implementation of the com.spotify.scio.jdbc.sharded.Shard trait which knows how to shard a column of a type S. Example of sharding by a column of type Long:

sc.jdbcShardedSelect(getShardedReadOptions(opts), Shard.range[Long])
rowMapper

Function to map from a SQL java.sql.ResultSet to T

fetchSize

Amount of rows fetched per java.sql.ResultSet. Default value is 100000. To apply an unbounded fetch size set this parameter to -1

numShards

Number of shards to split the table into for reading. There is no guarantee that Beam will actually execute reads in parallel. It is up to Beam auto scaler to decide the level of parallelism to use (number of workers and threads per worker). But the behavior could be controlled with maxNumWorkers and numberOfWorkerHarnessThreads parameters (see more details about these parameters here). Defaults to 4

Source
JdbcShardedReadOptions.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JdbcShardedReadOptions
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new JdbcShardedReadOptions(connectionOptions: JdbcConnectionOptions, tableName: String, shardColumn: String, shard: Shard[S], rowMapper: (ResultSet) => T, fetchSize: Int = JdbcShardedReadOptions.DefaultFetchSize, numShards: Int = JdbcShardedReadOptions.DefaultNumShards)

    connectionOptions

    Connection options

    tableName

    Name of a table or materialized view to read from

    shardColumn

    Column to shard by. Should ideally have evenly distributed values. Column type must have a corresponding com.spotify.scio.jdbc.sharded.Shard implementation.

    shard

    An implementation of the com.spotify.scio.jdbc.sharded.Shard trait which knows how to shard a column of a type S. Example of sharding by a column of type Long:

    sc.jdbcShardedSelect(getShardedReadOptions(opts), Shard.range[Long])
    rowMapper

    Function to map from a SQL java.sql.ResultSet to T

    fetchSize

    Amount of rows fetched per java.sql.ResultSet. Default value is 100000. To apply an unbounded fetch size set this parameter to -1

    numShards

    Number of shards to split the table into for reading. There is no guarantee that Beam will actually execute reads in parallel. It is up to Beam auto scaler to decide the level of parallelism to use (number of workers and threads per worker). But the behavior could be controlled with maxNumWorkers and numberOfWorkerHarnessThreads parameters (see more details about these parameters here). Defaults to 4

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. val connectionOptions: JdbcConnectionOptions
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. val fetchSize: Int
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. val numShards: Int
  16. def productElementNames: Iterator[String]
    Definition Classes
    Product
  17. val rowMapper: (ResultSet) => T
  18. val shard: Shard[S]
  19. val shardColumn: String
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. val tableName: String
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped