TheNeuralBit commented on code in PR #17159:
URL: https://github.com/apache/beam/pull/17159#discussion_r866227685
##########
sdks/python/apache_beam/io/gcp/bigquery.py:
##########
@@ -2514,6 +2515,11 @@ def _get_pipeline_details(unused_elm):
**self._kwargs))
| _PassThroughThenCleanupTempDatasets(project_to_cleanup_pcoll))
+ def get_pcoll_from_schema(table_schema):
+ pcoll_val = apache_beam.io.gcp.bigquery_schema_tools.\
+ produce_pcoll_with_schema(table_schema)
+ return beam.Map(lambda values: pcoll_val(**values))
Review Comment:
You might need to a `beam.Map().with_output_types(pcoll_val)`, that's how
Beam knows the element type, which it then uses to decide on a coder to use. We
need it to choose to use SchemaCoder.
I suspect this is why the assertion is trying to encode elements with
PickleCoder
--
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]