You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to write a generic single conditional jolt spec which based on "decider" value output should be generated. Is there a way to write a conditional statement inside spec file....??
The text was updated successfully, but these errors were encountered:
then you can write a spec that has specific parts to handle each type of doc
Example Spec
[
{
"operation": "shift",
"spec": {
"input": {
"decider": {
"*": {
// match down to the "value" of the decider
// Then "grab" the whole from 3 levels up the tree
// and write it to the output with a path that
// contains the decider value
"@3": "docType.&"
}
}
}
}
},
{
"operation": "shift",
"spec": {
"docType": {
"1": {
// Do docType 1 stuff
"input": "out"
},
"2": {
// Do docType 2 stuff
"input": "out"
}
}
}
}
]
I am new to JOLT. I have 2 different set of input json of same structure except one object inside differs based on the decider value like below.
Eg: Input json 1
Eg: Input json 2
output expectation if decider : 1
output expectation if decider : 2
I want to write a generic single conditional jolt spec which based on "decider" value output should be generated. Is there a way to write a conditional statement inside spec file....??
The text was updated successfully, but these errors were encountered: