无法在德鲁伊中加载数据

时间:2018-07-17 08:39:46

标签: druid

我是德鲁伊的新手。尝试将JSON格式的非常简单的数据加载到druid。数据仅包含一个维度,一个度量和时间戳。我已经成功地能够将数据加载到其他数据集的druid中,但是以某种方式我遇到了该数据集的错误。 这是我的索引文件:

{
  "type" : "index",
  "spec" : {
    "dataSchema" : {
      "dataSource" : "datatemplate",
      "parser" : {
        "type" : "string",
        "parseSpec" : {
          "format" : "json",
          "dimensionsSpec" : {
            "dimensions" : [
              "Loc"
   ]
          },
          "timestampSpec" : {
            "format" : "auto",
            "column" : "Timestamp"
          }
        }
      },
      "metricsSpec" : [{"name" : "Qty","type" : "doubleSum","fieldName" : "Qty"}],
      "granularitySpec" : {
        "type" : "uniform",
        "segmentGranularity" : "day",
        "queryGranularity" : "none",
        "intervals" : ["2016-01-01T00:00:00Z/2030-06-30T00:00:00Z"],
        "rollup" : true
      }
    },
    "ioConfig" : {
      "type" : "index",
      "firehose" : {
        "type" : "local",
        "baseDir" : "datatemplate/",
        "filter" : "datatemplate.json"
      },
      "appendToExisting" : false
    },
    "tuningConfig" : {
      "type" : "index",
      "targetPartitionSize" : 10000000,
      "maxRowsInMemory" : 40000,
      "forceExtendableShardSpecs" : true
    }
  }
}

这也是我的JSON格式的数据集:

{"Loc": "A", "Qty": "1", "Timestamp": "2017-12-01T00:00:00Z"}
{"Loc": "A", "Qty": "1", "Timestamp": "2017-12-01T00:00:00Z"}
{"Loc": "B", "Qty": "2", "Timestamp": "2017-12-01T00:00:00Z"}
{"Loc": "B", "Qty": "1", "Timestamp": "2017-12-01T00:00:00Z"}

0 个答案:

没有答案