apache_beam.yaml.yaml_mapping module
This module defines the basic MapToFields operation.
- apache_beam.yaml.yaml_mapping.normalize_mapping(spec)[source]
Normalizes various fields for mapping transforms.
- apache_beam.yaml.yaml_mapping.validate_generic_expression(expr_dict: dict, input_fields: Collection[str], allow_cmp: bool, error_field: str) None[source]
- apache_beam.yaml.yaml_mapping.validate_generic_expressions(base_type, config, input_pcolls) None[source]
- class apache_beam.yaml.yaml_mapping.Validate(schema: dict[str, Any], error_handling: Mapping[str, Any] | None = None)[source]
Bases:
PTransformValidates each element of a PCollection against a json schema.
- Parameters:
schema – A json schema against which to validate each element.
error_handling – Whether and how to handle errors during iteration. If this is not set, invalid elements will fail the pipeline, otherwise invalid elements will be passed to the specified error output along with information about how the schema was invalidated.
- expand(pcoll)
- apache_beam.yaml.yaml_mapping.normalize_fields(pcoll, fields, drop=(), append=False, language='generic')[source]
- class apache_beam.yaml.yaml_mapping.PaneInfoTuple(is_first, is_last, timing, index, nonspeculative_index)[source]
Bases:
NamedTupleCreate new instance of PaneInfoTuple(is_first, is_last, timing, index, nonspeculative_index)