2013-03-31 79 views
0

我的目標是使用BigQuery Web界面將我的所有(由GCS創建的)日誌從Google Cloud Storage轉換爲BigQuery。 由於日誌是每小時創建一次,我喜歡一次導入它們以便分析。將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上的類似問題對我沒有多大幫助。

拜託,謝謝。

回答

0

你能舉一個例子嗎?數據是json格式還是csv?從錯誤中,它聽起來像是在試圖導入JSON數據,但是一個json行不應該以'「開始 - 它應該以'{'開頭。是CSV數據嗎?如果是這樣,你應該設置sourceFormat以CSV(或保留爲空)而不是NEWLINE_DELIMITED_JSON。

相關問題