且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Apache Beam作为参数写入BigQuery表和架构

更新时间:2023-11-21 23:07:46

您必须将函数传递到表中.试试这个,代替:

You have to pass a function into table. Try this, instead:

| "Write to BQ" >> beam.io.WriteToBigQuery(
            table=lambda element: 'project:dataset{datatable}__opdata'.format(datatable = element["DEVICE"]),
            schema=set_schema,
            write_disposition=beam.io.BigQueryDisposition.WRITE_APPEND
        )