2017-06-08 43 views
1

我已使用bq CLI實用工具將大量AVRO文件(具有相同架構類型的相同表格)加載到Google存儲中。將AVRO文件加載到BigQuery時出錯

然而,對於一些AVRO文件而載入BigQuery我變得非常神祕的錯誤,該錯誤表示:

阿帕奇的Avro庫未能讀取與follwing錯誤數據:EOF 達到(錯誤代碼:無效)

採用驗證過的Avro工具的AVRO文件沒有損壞,報表輸出:

Java的罐子Avro的工具-1.8.1.jar修復-o報告2017-05-15-07 -15-01_48a99.avro 恢復文件:2017-05-15-07-15-01_48a99.avro 文件摘要: 塊數:0 多項紀錄:58598腐敗記錄數:0

我試過的情況下,創造一個全新的表與失敗的文件之一,這是由於51損壞的塊數模式不匹配,但沒有幫助,因爲錯誤是完全一樣的。

需要幫助來找出可能導致錯誤的原因?

+0

你能[提交一個bug問題跟蹤](https://issuetracker.google.com/issues/new?component=187149&template=0)與重現問題的示例文件,假設它不不包含任何敏感數據?這將有助於BigQuery團隊調試正在發生的事情,因爲這聽起來像是一個錯誤。 –

回答

0

沒有更多信息沒有辦法找到問題,但我碰到了這個錯誤信息並提交了一張票here

我在單個加載作業中的許多文件丟失了導致錯誤的列。

來自ticket的說明。

BigQuery uses the alphabetically last file from the directory as the avro schema to read the other Avro files. I suspect the issue is with schema incompatibility between the last file and the "problematic" file. Do you know if all the files have the exact same schema or differ? One thing you could try to help verify this is to copy the alphabetically last file of the directory and the "problematic" file to a different folder and try to load those two files in one BigQuery load job and see if the error reproduces.