BigQuery 使用 Datastore 导出文件直接从 Storage 查询数据
BigQuery querying data directly from Storage with Datastore exported file
我想知道 BigQuery 是否支持查询 Cloud Storage 中 Datastore 导出的文件存储? sample code 仅显示如何查询 CSV 和 GOOGLE_SHEETS,但 Datastore 导出的文件是 "kinds.export_metadata" .如果支持,ExternalConfig
应该是多少?有什么例子可以参考吗?
感谢任何建议,谢谢。
ExternalConfig 指的是外部源。
BigQuery 支持 Here
中定义的 3 种外部源类型
定义了云存储文件格式here
Comma-separated values (CSV)
JSON (newline-delimited)
Avro files
Cloud Datastore exports
Cloud Firestore exports
作为参考,这是 Python 实现中的样子 code from github
CSV = 'CSV'
"""Specifies CSV format."""
GOOGLE_SHEETS = 'GOOGLE_SHEETS'
"""Specifies Google Sheets format."""
NEWLINE_DELIMITED_JSON = 'NEWLINE_DELIMITED_JSON'
"""Specifies newline delimited JSON format."""
AVRO = 'AVRO'
"""Specifies Avro format."""
DATASTORE_BACKUP = 'DATASTORE_BACKUP'
"""Specifies datastore backup format"""
BIGTABLE = 'BIGTABLE'
"""Specifies Bigtable format."""
因此,如果您的文件采用其中一种格式,您就可以开始了
我想知道 BigQuery 是否支持查询 Cloud Storage 中 Datastore 导出的文件存储? sample code 仅显示如何查询 CSV 和 GOOGLE_SHEETS,但 Datastore 导出的文件是 "kinds.export_metadata" .如果支持,ExternalConfig
应该是多少?有什么例子可以参考吗?
感谢任何建议,谢谢。
ExternalConfig 指的是外部源。
BigQuery 支持 Here
中定义的 3 种外部源类型定义了云存储文件格式here
Comma-separated values (CSV)
JSON (newline-delimited)
Avro files
Cloud Datastore exports
Cloud Firestore exports
作为参考,这是 Python 实现中的样子 code from github
CSV = 'CSV'
"""Specifies CSV format."""
GOOGLE_SHEETS = 'GOOGLE_SHEETS'
"""Specifies Google Sheets format."""
NEWLINE_DELIMITED_JSON = 'NEWLINE_DELIMITED_JSON'
"""Specifies newline delimited JSON format."""
AVRO = 'AVRO'
"""Specifies Avro format."""
DATASTORE_BACKUP = 'DATASTORE_BACKUP'
"""Specifies datastore backup format"""
BIGTABLE = 'BIGTABLE'
"""Specifies Bigtable format."""
因此,如果您的文件采用其中一种格式,您就可以开始了