How to get rid of __key__ columns in BigQuery table for every 'Record' Type field?

流过昼夜 提交于 2020-06-17 14:50:34

问题


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 a STRUCT) 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!