johnjcasey commented on code in PR #27987:
URL: https://github.com/apache/beam/pull/27987#discussion_r1307584533


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/datastore/DatastoreV1.java:
##########
@@ -1527,14 +1708,22 @@ static class DatastoreWriterFn extends DoFn<Mutation, 
Void> {
         V1DatastoreFactory datastoreFactory,
         WriteBatcher writeBatcher) {
       this.projectId = checkNotNull(projectId, "projectId");
+      this.databaseId = DEFAULT_DATABASE;
       this.localhost = localhost;
       this.datastoreFactory = datastoreFactory;
       this.writeBatcher = writeBatcher;
     }
 
     @StartBundle
     public void startBundle(StartBundleContext c) {
-      datastore = datastoreFactory.getDatastore(c.getPipelineOptions(), 
projectId.get(), localhost);
+      // Read Firestore DatabaseID from FirestoreOptions.
+      String firestoreDatabaseId =

Review Comment:
   I think this is an antipattern. I don't think we should be passing in 
options via options. What if the user wanted to query from two databases in a 
single pipeline?



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