我需要通过UI将CSV文件上传到BigQuery,从本地驱动器中选择文件后,我指定BigQuery自动检测架构并运行作业。失败并显示以下消息:
“读取数据时出错,错误消息:CSV表也遇到了 许多错误,放弃。行数:2;错误:1.请调查 errors []集合以获取更多详细信息。”
我尝试删除最后一列中的逗号,并尝试更改高级部分中的选项,但始终会导致相同的错误。
错误日志无法帮助我理解问题出在哪里,这是错误日志条目的示例:
2
019-04-03 23:03:50.261 CLST Bigquery作业已完成 bquxjob_6b9eae1_169e6166db0 frank@xxxxxxxxx.nn INVALID_ARGUMENT
和:
“读取数据时出错,错误消息:CSV表也遇到了 许多错误,放弃。行数:2;错误:1.请调查 errors []集合以获取更多详细信息。”
和:
“读取数据时出错,错误消息:解析时检测到错误 行从位置46开始。错误:双引号之间的数据 (“)和字段分隔符。”
奇怪的是,示例CSV数据没有双引号字段分隔符!?
2019-01-02 00:00:00,326,1,,292,0,,294,0,,-28,0,,262,0,,109,0,,372,0,,453,0,,536,0,,136,0,,2609,0,,1450,0,,352,0,,-123,0,,17852,0,,8528,0
2019-01-02 00:02:29,289,1,,402,0,,165,0,,-218,0,,150,0,,90,0,,263,0,,327,0,,275,0,,67,0,,4863,0,,2808,0,,124,0,,454,0,,21880,0,,6410,0
2019-01-02 00:07:29,622,1,,135,0,,228,0,,-147,0,,130,0,,51,0,,381,0,,428,0,,276,0,,67,0,,2672,0,,1623,0,,346,0,,-140,0,,23962,0,,10759,0
2019-01-02 00:12:29,206,1,,118,0,,431,0,,106,0,,133,0,,50,0,,380,0,,426,0,,272,0,,63,0,,1224,0,,740,0,,371,0,,-127,0,,27758,0,,12187,0
2019-01-02 00:17:29,174,1,,119,0,,363,0,,59,0,,157,0,,67,0,,381,0,,426,0,,344,0,,161,0,,923,0,,595,0,,372,0,,-128,0,,22249,0,,9278,0
2019-01-02 00:22:29,175,1,,119,0,,301,0,,7,0,,124,0,,46,0,,382,0,,425,0,,431,0,,339,0,,1622,0,,1344,0,,379,0,,-126,0,,23888,0,,8963,0
我分享了几行CSV数据的示例。我希望BigQuery能够检测到架构并将数据加载到新表中。
答案 0 :(得分:1)
使用BigQuery new WebUI和您的输入数据,我执行了以下操作:
表已创建,我能够按预期SELECT
插入6行
选择*从projectId.datasetId.SO
限制为1000