[ 
https://issues.apache.org/jira/browse/BEAM-13140?focusedWorklogId=673531&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-673531
 ]

ASF GitHub Bot logged work on BEAM-13140:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Nov/21 18:07
            Start Date: 02/Nov/21 18:07
    Worklog Time Spent: 10m 
      Work Description: pabloem commented on a change in pull request #15825:
URL: https://github.com/apache/beam/pull/15825#discussion_r740721806



##########
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:
       Should this be something like the following?
   ```suggestion
       String projectId = loadJobProjectId == null || loadJobProjectId.get() == 
null ? ref.getProjectId() : loadJobProjectId.get();
   ```




-- 
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: 673531)
    Time Spent: 1h 50m  (was: 1h 40m)

> 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: 1h 50m
>  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)

Reply via email to