[
https://issues.apache.org/jira/browse/BEAM-13140?focusedWorklogId=674281&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-674281
]
ASF GitHub Bot logged work on BEAM-13140:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 03/Nov/21 00:08
Start Date: 03/Nov/21 00:08
Worklog Time Spent: 10m
Work Description: KevinGG commented on a change in pull request #15825:
URL: https://github.com/apache/beam/pull/15825#discussion_r741543285
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/WriteRename.java
##########
@@ -232,7 +238,7 @@ private PendingJobData startWriteRename(
String bqLocation =
BigQueryHelpers.getDatasetLocation(datasetService, ref.getProjectId(),
ref.getDatasetId());
- String projectId = ref.getProjectId();
+ String projectId = loadJobProjectId == null ? ref.getProjectId() :
loadJobProjectId.get();
Review comment:
Yes, please. At least the default value is nullable:
https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/options/ValueProvider.java#L206.
And the underlying implementation
(https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/options/ValueProvider.java#L267)
of RuntimeValueProvider is a StaticValueProvider that allows nullable values:
https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/options/ValueProvider.java#L85
--
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 674281)
Time Spent: 3h (was: 2h 50m)
> WriteRename not using loadJobProjectId configuration from BigQueryIO
> --------------------------------------------------------------------
>
> Key: BEAM-13140
> URL: https://issues.apache.org/jira/browse/BEAM-13140
> Project: Beam
> Issue Type: Bug
> Components: io-java-gcp
> Reporter: Hector Lagos
> Priority: P2
> Time Spent: 3h
> Remaining Estimate: 0h
>
> [WriteRename|https://github.com/apache/beam/blob/v2.31.0/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/WriteRename.java#L221]
> is not using `BigQueryIO.withLoadJobProjectId` like
> [WriteTables|https://github.com/apache/beam/blob/v2.31.0/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/WriteTables.java]
> at the JobReference instantiation. The above makes the job fails if the
> service account only has permissions on the `LoadJobProjectId` for bq job
> creation.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)