Skip to content

Commit 9516397

Browse files
Priority to BigQueryProject for executeExtract (#36694)
* Priority to BigQueryProject * Spotless Apply
1 parent c7c6a37 commit 9516397

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQuerySourceBase.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,16 @@ protected ExtractResult extractFiles(PipelineOptions options) throws Exception {
133133
String bqLocation =
134134
BigQueryHelpers.getDatasetLocation(
135135
datasetService, tableToExtract.getProjectId(), tableToExtract.getDatasetId());
136+
String bqProjectId =
137+
bqOptions.getBigQueryProject() != null
138+
? bqOptions.getBigQueryProject()
139+
: bqOptions.getProject();
136140
List<ResourceId> tempFiles =
137141
executeExtract(
138142
extractJobId,
139143
tableToExtract,
140144
jobService,
141-
bqOptions.getProject(),
145+
bqProjectId,
142146
extractDestinationDir,
143147
bqLocation,
144148
useAvroLogicalTypes);

0 commit comments

Comments
 (0)