【问题标题】:BigQuery invalid JSONBigQuery 无效的 JSON
【发布时间】:2021-01-25 15:32:59
【问题描述】:

我正在尝试在 BigQuery 上导入一个小型 JSON 文件,但在上传过程中出现错误:Invalid field name "5527453". Fields must contain only letters, numbers, and underscores, start with a letter or underscore, and be at most 128 characters long. Table: popopo_5466c12e_eded_418b_b558_e6d53c8d0926_source。可能是什么问题?我检查了我的 JSON 的有效性,它是一个有效的 JSON 文件。

{
    "5527453": {
        "conversion_events": {
            "data": [{
                "id": "111972323",
                "name": "Website Adds of Payment Info"
            }, {
                "id": "111971323",
                "name": "Website Adds to Cart"
            }, {
                "id": "11197132",
                "name": "Website Purchases"
            }, {
                "id": "1119727",
                "name": "Forfait + Fixe 4p"
            }, {
                "id": "111972517",
                "name": "Fixe"
            }, {
                "id": "111972",
                "name": "Total Fixe"
            }, {
                "id": "111972514",
                "name": "Total Forfait"
            }, {
                "id": "11197251",
                "name": "Forfait"
            }, {
                "id": "11197251",
                "name": "Device RM"
            }, {
                "id": "111972",
                "name": "Total Device"
            }, {
                "id": "11197251",
                "name": "Device nu"
            }, {
                "id": "1119725",
                "name": "Forfait + Device"
            }]
        },
        "id": "3184292"
    }
}

【问题讨论】:

    标签: json google-bigquery


    【解决方案1】:

    字段只能包含字母、数字和下划线,以字母或下划线开头,长度最多为 128 个字符。

    因为您的 JSON 将作为表加载到 BigQuery 中,其中“5527453”是列的名称。 BigQuery 不允许仅包含数字的列名称,这就是错误消息所抱怨的内容。这里field 只是表示表格列。

    【讨论】:

      猜你喜欢
      • 2014-08-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-13
      • 1970-01-01
      相关资源
      最近更新 更多