apache_beam.io.gcp.bigquery_schema_tools module

Tools used tool work with Schema types in the context of BigQuery. Classes, constants and functions in this file are experimental and have no backwards compatibility guarantees. NOTHING IN THIS FILE HAS BACKWARDS COMPATIBILITY GUARANTEES.

apache_beam.io.gcp.bigquery_schema_tools.generate_user_type_from_bq_schema(the_table_schema)[source]

Convert a schema of type TableSchema into a pcollection element. :param the_table_schema: A BQ schema of type TableSchema

Returns:type that can be used to work with pCollections.
Return type:type
apache_beam.io.gcp.bigquery_schema_tools.bq_field_to_type(field, mode)[source]
apache_beam.io.gcp.bigquery_schema_tools.convert_to_usertype(table_schema)[source]
class apache_beam.io.gcp.bigquery_schema_tools.BeamSchemaConversionDoFn(pcoll_val_ctor)[source]

Bases: apache_beam.transforms.core.DoFn

process(dict_of_tuples)[source]
infer_output_type(input_type)[source]