derrickaw commented on code in PR #37787:
URL: https://github.com/apache/beam/pull/37787#discussion_r3002848447
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryStorageSourceBase.java:
##########
@@ -156,13 +156,27 @@ public List<BigQueryStorageStreamSource<T>> split(
streamCount = Math.max(streamCount, MIN_SPLIT_COUNT);
}
+ String project =
+ bqOptions.getBigQueryProject() == null
+ ? bqOptions.getProject()
+ : bqOptions.getBigQueryProject();
+ if (project == null) {
+ if (targetTable != null
+ && targetTable.getTableReference() != null
+ && targetTable.getTableReference().getProjectId() != null) {
+ project = targetTable.getTableReference().getProjectId();
+ } else {
+ @Nullable String tableReferenceId = getTargetTableId(bqOptions);
+ if (tableReferenceId != null) {
+ TableReference tableReference =
BigQueryHelpers.parseTableUrn(tableReferenceId);
+ project = tableReference.getProjectId();
+ }
+ }
+ }
Review Comment:
Will double check, but I think so. Will follow up on another PR. Thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]