Marcin Pietraszek
Marcin Pietraszek

Reputation: 3214

How to force BigQueryIO.Write to create table in EU

I'm running a Dataflow streaming pipeline. During it I'm creating multiple tables, names of those are changing during pipeline execution. My Dataflow pipeline runs in EU. I've added following setting to options:

options.setZone("europe-west1-b");

I'm using BigQueryIO.Write to save data to GBQ using following code:

BigQueryIO.Write
    .named(...)
    .to(DynamicTableName.of(...))
    .withCreateDisposition(BigQueryIO.Write.CreateDisposition.CREATE_IF_NEEDED)
    .withSchema(...)
    .withWriteDisposition(BigQueryIO.Write.WriteDisposition.WRITE_APPEND)

Tables created by that snipped are located in US. How can I force BigQueryIO.Write to create tables in EU?

Upvotes: 0

Views: 116

Answers (1)

Marcin Pietraszek
Marcin Pietraszek

Reputation: 3214

Obviusly... location is set on dataset level, not table level. Thus the location of dataset in which table is created should be specified accordingly.

Upvotes: 1

Related Questions