Class ReadSpannerSchema

java.lang.Object
org.apache.beam.sdk.transforms.DoFn<Void,SpannerSchema>
org.apache.beam.sdk.io.gcp.spanner.ReadSpannerSchema
All Implemented Interfaces:
Serializable, HasDisplayData

public class ReadSpannerSchema extends DoFn<Void,SpannerSchema>
This DoFn reads Cloud Spanner 'information_schema.*' tables to build the SpannerSchema.
See Also:
  • Constructor Details

    • ReadSpannerSchema

      public ReadSpannerSchema(SpannerConfig config, PCollectionView<Dialect> dialectView)
      Constructor for creating an instance of the ReadSpannerSchema class. If no is passed, every single table is allowed.
      Parameters:
      config - The SpannerConfig object that contains the configuration for accessing the Spanner database.
      dialectView - A PCollectionView object that holds a Dialect object for the database dialect to use for reading the Spanner schema.
    • ReadSpannerSchema

      public ReadSpannerSchema(SpannerConfig config, PCollectionView<Dialect> dialectView, Set<String> allowedTableNames)
      Constructor for creating an instance of the ReadSpannerSchema class.
      Parameters:
      config - The SpannerConfig object that contains the configuration for accessing the Spanner database.
      dialectView - A PCollectionView object that holds a Dialect object for the database dialect to use for reading the Spanner schema.
      allowedTableNames - A set of allowed table names to be used when reading the Spanner schema.
  • Method Details