Reputation: 75
I'm doing a dataflow streaming app that would write in firestore, when I run on DirectRunner it works, but when I run on DataflowRunner it doesn't works. what is the error? my requirements.txt
is:
apache-beam[gcp,test]==2.19.0
google-cloud-pubsub
google-cloud-firestore==0.29.0
the row of code that throws the exeption is:
from google.cloud import firestore
db = firestore.Client(project=project)
Upvotes: 0
Views: 1126
Reputation: 2825
This is documented in the Dataflow FAQ, there are few ways to handle this
import
statement inside the function definitionsave_main_session
to True in the Pipeline OptionsMore details can be found here - https://cloud.google.com/dataflow/docs/resources/faq#how_do_i_handle_nameerrors
Upvotes: 1