paragpratim opened a new issue, #41212:
URL: https://github.com/apache/beam/issues/41212

   ### What would you like to happen?
   
   Java `BigQueryIO.Write` with `FILE_LOADS` supports `withLoadJobProjectId` to 
choose the project in which load jobs run, but it does not expose an option to 
specify a reservation for those jobs.
   
   Some organizations manage reservations centrally in a separate project and 
want individual load jobs to specify which reservation to use, rather than 
relying on a `PIPELINE` assignment for each job project. In this setup, the 
Dataflow worker service account would have access to the central reservation.
   
   I propose adding an optional reservation setting to `BigQueryIO.Write`, for 
example:
   
   ```java
   BigQueryIO.writeTableRows()
       .to("project:dataset.table")
       .withMethod(BigQueryIO.Write.Method.FILE_LOADS)
       .withLoadJobReservation(
           
"projects/central-project/locations/dataset-region/reservations/load-reservation-name");
   ```
   
   The example above is one possible API; I'm open to other suggestions. It 
would be useful to support deferred values for templates and apply the 
reservation to all load jobs, including temporary-table and schema-update 
loads. If no reservation is specified, the current behavior should stay the 
same.
   
   I'd like to verify that BigQuery uses the specified reservation for load 
jobs.
   
   References:
   - [BigQuery job 
configuration](https://cloud.google.com/bigquery/docs/reference/rest/v2/Job#JobConfiguration)
   - [BigQuery reservations and 
assignments](https://cloud.google.com/bigquery/docs/reservations-workload-management)
   
   ### Issue Priority
   
   Priority: 2 (default / most feature requests should be filed as P2)
   
   ### Issue Components
   
   - [ ] Component: Python SDK
   - [x] Component: Java SDK
   - [ ] Component: Go SDK
   - [ ] Component: Typescript SDK
   - [x] Component: IO connector
   - [ ] Component: Beam YAML
   - [ ] Component: Beam examples
   - [ ] Component: Beam playground
   - [ ] Component: Beam katas
   - [ ] Component: Website
   - [ ] Component: Infrastructure
   - [ ] Component: Spark Runner
   - [ ] Component: Flink Runner
   - [ ] Component: Prism Runner
   - [ ] Component: Hazelcast Jet Runner
   - [ ] Component: Google Cloud Dataflow Runner


-- 
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]

Reply via email to