Export BigQuery and Spark schemas
The Apache Arrow / Parquet export has a new output option. bigquery writes each table as a
BigQuery table schema, and spark as a Spark StructType DDL string, from the same typed projection as
the Arrow schemas. See BigQuery and Spark.
- BigQuery:
<table>.bigquery.jsonis the JSONbq mk --schemareads. Objects areRECORDs, listsREPEATED, required fieldsREQUIRED, and decimalsNUMERICorBIGNUMERICby precision. - Spark:
<table>.spark.ddlis the lineDataType.fromDDLparses, withSTRUCT,ARRAY,MAP,NOT NULLandCOMMENT. - Per table or bundled: one file per table by default; bundle writes
schemas.bigquery.jsonorschemas.spark.ddl. - Checked before you download: each BigQuery schema against BigQuery's table-schema rules, and each DDL line against Spark's type grammar. The fidelity report lists what each engine cannot hold, such as a map in BigQuery or a time of day in Spark.
