正在从 Google Cloud 自动上传文件到 Big Query

Uploading files automatically from Google Cloud to Big Query

如何自动将 .CSV 文件从 Google Cloud 上传到 Big Query。

Google Cloud Storage 提供 access and storage log files in CSV formats which can be directly imported into BigQuery for analysis. In order to access these logs, you must set up log delivery and enable logging. The schemas are available online, in JSON format, for both the storage access logs and storage bucket data. More information is available in the Cloud Storage access logs and storage data documentation.

为了从命令行将存储和访问日志加载到 BigQuery 中,请使用如下命令:

bq load --schema=cloud_storage_usage_schema.json my_dataset.usage_2012_06_18_v0 gs://my_logs/bucket_usage_2012_06_18_14_v0