apache_beam.io.gcp.bigquery_avro_tools module¶
Tools used tool work with Avro files 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_avro_tools.
get_record_schema_from_dict_table_schema
(schema_name: str, table_schema: Dict[str, Any], namespace: str = 'apache_beam.io.gcp.bigquery') → Dict[str, Any][source]¶ Convert a table schema into an Avro schema.
Parameters: Returns: The schema as an Avro RecordSchema.
Return type: Dict[str, Any]
-
apache_beam.io.gcp.bigquery_avro_tools.
table_field_to_avro_field
(table_field: Dict[str, Any], namespace: str) → Dict[str, Any][source]¶ Convert a BigQuery field to an avro field.
Parameters: table_field (Dict[str, Any]) – A BigQuery field in dict form. Returns: An equivalent Avro field in dict form. Return type: Dict[str, Any]