Hello everyone! I need a help in Jolt transform.
I have array, that consist from many json objects. (https://jolt-demo.appspot.com/ )
![1.png 1.png](https://community.cloudera.com/t5/image/serverpage/image-id/32908i03AE7131893EC43C/image-size/medium?v=v2&px=400)
[
{
"table_name": "table_vd",
"scratch_name": "l1_sample_1_1",
"scratch_order": 1
},
{
"table_name": "table_vd",
"scratch_name": "l1_sample_1_1",
"scratch_order": 34
},
{
"table_name": "table_vd",
"scratch_name": "l1_sample_2",
"scratch_order": 3
}
]
What transformation of Jolt needs to be done to get the following result?
![4.png 4.png](https://community.cloudera.com/t5/image/serverpage/image-id/32909i037C02409567F9FA/image-size/medium?v=v2&px=400)
Now i have next Jolt construction.
![2.png 2.png](https://community.cloudera.com/t5/image/serverpage/image-id/32910i104EDBBA5D9CF391/image-size/medium?v=v2&px=400)
[
{
"operation": "shift",
"spec": {
"*": {
"table_name": "table_name",
"*": { "@0": "data[0].&1" }
}
}
}
]
But the result is not correct.
![3.png 3.png](https://community.cloudera.com/t5/image/serverpage/image-id/32911i7EA60D5719F72342/image-size/medium?v=v2&px=400)