Member since
01-21-2021
2
Posts
0
Kudos Received
0
Solutions
01-21-2021
09:20 PM
Got it.. I think. But, is this convoluted? [
{
"operation": "shift",
"spec": {
"namespace":"namespace",
"type":"type",
"name":"name",
"fields": {
"0": "&1[0]",
"1": "&1[1]",
"2": "&1[2]",
"3": "&1[3].fb1[0]",
"4": "&1[3].fb1[1]",
"5": "&1[4].fb2[0]",
"6": "&1[4].fb2[1]",
"7": "&1[4].fb2[2]"
}
}
}
,
{
"operation": "shift",
"spec": {
"namespace":"namespace",
"type":"type",
"name":"name",
"fields": {
"0": "&1[0]",
"1": "&1[1]",
"2": "&1[2]",
"3": {
"*": {
"$":"fields.[#3].name",
"@":"fields.[#3].fields"
}
},
"4": {
"*": {
"$":"fields.[#3].name",
"@":"fields.[#3].fields"
}
}
}
}}
] >> {
"namespace": "glmm.data",
"type": "record",
"name": "glmmobs",
"fields": [{
"name": "uid",
"type": "int"
}, {
"name": "user",
"type": "string"
}, {
"name": "job",
"type": "string"
}, {
"name": "fb1",
"fields": [{
"name": "fb1_a",
"type": "float"
}, {
"name": "fb1_b",
"type": "float"
}]
}, {
"name": "fb2",
"fields": [{
"name": "fb2_a",
"type": "int"
}, {
"name": "fb2_b",
"type": "int"
}, {
"name": "fb2_c",
"type": "string"
}]
}]
} thanks, Rao
... View more