Closed adityakonda closed 2 years ago
@milosimpson, I looked at the previous examples, none of them were helpful.
@adityakonda If you're operating with IDs, it's always a good idea to go for a map convention first. Try following approach:
[
{
"operation": "shift",
"spec": {
"authrzd": {
"*": {
"@": "data.@(authrzd_mbr_id)"
}
},
"authrzd_new": {
"enty_func": {
"*": "data.@(2,authrzd_mbr_id).enty_func.[]"
}
}
}
},
{
"operation": "shift",
"spec": {
"data": {
"*": "authrzd.[]"
}
}
}
]
THANK YOU SO MUCH @kubilayeksioglu ...!!! You saved my day :)... I have was wondering how will the update work, let say we have to replace the _authrz_new. authrzd_mbr_id.entyfunc with _authrz. authrzd_mbr_id.entyfunc.. Can you let me know how this works?
{
"primary_key": "101_ABC",
"authrzd_new": {
"authrzd_mbr_id": "102",
"enty_func": [
{
"enty_func_id": "10",
"func_typ": "VIEW - UPDATED",
"enty_typ": "EDIT_TEST - UPDATED",
"auth_acs_ind": "0",
"src_commit_ts": "20211028170625.689991"
}
]
},
"authrzd": [
{
"authrzd_mbr_id": "101",
"enty_func": [
{
"enty_func_id": "20",
"func_typ": "EDIT",
"enty_typ": "CONTACT",
"auth_acs_ind": "1",
"src_commit_ts": "20211028170625.689991"
}
]
},
{
"authrzd_mbr_id": "102",
"enty_func": [
{
"enty_func_id": "20",
"func_typ": "EDIT",
"enty_typ": "CONTACT",
"auth_acs_ind": "1",
"src_commit_ts": "20211028170625.689991"
},
{
"enty_func_id": "10",
"func_typ": "VIEW",
"enty_typ": "EDIT_TEST",
"auth_acs_ind": "1",
"src_commit_ts": "20211028170625.689991"
}
]
}
]
}
{
"primary_key": "101_ABC",
"authrzd": [
{
"authrzd_mbr_id": "101",
"enty_func": [
{
"enty_func_id": "20",
"func_typ": "EDIT",
"enty_typ": "CONTACT",
"auth_acs_ind": "1",
"src_commit_ts": "20211028170625.689991"
}
]
},
{
"authrzd_mbr_id": "102",
"enty_func": [
{
"enty_func_id": "20",
"func_typ": "EDIT",
"enty_typ": "CONTACT",
"auth_acs_ind": "1",
"src_commit_ts": "20211028170625.689991"
},
{
"enty_func_id": "10",
"func_typ": "VIEW - UPDATED",
"enty_typ": "EDIT_TEST - UPDATED",
"auth_acs_ind": "0",
"src_commit_ts": "20211028170625.689991"
}
]
}
]
}
@kubilayeksioglu @adityakonda Hi Guys, I am facing an issue related to Jolt, it seems some configuration issue to me. Its just simple conversion with spec file present on google cloud not in the project. Could you please have a look and help me. Below is the link for issue details: https://github.com/bazaarvoice/jolt/issues/1113
I'm new to JOLT, I'm stuck with this for 10 days. will really appreciate it if anyone can solve this puzzle.
PROBLEM STATEMENT: In the below input and expected output, if authrzd_new. authrzd_mbr_id matches with authrzd. authrzd_mbr_id then the enty_func must be moved to the matched authrzd_mbr_id
------ JSON INPUT
------ EXPECTED OUT
------ MY Work In Progress - JOLT SPEC