Bazaarvoice Jolt Generic Spec for multiple Kinds of Input JSON -
i new jolt. have 2 different set of input json of same structure except 1 object inside differs based on decider value below.
eg: input json 1
{ "input": { "decider": 1, "object1": { "object1info": 1 "obj1specificobj2" : { obj2info : "data" } }, "doc": { "docid": "doc100" } } }
eg: input json 2
{ "input": { "decider": 2, "object2": { "object2info": 2 "obj2specificobj3" : { "obj3info1" : "data1", "obj3info2" : "data2", "other" : { "otherdata" : "data3" } } }, "doc": { "docid": "doc100" } } }
output expectation if decider : 1
{ "out" : { "object"" : { "info"" : 1 "subobject" : { "subinfo" : "data" } }, "doc": { "docid": "doc100" } } }
output expectation if decider : 2
{ "out" : { "object"" : { "info"" : 1 "subobject" : { "subinfo1" : "data1", "subinfo2" : "data2", "other" : { "otherdata" : "data3" } } }, "doc": { "docid": "doc100" } } }
i want write generic single conditional jolt spec based on "decider" value output should generated. there way write conditional statement inside spec file....??
see https://github.com/bazaarvoice/jolt/issues/231
same question ask there.
Comments
Post a Comment