【问题标题】:Mongo to Big Query Import IssuesMongodb 到 Bigquery 的导入问题
【发布时间】:2019-05-08 16:02:35
【问题描述】:

当从 mongo 导入到 big-query 时,会出现以下错误。我们有一个脚本,它从 s3 上的 mongo 转储中准备数据(大约 2.8GB),然后将其转换为“NEWLINE_DELIMITED_JSON”。

该脚本直到最近都运行良好,并且没有更改。

有人知道如何解决此问题并找到导致问题的文档吗?

"status": {
    "errorResult": {
      "message": "Error while reading data, error message: JSON table encountered too many errors, giving up. Rows: 41081; errors: 1. Please look into the errors[] collection for mor
e details.",
      "reason": "invalid"
    },
    "errors": [
      {
        "message": "Error while reading data, error message: JSON table encountered too many errors, giving up. Rows: 41081; errors: 1. Please look into the errors[] collection for m
ore details.",
        "reason": "invalid"
      },
      {
        "message": "Error while reading data, error message: JSON processing encountered too many errors, giving up. Rows: 41081; errors: 1; max bad: 0; error percent: 0",
        "reason": "invalid"
      },
      {
        "message": "Error while reading data, error message: JSON parsing error in row starting at position 2890606042: Parser terminated before end of string",
        "reason": "invalid"
      }
    ],
    "state": "DONE"

【问题讨论】:

  • 拥有一些您尝试导入的示例数据会有很大帮助
  • 您也可以查看邮件中提到的errors[] collection 的详细信息

标签: json mongodb google-bigquery


【解决方案1】:

小心您的数据。我遇到了同样的问题,结果发现一个字段有一个 NaN 值,这对于我们的应用程序(在 Python/TS 中)是可以的,但对于 BigQuery 却不是。

【讨论】:

    猜你喜欢
    • 2019-02-03
    • 2016-05-21
    • 1970-01-01
    • 2011-08-23
    • 2017-06-29
    • 1970-01-01
    • 1970-01-01
    • 2021-12-26
    • 1970-01-01
    相关资源
    最近更新 更多