Specifies how to create segments and roll up data.
yes
Parser
If type is not included, the parser defaults to string.
String Parser
Field
Type
Description
Required
type
String
This should say string.
no
parseSpec
JSON Object
Specifies the format of the data.
yes
Protobuf Parser
Field
Type
Description
Required
type
String
This should say protobuf.
no
parseSpec
JSON Object
Specifies the format of the data.
yes
ParseSpec
If type is not included, the parseSpec defaults to tsv.
JSON ParseSpec
Field
Type
Description
Required
format
String
This should say json.
no
timestampSpec
JSON Object
Specifies the column and format of the timestamp.
yes
dimensionsSpec
JSON Object
Specifies the dimensions of the data.
yes
JSON Lowercase ParseSpec
This is a special variation of the JSON ParseSpec that lower cases all the column names in the incoming JSON data. This parseSpec is required if you are updating to Druid 0.7.x from Druid 0.6.x, are directly ingesting JSON with mixed case column names, do not have any ETL in place to lower case those column names, and would like to make queries that include the data you created using 0.6.x and 0.7.x.
This spec is used to generated segments with uniform intervals.
Field
Type
Description
Required
type
string
The type of granularity spec.
no (default == 'uniform')
segmentGranularity
string
The granularity to create segments at.
no (default == 'DAY')
queryGranularity
string
The minimum granularity to be able to query results at and the granularity of the data inside the segment. E.g. a value of "minute" will mean that data is aggregated at minutely granularity. That is, if there are collisions in the tuple (minute(timestamp), dimensions), then it will aggregate values together using the aggregators instead of storing individual rows.
no (default == 'NONE')
intervals
string
A list of intervals for the raw data being ingested. Ignored for real-time ingestion.
yes for batch, no for real-time
Arbitrary Granularity Spec
This spec is used to generate segments with arbitrary intervals (it tries to create evenly sized segments). This spec is not supported for real-time processing.
Field
Type
Description
Required
type
string
The type of granularity spec.
no (default == 'uniform')
queryGranularity
string
The minimum granularity to be able to query results at and the granularity of the data inside the segment. E.g. a value of "minute" will mean that data is aggregated at minutely granularity. That is, if there are collisions in the tuple (minute(timestamp), dimensions), then it will aggregate values together using the aggregators instead of storing individual rows.
no (default == 'NONE')
intervals
string
A list of intervals for the raw data being ingested. Ignored for real-time ingestion.