Tomas Jansson
Tomas Jansson

Reputation: 23462

How do I set the data location of a bigquery table over the API?

I'm trying to create tables programmatically, but I can't figure out how I set the data location, that is, where the data is stored. In the UI I can choose between "US" and "EU", but according to the docs here: https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#resource the location field is output only.

I'm using node for doing it, but that shouldn't matter. The method I'm using is here: https://googlecloudplatform.github.io/google-cloud-node/#/docs/bigquery/0.9.2/bigquery/dataset?method=createTable

Upvotes: 1

Views: 5240

Answers (1)

Mikhail Berlyant
Mikhail Berlyant

Reputation: 172974

Location is set on Dataset Level, not table
So you should rather look into https://cloud.google.com/bigquery/docs/reference/rest/v2/datasets#resource

Upvotes: 3

Related Questions