我知道我们可以在BQ中使用报价新行选项。但即使使用此选项,我的数据也无法加载。我不知道为什么它会破坏负载。
CSV行:
"49602"|"AFFF7240654213"|"FROM MASTER: TESTing part. Goodluck: example.com/wp.png (tarifado)
"|"MO"|||0.000|0.000|50.7000|"NET"
它给了我这个错误。
Error while reading data, error message: Error detected while parsing row starting at position: 436388389. Error: Missing close double quote (") character.
但有了allow-quoted-newline
,它应该能正常工作吗?
这里还有Postgres(数据源(的确切列
FROM MASTER: TESTing part. Goodluck: example.com/wp.png (tarifado) r
r
我将您的示例CSV行存储在test.CSV文件中,并且在运行时
bq load --autodetect --source_format=CSV dataset.test_table "gs://my-bucket/test.csv"
事实上,我看到了相同的错误
Error detected while parsing row starting at position: 0. Error: Missing close
double quote (") character.
然而,当添加允许引用换行符的标志时,运行良好
bq load --autodetect --allow_quoted_newlines --source_format=CSV dataset.test_table "gs://my-bucket/test.csv"
BQ表,test_table看起来像这个
行 | int64_field_0 | 字符串_field_1 | >字符串_field _2>字符串_field_3 | 字符串_field_4字符串_field_5双字段_6<1th>双场_7单字段_8<2th>字符串菲尔德_9|||||||
---|---|---|---|---|---|---|---|---|---|---|
1 | 49602 | >AFF7240654213 | 来自MASTER:测试部件。好运:example.com/wp.png(tarifado( | MO | nullnull | 0.0 | 0.0 | 50.7 | NET |