public class ReadSpannerSchema extends DoFn<java.lang.Void,SpannerSchema>
DoFn
reads Cloud Spanner 'information_schema.*' tables to build the SpannerSchema
.DoFn.AlwaysFetched, DoFn.BoundedPerElement, DoFn.BundleFinalizer, DoFn.Element, DoFn.FieldAccess, DoFn.FinishBundle, DoFn.FinishBundleContext, DoFn.GetInitialRestriction, DoFn.GetInitialWatermarkEstimatorState, DoFn.GetRestrictionCoder, DoFn.GetSize, DoFn.GetWatermarkEstimatorStateCoder, DoFn.Key, DoFn.MultiOutputReceiver, DoFn.NewTracker, DoFn.NewWatermarkEstimator, DoFn.OnTimer, DoFn.OnTimerContext, DoFn.OnTimerFamily, DoFn.OnWindowExpiration, DoFn.OnWindowExpirationContext, DoFn.OutputReceiver<T>, DoFn.ProcessContext, DoFn.ProcessContinuation, DoFn.ProcessElement, DoFn.RequiresStableInput, DoFn.RequiresTimeSortedInput, DoFn.Restriction, DoFn.Setup, DoFn.SideInput, DoFn.SplitRestriction, DoFn.StartBundle, DoFn.StartBundleContext, DoFn.StateId, DoFn.Teardown, DoFn.TimerFamily, DoFn.TimerId, DoFn.Timestamp, DoFn.TruncateRestriction, DoFn.UnboundedPerElement, DoFn.WatermarkEstimatorState, DoFn.WindowedContext
Constructor and Description |
---|
ReadSpannerSchema(SpannerConfig config,
PCollectionView<com.google.cloud.spanner.Dialect> dialectView)
Constructor for creating an instance of the ReadSpannerSchema class.
|
ReadSpannerSchema(SpannerConfig config,
PCollectionView<com.google.cloud.spanner.Dialect> dialectView,
java.util.Set<java.lang.String> allowedTableNames)
Constructor for creating an instance of the ReadSpannerSchema class.
|
Modifier and Type | Method and Description |
---|---|
void |
processElement(DoFn.ProcessContext c) |
void |
setup() |
void |
teardown() |
getAllowedTimestampSkew, getInputTypeDescriptor, getOutputTypeDescriptor, populateDisplayData, prepareForProcessing
public ReadSpannerSchema(SpannerConfig config, PCollectionView<com.google.cloud.spanner.Dialect> dialectView)
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.public ReadSpannerSchema(SpannerConfig config, PCollectionView<com.google.cloud.spanner.Dialect> dialectView, java.util.Set<java.lang.String> allowedTableNames)
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.@DoFn.Setup public void setup() throws java.lang.Exception
java.lang.Exception
@DoFn.Teardown public void teardown() throws java.lang.Exception
java.lang.Exception
@DoFn.ProcessElement public void processElement(DoFn.ProcessContext c) throws java.lang.Exception
java.lang.Exception