Loading json data with optional keys (variable schema)


Hopefully a quick question, can you load json data into druid where certain keys may be present or not?


{ “firstName”: “John”,
“lastName”: “Albert”,
“dateOfBirth”: “1972-10-12”,
“dateOfDeath”: "2014-12-23}

{ “firstName”: “Jane”,
“lastName”: “Green”,
“dateOfBirth”: “1990-09-03”}


(in the above dateOfDeath is missing).

I am hoping to load streaming data from kafka, with a similarly variable schema to the above - do I have to ensure all records have the same keys i.e where source keys are not present, create the keys and make the values null?

Thanks for your help