【问题标题】:Bigquery - loading CSV with "#N/A" in one columnBigquery - 在一列中加载带有“#N/A”的 CSV
【发布时间】:2021-08-18 10:21:51
【问题描述】:

如何使用 bq load (gsutil) 成功加载 csv,其中 FLOAT 列的值很少为 #N/A。

当我使用以下 bq 负载时出现以下错误

bq --location=australia-southeast1 load --max_bad_records=20 --allow_jagged_rows --skip_leading_rows=1 --source_format=CSV  DATASET1.T1.FILE1 gs://load_files/Test/FILE!.csv

错误 - 无法将 #N/A 解析为字段 blah blah 的双精度

不能修改 csv 文件

【问题讨论】:

    标签: google-bigquery gsutil


    【解决方案1】:

    您可以尝试--null-marker 标志(参见here),将“#N/A”指定为特殊的空字符。

    【讨论】:

    • 完美。谢谢你
    猜你喜欢
    • 2021-03-18
    • 2014-11-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-08-14
    • 1970-01-01
    • 1970-01-01
    • 2017-10-20
    相关资源
    最近更新 更多