I’m using Google Dataflow 1.9 to save data into BigQuery tables. I'm looking for a way to control the table name into which a (PCollection) element is written, based on some value in that element. In our case, the elements contain a user-id, and we wish to write each to it's own user table, dynamically.
相关问题
- Why do Dataflow steps not start?
- How to export crash-free users from firebase?
- Updating a value in an ARRAY in a BigQuery table
- Import json data with null values
- How to transform IP addresses into geolocation in
相关文章
- BigQuery - Concatenate multiple rows into a single
- Where do you get Google Bigquery usage info (mainl
- How do I configure Google BigQuery command line to
- How can I make integration tests with google cloud
- How to get gcloud auth activate-service-account pe
-
Error in Google BigQuery
- CLI “bq load” - how to use non-printable character
- How to capitalize a string?
With 1.9.0 the only options are to either (1) partition the elements into multiple output collections, and then write each output collection to a specific table or (2) window the elements and select the destination based on the window. Option 1 will only work if there is a relatively small set of destination tables and option 2 will only work if the decision is based on the window, which won't fit your use case of per-user destinations very
If you upgrade to 2.0.0 the destination may be specified by a function that receives the window and data element, using either DynamicDestinations or a SerializableFunction. This would allow you to receive each element and then choose the destination based on the user ID.