Apache Beam Python SDK 中是否有等效的 withFormatFunction?

Is there withFormatFunction equivalent in Apache Beam Python SDK?

我正在将字典的 PCollection 传递给 BigQueryIO 的 WriteToBigQuery class. However, some fields of the dictionary aren't meant to be written to BigQuery tables. They're important to decide the table name for the element (in streaming mode). This is done by passing callable in the table parameter. Is this possible to do in Beam Python? This is possible in Java SDK through withFormatFunction。干杯。

目前 Beam 中没有与 withFormatFunction 等效的功能 Python。 如果你有一组固定的输出 tables,你可以为每个输出单独的 WriteToBigQuery 转换,并在管道中更早地分支。 您还可以创建一个 PCollection 类型的对象,其行为类似于 dict(包含有效负载),但上面还有 table name callable 可以读取的字段