Member since
12-10-2024
3
Posts
2
Kudos Received
0
Solutions
12-11-2024
08:59 PM
Hi Samsal, Firstly I want to thank you for taking your time in solving my query. The solution you provided worked like a magic. Secondly, yes I am new to this platform and also for JOLT, moving forward I will follow your tips and suggestions and will go through the courses which you've shared. Once again thank you for your valuable assistance. It made a significant difference. I am grateful.
... View more
12-11-2024
01:03 AM
1 Kudo
Hi @VidyaSargur , Thank you so much!
... View more
12-10-2024
09:13 PM
1 Kudo
Hi guys, I want to convert Nested JSON to Flattened JSON using JOLT transform. Nested JSON: { "data": { "getBusinessRelationListing": { "edges": [ { "node": { "id": "1964730", "name": null, "code": "CN02", "bejoCompany": true, "legacyVendorId": [], "locatonType": [ "Commercial" ], "countries": [ { "locationCountry": "CN", "countryCode": "CN", "name": "China", "parent": { "shortCode": "AMEA", "name": "Africa & Middle East & Asia" }, "region": "" } ] } }, "node": { "id": "1964732", "name": null, "code": "CZ01", "bejoCompany": true, "legacyVendorId": [], "locatonType": [ "Commercial" ], "countries": [ { "locationCountry": "CZ", "countryCode": "CZ", "name": "Czechia", "parent": { "shortCode": "EU", "name": "Europe" }, "region": "NH" }, { "locationCountry": "SK", "countryCode": "SK", "name": "Slovakia", "parent": { "shortCode": "EU", "name": "Europe" }, "region": "NH" } ] } } ] } } } I am using this JOLT Spec: [ { "operation": "shift", "spec": { "data": { "getBusinessRelationListing": { "edges": { "*": { "node": { "id": "[&2].Id", "code": "[&2].BusinessRelation", "name": "[&2].BusinessRelationDisplayName", "countries": { "*": { "locationCountry": "[&4].LocationCountry", "parent": { "name": "[&5].LocationCountryName", "shortCode": "[&5].LocationRegion" } } } } } } } } } } ] It is giving output in this format: [ { "BusinessRelation" : "CN02", "BusinessRelationDisplayName" : null, "Id" : "1964730", "LocationCountry" : "CN", "LocationCountryName" : "Africa & Middle East & Asia", "LocationRegion" : "AMEA" }, { "BusinessRelation" : "CZ01", "BusinessRelationDisplayName" : null, "Id" : "1964732", "LocationCountry" : [ "CZ", "SK" ], "LocationCountryName" : [ "Europe", "Europe" ], "LocationRegion" : [ "EU", "EU" ] } ] But I want output in the below format: [ { "BusinessRelation" : "CN02", "BusinessRelationDisplayName" : null, "Id" : "1964730", "LocationCountry" : "CN", "LocationCountryName" : "Africa & Middle East & Asia", "LocationRegion" : "AMEA" }, { "BusinessRelation" : "CZ01", "BusinessRelationDisplayName" : null, "Id" : "1964732", "LocationCountry" : "CZ" , "LocationCountryName" : "Europe", "LocationRegion" : "EU", } , { "BusinessRelation" : "CZ01", "BusinessRelationDisplayName" : null, "Id" : "1964732", "LocationCountry" : "SK" , "LocationCountryName" : "Europe", "LocationRegion" : "EU", } ] I'm new to JOLT. Please help me thank you
... View more
Labels:
- Labels:
-
Apache NiFi
-
Cloudera Search