Google Bigquery加载数据具有本地文件大小限制



使用API 的本地文件加载 Google Bigquery 数据是否有任何限制?

正如Google Bigquery文档提到的关于Web UI的,本地文件大小超过<= 10 MB和16,000行。同样的限制是否适用于 API?

没有用于加载本地文件的 BigQuery API。 通过 bq 命令或 Web UI 加载本地文件 - 我相信当你这样做时会发生什么 - 它只是代表你上传文件到 GCS,然后只是从 GCS 执行正常的 API 加载作业 - 你可以在 UI 中清楚地看到它。但是因为Google希望从WebUI/bq命令中获得合理的用户体验 - 这里对上传"本地"文件有更严格的限制。

我的建议是使用 GCS 路径加载大文件 (https://cloud.google.com/bigquery/docs/loading-data-cloud-storage( 重要的事情 - 它是免费的(与您将为流数据付费的流媒体相比(

Limits are following (from https://cloud.google.com/bigquery/quotas)
Load jobs per table per day — 1,000 (including failures)
Maximum columns per table — 10,000
Maximum size per load job — 15 TB across all input files for CSV, JSON, and Avro
Maximum number of files per load job — 10 Million total files including all files matching all wildcard URIs
For CSV and JSON - 4 GB compressed file, 5TB uncompressed

本地文件上传没有特殊限制,10MB 和 16000 行仅适用于 UI。但我不建议上传巨大的本地文件。