โ05-13-2019 02:26 AM
Hi Guys ,
I have below given json as input and i wanted to spilt it into difference rows based on multi valued columns .
Input: โCost_Center_Hierarchiesโ: [
{
โFucntional_Lvl4โ: โCC6140โ,
โF_Lvl_4_Descrโ: โCorporate - G&Aโ
},
{
โFucntional_Lvl4โ: โSF509โ,
โF_Lvl_4_Descrโ: โCorporate - G&Aโ
}
],
โBusiness_Unit_IDโ: โLOB0022โ,
โBusiness_Unitโ: โCorp LiveRamp Dedicated LOB BUโ,
โCost_Center_IDโ: โC6001โ,
โCost_Center_Nameโ: โC6001 Restructuringโ
output :
Row-1
โFucntional_Lvl4โ: โCC6140โ,
โF_Lvl_4_Descrโ: โCorporate - G&Aโ
โBusiness_Unit_IDโ: โLOB0022โ,
โBusiness_Unitโ: โCorp LiveRamp Dedicated LOB BUโ,
โCost_Center_IDโ: โC6001โ,
โCost_Center_Nameโ: โC6001 Restructuringโ
Row-2
"Fucntional_Lvl4": "SF509",
"F_Lvl_4_Descr": "Corporate - G&A"
"Business_Unit_ID": "LOB0022",
"Business_Unit": "Corp LiveRamp Dedicated LOB BU",
"Cost_Center_ID": "C6001",
"Cost_Center_Name": "C6001 Restructuring"
Please suggest.
Thanks,
Biksah
โ05-13-2019 06:39 AM
Hi Biksah,
You can use the Json Splitter snap. As per your example, in the Json Splitter snap for the field Json Path provide the value as $Cost_Center_Hierarchies[*], and select the Include scalar parents check box. Hope this is what you are looking for.