Small question on bigquery, for deployment infra automation, it seem terraform with google provide doens’t support yet the adding replica in case au multi region.
Google has announce few month a go, in backlog development.
i try by script with local-exec/remote-exec ressource tf, but bq seem doenst work with adding replica, or may be i have wrong syntax, but work fine on gloud console like.
ALTER SCHEMA xxxx
ADD REPLICA myreplica OPTIONS (location=’europe-west3′)
but no in cloud shell with bq
$ bq query legacy_sql=false ‘ALTER SCHEMA mydataset
ADD REPLICA replica1 OPTIONS (location=”europe-west3″) ‘
Error in query string: Error processing job ‘dev:bqjob_r6b3a4e9f2a33d17d_000001922856d484_1’: Encountered “” at line 1, column 12.
Some idea or alternative way how to add replica on bigquery dataset by script
How trying to add a replica (multi region) on bigquery by script for deployment infra.
terraform? bq? other?
Jean-Pierre Bordenave is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I think your syntax is wrong. You had described your command as:
bq query legacy_sql=false ‘ALTER SCHEMA mydataset ADD REPLICA replica1 OPTIONS (location=”europe-west3″)’
but I think this is correct:
bq query –use_legacy_sql=false ‘ALTER SCHEMA `mydataset` ADD REPLICA replica1 OPTIONS (location=europe-west3)’