google-bigquery - 数据流导出到 Bigquery : insertAll error, 无效表引用

标签 google-bigquery google-cloud-dataflow google-cloud-pubsub

我正在尝试使用 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.

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

id          STRING  NULLABLE    
test_value  INTEGER NULLABLE    

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

最佳答案

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

关于google-bigquery - 数据流导出到 Bigquery : insertAll error, 无效表引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64546569/

相关文章:

javascript - Google-Big Query with JavaScript

google-cloud-platform - 使用 Dataflow Java SDK 2 从 Pubsub 读取

google-cloud-platform - GCP 发布订阅 : "The request was aborted because there was no available instance." - Doesn't Retry on Failure

google-bigquery - 在 Google BigQuery 中创建一列 UUID

encryption - 大查询中的字段级加密

google-bigquery - bq load 命令将 parquet 文件从 GCS 加载到 BigQuery,列名以数字开头

java - 将服务帐户与数据流结合使用 - 出现 storage.objects.get 访问错误

google-cloud-platform - 带有python flex模板的数据流 - 启动器超时

google-cloud-datastore - 从 PubsubIO 读取写入 DatastoreIO

configuration - 如何使用 Spring Cloud 在一个 Spring Boot 应用程序中连接/配置两个 pubsub gcp 项目?