apache_beam.runners.dataflow.ptransform_overrides module¶
Ptransform overrides for DataflowRunner.
-
class
apache_beam.runners.dataflow.ptransform_overrides.CreatePTransformOverride[source]¶ Bases:
apache_beam.pipeline.PTransformOverrideA
PTransformOverrideforCreatein streaming mode.-
get_replacement_inputs(applied_ptransform)¶ Provides inputs that will be passed to the replacement PTransform.
Parameters: applied_ptransform – Original AppliedPTransform containing the PTransform to be replaced. Returns: An iterable of PValues that will be passed to the expand() method of the replacement PTransform.
-
get_replacement_transform(ptransform)¶ Provides a runner specific override for a given PTransform.
Parameters: ptransform – PTransform to be replaced. Returns: A PTransform that will be the replacement for the PTransform given as an argument.
-
-
class
apache_beam.runners.dataflow.ptransform_overrides.ReadPTransformOverride[source]¶ Bases:
apache_beam.pipeline.PTransformOverrideA
PTransformOverrideforRead(BoundedSource)-
get_replacement_inputs(applied_ptransform)¶ Provides inputs that will be passed to the replacement PTransform.
Parameters: applied_ptransform – Original AppliedPTransform containing the PTransform to be replaced. Returns: An iterable of PValues that will be passed to the expand() method of the replacement PTransform.
-
get_replacement_transform(ptransform)¶ Provides a runner specific override for a given PTransform.
Parameters: ptransform – PTransform to be replaced. Returns: A PTransform that will be the replacement for the PTransform given as an argument.
-
-
class
apache_beam.runners.dataflow.ptransform_overrides.JrhReadPTransformOverride[source]¶ Bases:
apache_beam.pipeline.PTransformOverrideA
PTransformOverrideforRead(BoundedSource)-
get_replacement_inputs(applied_ptransform)¶ Provides inputs that will be passed to the replacement PTransform.
Parameters: applied_ptransform – Original AppliedPTransform containing the PTransform to be replaced. Returns: An iterable of PValues that will be passed to the expand() method of the replacement PTransform.
-
get_replacement_transform(ptransform)¶ Provides a runner specific override for a given PTransform.
Parameters: ptransform – PTransform to be replaced. Returns: A PTransform that will be the replacement for the PTransform given as an argument.
-
-
class
apache_beam.runners.dataflow.ptransform_overrides.CombineValuesPTransformOverride[source]¶ Bases:
apache_beam.pipeline.PTransformOverrideA
PTransformOverrideforCombineValues.The DataflowRunner expects that the CombineValues PTransform acts as a primitive. So this override replaces the CombineValues with a primitive.
-
get_replacement_inputs(applied_ptransform)¶ Provides inputs that will be passed to the replacement PTransform.
Parameters: applied_ptransform – Original AppliedPTransform containing the PTransform to be replaced. Returns: An iterable of PValues that will be passed to the expand() method of the replacement PTransform.
-
get_replacement_transform_for_applied_ptransform(applied_ptransform)¶ Provides a runner specific override for a given AppliedPTransform.
Parameters: applied_ptransform – AppliedPTransform containing the PTransform to be replaced. Returns: A PTransform that will be the replacement for the PTransform inside the AppliedPTransform given as an argument.
-
-
class
apache_beam.runners.dataflow.ptransform_overrides.NativeReadPTransformOverride[source]¶ Bases:
apache_beam.pipeline.PTransformOverrideA
PTransformOverrideforReadusing native sources.The DataflowRunner expects that the Read PTransform using native sources act as a primitive. So this override replaces the Read with a primitive.
-
get_replacement_inputs(applied_ptransform)¶ Provides inputs that will be passed to the replacement PTransform.
Parameters: applied_ptransform – Original AppliedPTransform containing the PTransform to be replaced. Returns: An iterable of PValues that will be passed to the expand() method of the replacement PTransform.
-
get_replacement_transform_for_applied_ptransform(applied_ptransform)¶ Provides a runner specific override for a given AppliedPTransform.
Parameters: applied_ptransform – AppliedPTransform containing the PTransform to be replaced. Returns: A PTransform that will be the replacement for the PTransform inside the AppliedPTransform given as an argument.
-
-
class
apache_beam.runners.dataflow.ptransform_overrides.WriteToBigQueryPTransformOverride(pipeline, options)[source]¶ Bases:
apache_beam.pipeline.PTransformOverride-
get_replacement_inputs(applied_ptransform)¶ Provides inputs that will be passed to the replacement PTransform.
Parameters: applied_ptransform – Original AppliedPTransform containing the PTransform to be replaced. Returns: An iterable of PValues that will be passed to the expand() method of the replacement PTransform.
-
get_replacement_transform_for_applied_ptransform(applied_ptransform)¶ Provides a runner specific override for a given AppliedPTransform.
Parameters: applied_ptransform – AppliedPTransform containing the PTransform to be replaced. Returns: A PTransform that will be the replacement for the PTransform inside the AppliedPTransform given as an argument.
-
-
class
apache_beam.runners.dataflow.ptransform_overrides.GroupIntoBatchesWithShardedKeyPTransformOverride(dataflow_runner, options)[source]¶ Bases:
apache_beam.pipeline.PTransformOverrideA
PTransformOverrideforGroupIntoBatches.WithShardedKey.This override simply returns the original transform but additionally records the output PCollection in order to append required step properties during graph translation.
-
get_replacement_inputs(applied_ptransform)¶ Provides inputs that will be passed to the replacement PTransform.
Parameters: applied_ptransform – Original AppliedPTransform containing the PTransform to be replaced. Returns: An iterable of PValues that will be passed to the expand() method of the replacement PTransform.
-
get_replacement_transform(ptransform)¶ Provides a runner specific override for a given PTransform.
Parameters: ptransform – PTransform to be replaced. Returns: A PTransform that will be the replacement for the PTransform given as an argument.
-