trouble in designing dataschema


I have a lot of nested json event data,such as {‘uid’:‘267489’,‘attr’:{“t”:1450764493,“lv”:1450764493,“vn”:2,“ws”:“1598x709”}.

if I want to calculate the key ws in attr,How can I specify dimensionsSpec and metricSpec?

And what’s your advice here?Thanks!

Hi cooldage,

Druid isn’t currently capable of ingesting nested JSON events, but there are some upcoming features that may be useful to you:

  • Pretty flexible regex/javascript parser support, you can write a custom Javascript parser that can return the desired key-value map.

  • There is an upcoming JSON parser that can parse nested events

For now, I think you’ll have to pre-flatten your events though.

  • Jon

Thanks Jonathan Wei.I will try to write a custom Javascript parser firstly.

在 2015年12月22日星期二 UTC+8下午2:13:53,cool…@126.com写道: