Hi,
I am trying to alter the column description of child attributes inside RECORD type using sql statement. Unfortunately i was not successful in accessing the child attributes using sql. Appreciate your help with this.
Solved! Go to Solution.
BigQuery does not support altering the column description of child attributes within a RECORD
type using an ALTER TABLE
SQL statement. The ALTER TABLE
functionality is limited to top-level schema modifications and does not extend to nested field descriptions.
To update the description of a nested field, you can use the following approach:
Export the current table schema to a JSON file using the bq
command-line tool:
bq show --schema --format=prettyjson [PROJECT_ID]:[DATASET].[TABLE] > [SCHEMA_FILE].json
Manually edit the JSON file to include the new descriptions for the nested fields.
Update the table schema with the modified JSON file:
bq update [PROJECT_ID]:[DATASET].[TABLE] [SCHEMA_FILE].json
This method allows you to modify the schema without affecting the existing data in your table. It's recommended to back up your data before performing schema updates and to test any changes in a non-production environment first.
BigQuery does not support altering the column description of child attributes within a RECORD
type using an ALTER TABLE
SQL statement. The ALTER TABLE
functionality is limited to top-level schema modifications and does not extend to nested field descriptions.
To update the description of a nested field, you can use the following approach:
Export the current table schema to a JSON file using the bq
command-line tool:
bq show --schema --format=prettyjson [PROJECT_ID]:[DATASET].[TABLE] > [SCHEMA_FILE].json
Manually edit the JSON file to include the new descriptions for the nested fields.
Update the table schema with the modified JSON file:
bq update [PROJECT_ID]:[DATASET].[TABLE] [SCHEMA_FILE].json
This method allows you to modify the schema without affecting the existing data in your table. It's recommended to back up your data before performing schema updates and to test any changes in a non-production environment first.
Thank you