问题
For every 'Record' Type of my Firestore table, BigQuery is automatically adding the 'key' columns. I do not want to have these added for each of the 'Record' Type fields. How can I get rid of these extra columns automatically being added by BigQuery? (I want to get rid of the below columns in my BigQuery table schema highlighted in yellow)
回答1:
This is intended behavior, citing Bigquery GCP documentation:
Each document in Firestore has a unique key that contains information such as the document ID and the document path. BigQuery creates a
RECORD
data type (also known as aSTRUCT
) for the key, with nested fields for each piece of information, as described in the following table.
Due to the fact that Firestore export method is fully integrated with GCP managed import and export service, you can't change this behavior, excluding __key__.*
properties being sent for each RECORD
field in the target Bigquery table.
I guess in your use case, Bigquery table modification action will require some hand-on intervention, since it requires manually changing schema data.
In order to set up this feasibility I would encourage you to raise a service request to the vendor via Google public issue tracker.
来源:https://stackoverflow.com/questions/62254007/how-to-get-rid-of-key-columns-in-bigquery-table-for-every-record-type-fiel