Is ingestion without time possible?

Good morning everyone,

Benchmarking few technologies for data visualisation, I’ve to load my data into druid to try stuff. However, they are datasets without time column, and I encountered a lot of issues regarding the ingestion file…

I saw a lot of documentation, but that remains pretty dark to me. So, I’m trying to ingest a test-json as follow. I hope I will be able to write the ingestion spec of my sets once I succeed to ingest this one. Could you help me to find my mistakes in the ingestion specs ?

Thank you in advance

json :

{
  "id": 1,
  "name": "Foo",
  "price": 123,
  "tags": [
    "Bar",
    "Eek"
  ],
  "stock": {
    "warehouse": 300,
    "retail": 20
  }
}

Ingestion file :

{
  "type" : "index_hadoop",
  "spec" : {
    "ioConfig" : {
      "type" : "hadoop",
      "inputSpec" : {
        "type" : "static",
        "paths" : "/user/user/essai.json"
      }
    },
    "dataSchema" : {
      "dataSource" : "essai",
      "granularitySpec" : {
        "type" : "uniform",
        "segmentGranularity" : "day",
        "queryGranularity" : "none",
        "intervals" : ["2015-09-12/2015-09-13"]
      },
      "parser" : {
        "type" : "hadoopyString",
        "parseSpec" : {
          "format" : "json",
          "dimensionsSpec" : {
            "dimensions" : [
			  "name",
			  "tags",
			  "stock"
            ]
          }
        }
      },
      "metricsSpec" : [

		{
          "name" : "id",
          "type" : "longSum",
          "fieldName" : "id"
        },
		{
          "name" : "price",
          "type" : "longSum",
          "fieldName" : "price"
        },
		{
          "name" : "warehouse",
          "type" : "longSum",
          "fieldName" : "warehouse"
        },
		{
          "name" : "retail",
          "type" : "longSum",
          "fieldName" : "retail"
        }
      ]
    },
    "tuningConfig" : {
      "type" : "hadoop",
      "partitionsSpec" : {
        "type" : "hashed",
        "targetPartitionSize" : 5000000
      },
      "jobProperties" : {}
    }
  }
}



Hi Korge,

You can include a “missingValue” : “2000-01-01” (or whatever) in your timestampSpec in order to ingest data without a timestamp. However I would also keep in mind that Druid is designed for time-oriented data and has a number of optimizations and features there that wouldn’t apply if all of your rows had the same timestamp.