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

   ### What would you like to happen?
   
   Currently `FirestoreIO.v1().write()` expects that the Firestore DB instance 
to be located in the same project where the Dataflow job is running. 
   
   That's because at `FirestoreV1WriteFn.BaseBatchWriteFn#startBundle` the 
project comes from the original pipeline options:
   ```
   String project = 
((GcpOptions)c.getPipelineOptions().as(GcpOptions.class)).getProject();
   ```
   and there's no place we can set the project differently.
   
   I tried to use a different projectId when creating a Document Name at 
   ```
   Writer.Builder().setUpdate(Document.newBuilder().setName()
   ```
   but I get an error: 
   ```
   INVALID_ARGUMENT:  The request was for database 'projects/<my_
   first_project>/databases/(default)' but was attempting to access database 
'projects/<my_second_project)/databases/(default)'
   ```
   It would be good if I could programmatically change the project for 
FirestoreIO
   
   
   ### Issue Priority
   
   Priority: 3 (nice-to-have improvement)
   
   ### 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: Spark Runner
   - [ ] Component: Flink Runner
   - [ ] Component: Samza Runner
   - [ ] Component: Twister2 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