在下面给出的示例中,最后一行未上载。我收到一个错误:
Data between close double quote (") and field separator: 这看起来像一个bug,因为管道符号之间的所有数据都应该作为一个字段来处理。
模式:1:string,2:string,3:string,4:string
上传文件:
This | is | test only | to check quotes
second | line | "with quotes" | no text
third line | with | "start quote" and | a word after quotes上面的第一行和第二行被处理。但不是第三个。
更新:
请一些人解释一下为什么除了第三行以外,下面的还能工作
This | is | test only | to check quotes
second | line | "with quotes" | no text
third line | with | "start quote" and | a word after quotes
forth line | enclosed | {"GPRS","MCC_DETECTED":false,"MNC_DETECTED":false} | how does this work?
fifth line | with | {"start quote"} and | a word after quotes对此可以有一些花哨的解释。从最终用户的角度来看,这是荒谬的。
发布于 2012-09-14 06:39:26
从CSV RFC4180页面:“如果双引号用于括住字段,那么在字段中出现的双引号必须用另一个双引号来转义。”
你可能想这么做:
This | is | test only | to check quotes
second | line | "with quotes" | no text
third line | with | " ""start quote"" and " | a word after quotes更多关于我们的CSV输入格式这里。
发布于 2018-01-31 00:06:38
使用--quote非常有效。
bq load
--source_format CSV --quote ""
--field_delimiter \t
--max_bad_records 10
-E UTF-8
destination table
Source files 发布于 2016-08-10 04:44:25
https://stackoverflow.com/questions/12418381
复制相似问题