0

我的目标是使用 BigQuery Web 界面将我的所有(GCS 创建的)日志从 Google Cloud Storage 获取到 BigQuery。由于日志每小时创建一次,我喜欢一次将它们全部导入以进行分析。

例如 gs://logging-bucket/images.mysite.net_storage_2013_03_31_07_00_00_0001a_v0 , gs://logging-bucket/images.mysite.net_storage_2013_03_31_07_00_00_0002a_v0 等等。

仅获取一个文件时出现此错误:

错误:

 Line:1 / Column:1, Expected '{' found '"'
 Line:2 / Column:1, Expected '{' found '"' 
 Line:3 / Column:1, Expected '{' found '"'
 Line:4 / Column:1, Expected '{' found '"'
 Line:5 / Column:1, Expected '{' found '"'
 Line:6 / Column:1, Expected '{' found '"'
 Line:7 / Column:1, Expected '{' found '"'

我所做的是创建一个新数据集,从 gs://logging-bucket/images.mysite.net_storage_2013_03_31_07_00_00_0001a_v0 中选择数据,然后添加此架构http://storage.googleapis.com/pub/cloud_storage_usage_schema_v0.json并提交。

类似的问题在这里和 Google ing 这对我没有多大帮助。

求求你了,谢谢你。

4

1 回答 1

0

Can you give an example of a row? Is the data in json format or csv? From the error, it sounds like it is trying to import JSON data, but a json row shouldn't start with '"' -- it should start with '{'. Is this CSV data? If so, you should set the sourceFormat to CSV (or leave it empty) instead of NEWLINE_DELIMITED_JSON.

于 2013-04-08T22:06:21.013 回答