Skip to content

Commit

Permalink
Merge branch 'main' into parameter-manager-parameter-resource-support
Browse files Browse the repository at this point in the history
  • Loading branch information
abheda-crest committed Dec 30, 2024
2 parents e81bbc0 + 102794a commit ccf5cf3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2084,7 +2084,11 @@ func resourceBigQueryTableColumnDrop(config *transport_tpg.Config, userAgent str
}

if len(droppedColumns) > 0 {
droppedColumnsString := strings.Join(droppedColumns, ", DROP COLUMN ")
backquotedDroppedColumns := []string{}
for _, column := range droppedColumns {
backquotedDroppedColumns = append(backquotedDroppedColumns, fmt.Sprintf("`%s`", column))
}
droppedColumnsString := strings.Join(backquotedDroppedColumns, ", DROP COLUMN ")

dropColumnsDDL := fmt.Sprintf("ALTER TABLE `%s.%s.%s` DROP COLUMN %s", tableReference.project, tableReference.datasetID, tableReference.tableID, droppedColumnsString)
log.Printf("[INFO] Dropping columns in-place: %s", dropColumnsDDL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,9 @@ func testAccBigLakeManagedTable(bucketName, connectionID, datasetID, tableID, sc
file_format = "PARQUET"
table_format = "ICEBERG"
}

schema = jsonencode(%s)

depends_on = [
google_project_iam_member.test
]
Expand Down Expand Up @@ -2200,6 +2200,14 @@ resource "google_bigquery_table" "test" {
{
"name": "some_int",
"type": "INTEGER"
},
{
"name": "reserved_word_for",
"type": "STRING"
},
{
"name": "flexible-column-name-dash",
"type": "STRING"
}
]
EOH
Expand Down Expand Up @@ -3108,7 +3116,7 @@ resource "google_bigquery_table" "test" {
# Depends on Iceberg Table Files
depends_on = [
google_storage_bucket_object.empty_data_folder,
google_storage_bucket_object.metadata,
google_storage_bucket_object.metadata,
]
}
`, datasetID, bucketName, tableID)
Expand Down Expand Up @@ -3136,7 +3144,7 @@ resource "google_storage_bucket_object" "datafile" {

# Upload Metadata file
resource "google_storage_bucket_object" "manifest" {
name = "%s"
name = "%s"
content = "gs://${google_storage_bucket.test.name}/${google_storage_bucket_object.datafile.name}"
bucket = google_storage_bucket.test.name
}
Expand Down Expand Up @@ -4588,7 +4596,7 @@ resource "google_bigquery_table" "test" {
]
EOF

external_catalog_table_options {
external_catalog_table_options {
parameters = {
owner = "hashicorp-terraform"
}
Expand Down Expand Up @@ -4643,7 +4651,7 @@ resource "google_bigquery_table" "test" {
]
EOF

external_catalog_table_options {
external_catalog_table_options {
parameters = {
owner = "hashicorp-terraform-updated"
}
Expand Down

0 comments on commit ccf5cf3

Please sign in to comment.