数据流导出到 Bigquery:insertAll 错误,无效 table 引用

Dataflow export to Bigquery: insertAll error, invalid table reference

我正在尝试使用 Dataflow、Pub/Sub 和 BigQuery 创建和导出合成数据流。我遵循 synthetic data generation instructions 使用以下模式:

{
    "id": "{{uuid()}}",
    "test_value": {{integer(1,50)}}
}

架构在文件 gs://my-folder/my-schema.json 中。流似乎 运行 正确 - 我可以使用“导出到云存储”模板从相应的 Pub/Sub 主题导出到 GCS 存储桶。当我尝试使用“导出到 BigQuery”模板时,我不断收到此错误:

Request failed with code 400, performed 0 retries due to IOExceptions, performed 0 retries due to unsuccessful status codes, HTTP framework says request can be retried, (caller responsible for retrying): https://bigquery.googleapis.com/bigquery/v2/projects/<my-project>/datasets/<my-dataset>/tables/<my-table>/insertAll.

在开始导出作业之前,我创建了一个空 table <my-project>:<my-dataset>.<my-table>,其中的字段与上面的 JSON 架构相匹配:

id          STRING  NULLABLE    
test_value  INTEGER NULLABLE    

我已将 outputTableSpec 设置为 <my-project>:<my-dataset>.<my-table>

如果 BQ table 名称以 project:dataset.table 的形式给出,则 table 字符串中不能有任何连字符。当我收到代码 400 错误时,我正在使用 my-project.test.stream-data-102720。使用新名称创建新的 table my-project.test.stream_data_102720 和 re-running 作业解决了问题。