Class JdbcIO.ReadAll<ParameterT,​OutputT>

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.beam.sdk.transforms.display.HasDisplayData
    Enclosing class:
    JdbcIO

    public abstract static class JdbcIO.ReadAll<ParameterT,​OutputT>
    extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<ParameterT>,​org.apache.beam.sdk.values.PCollection<OutputT>>
    Implementation of JdbcIO.readAll().
    See Also:
    Serialized Form
    • Constructor Detail

      • ReadAll

        public ReadAll()
    • Method Detail

      • withDataSourceProviderFn

        public JdbcIO.ReadAll<ParameterT,​OutputT> withDataSourceProviderFn​(org.apache.beam.sdk.transforms.SerializableFunction<java.lang.Void,​javax.sql.DataSource> dataSourceProviderFn)
      • withFetchSize

        public JdbcIO.ReadAll<ParameterT,​OutputT> withFetchSize​(int fetchSize)
        This method is used to set the size of the data that is going to be fetched and loaded in memory per every database call. Please refer to: Statement.setFetchSize(int) It should ONLY be used if the default value throws memory errors.
      • withOutputParallelization

        public JdbcIO.ReadAll<ParameterT,​OutputT> withOutputParallelization​(boolean outputParallelization)
        Whether to reshuffle the resulting PCollection so results are distributed to all workers. The default is to parallelize and should only be changed if this is known to be unnecessary.
      • withDisableAutoCommit

        public JdbcIO.ReadAll<ParameterT,​OutputT> withDisableAutoCommit​(boolean disableAutoCommit)
        Whether to disable auto commit on read. Defaults to true if not provided. The need for this config varies depending on the database platform. Informix requires this to be set to false while Postgres requires this to be set to true.
      • expand

        public org.apache.beam.sdk.values.PCollection<OutputT> expand​(org.apache.beam.sdk.values.PCollection<ParameterT> input)
        Specified by:
        expand in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<ParameterT>,​org.apache.beam.sdk.values.PCollection<OutputT>>
      • populateDisplayData

        public void populateDisplayData​(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder)
        Specified by:
        populateDisplayData in interface org.apache.beam.sdk.transforms.display.HasDisplayData
        Overrides:
        populateDisplayData in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<ParameterT>,​org.apache.beam.sdk.values.PCollection<OutputT>>