Tranquility 0.8.3 fails to start with JSON Flatten Spec

Hi,

I am using Tranquility 0.8.3 to push real-time streams. I need to push **nested **JSON objects and I have implemented using JSON Flatten Spec. Tranquility fails to start when root type field is specified. Stacktrace below.

Caused by: com.fasterxml.jackson.databind.JsonMappingException: Instantiation of [simple type, class io.druid.data.input.impl.StringInputRowParser] value failed: json can not be null or empty

at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.wrapException(StdValueInstantiator.java:405)

at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:234)

at com.fasterxml.jackson.databind.deser.impl.PropertyBasedCreator.build(PropertyBasedCreator.java:167)

at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:398)

at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1064)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:264)

at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:156)

at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:126)

at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer._deserializeTypedForId(AsPropertyTypeDeserializer.java:113)

at com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer.deserializeTypedFromObject(AsPropertyTypeDeserializer.java:84)

at com.fasterxml.jackson.databind.deser.AbstractDeserializer.deserializeWithType(AbstractDeserializer.java:132)

at com.fasterxml.jackson.databind.deser.impl.TypeWrappedDeserializer.deserialize(TypeWrappedDeserializer.java:41)

at com.fasterxml.jackson.databind.ObjectMapper._convert(ObjectMapper.java:2769)

… 29 more

``

Can you provide your tranquility spec?

Hi,

Here is the tranquility spec I am using.

telemetry-tranquility-server.json (6.5 KB)

There was a bug in JSONPathParser that was fixed in Druid 0.10.0, where even for “root” fields it tries to compile a path from the “expr” field: https://github.com/apache/incubator-druid/commit/151ff6d064d5ff36141f4ac5741111773ca2514b#diff-331c0b9aed8bb0b36ddd1f9801a1fc25

However, Tranquility is still built against an older version of Druid without that fix, so you’ll need to put a non-empty dummy value for “expr” on all of the “root” type fields.

Thanks Jonathan Wei. It worked after adding non-empty dummy value for “expr” on all of the “root” type fields.