gpt4 book ai didi

google-bigquery - 从位置 0 开始的行中的 JSON 解析错误 : . 行大小大于:2097152

转载 作者:行者123 更新时间:2023-12-05 08:27:35 25 4
gpt4 key购买 nike

我们尝试从 GoogleCloudStorage 上传文件,但出现类似

的错误

JSON parsing error in row starting at position 0: . Row size is larger than: 2097152. (error code: invalid)`. Ten thousand of customers data are stored in oneline.

[{"user_id":1,"address": "london", "birthday":xxxx},{"user_id":2,"address": "london", "birthday":xxxx},{"user_id":3,"address": "NY", "birthday":xxxx},....{"user_id":10000,"address": "NY", "birthday":xxxx}]

最佳答案

为了将 JSON 从 GCS 加载到 GBQ,您应该将数据转换为如下所示,每个用户信息在单独的行中 - 这将解决行大小限制并符合 newline delimited JSON要求 - 查看有关支持的更多信息 JSON format

{"user_id":1,"address": "london", "birthday":xxxx}
{"user_id":2,"address": "london", "birthday":xxxx}
{"user_id":3,"address": "NY", "birthday":xxxx}
....
{"user_id":10000,"address": "NY", "birthday":xxxx}

关于google-bigquery - 从位置 0 开始的行中的 JSON 解析错误 : . 行大小大于:2097152,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37651143/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com