Skip to content
This repository was archived by the owner on Nov 11, 2022. It is now read-only.

Commit 61709c6

Browse files
sammcveetydhalperi
authored andcommitted
Templated jobs should use custom IO for BigQuery (#496)
* Templated jobs should use custom IO for BigQuery * Fix assignment
1 parent f1a1d07 commit 61709c6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

sdk/src/main/java/com/google/cloud/dataflow/sdk/runners/TemplatingDataflowPipelineRunner.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
import org.slf4j.Logger;
3232
import org.slf4j.LoggerFactory;
3333

34+
import java.util.ArrayList;
35+
import java.util.List;
3436
import java.util.concurrent.TimeUnit;
3537

3638
/**
@@ -67,6 +69,13 @@ public boolean failOnJobFileWriteFailure() {
6769
public static TemplatingDataflowPipelineRunner fromOptions(PipelineOptions options) {
6870
DataflowPipelineDebugOptions dataflowOptions =
6971
PipelineOptionsValidator.validate(DataflowPipelineDebugOptions.class, options);
72+
List<String> experiments = dataflowOptions.getExperiments();
73+
if (experiments == null) {
74+
experiments = new ArrayList<>();
75+
dataflowOptions.setExperiments(experiments);
76+
}
77+
experiments.add("enable_custom_bigquery_source");
78+
experiments.add("enable_custom_bigquery_sink");
7079
DataflowPipelineRunner dataflowPipelineRunner =
7180
DataflowPipelineRunner.fromOptions(dataflowOptions);
7281
checkArgument(!Strings.isNullOrEmpty(dataflowOptions.getDataflowJobFile()),

0 commit comments

Comments
 (0)