terraform-google-modules/terraform-google-bigquery

Support for BQ Alter Table

nirby821 opened this issue · 8 comments

BigQuery supports drop column on DDL without the need to recreate the table. Do you have a timeline for when this is suppose to be supported on Terraform. We currently use 'hashicorp/google-beta'. Tnx

https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#alter_table_drop_column_statement

What would you expect to see added to Terraform to support this? You are free to include this in any statements you send.

What do you mean? Currently if I remove a column from the schema - terraform tries to drop and recreate the table. I would expect that only the column would be removed

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

bump

this is causing an issue for us. We can't use terraform to modify the schemas and are forced to use other means and back that config back into terraform. The provider should support the native BQ features for this.

Delete column operations are non-destructive, but the terraform provider is making them destructive. Delete column should update in place and just remove the column not destroy and recreate the entire table.

This is what BQ supports which the provider should also support

https://cloud.google.com/bigquery/docs/managing-table-schemas

Modifying table schemas
This document describes how to modify the schema definitions for existing BigQuery tables. BigQuery natively supports the following schema modifications:

Adding columns to a schema definition
Deleting, or dropping, a column from a schema definition
Relaxing a column's mode from REQUIRED to NULLABLE
It is valid to create a table without defining an initial schema and to add a schema definition to the table at a later time.

All other schema modifications are unsupported and require manual workarounds, including:

Changing a column's name
Changing a column's data type
Changing a column's mode (aside from relaxing REQUIRED columns to NULLABLE)

Does anyone have news regarding this?

Bumping ;)

@stijntratsaertit @szwalkowski This is the issue in the underlying terraform provider you'll want to follow
hashicorp/terraform-provider-google#14769

Is this going to be picked up? It is really a bummer as it affects core data warehouse operations.