09-11-2017 05:29 AM
I have a requirement, based on the column values I need to split the records
ID NAME
1 abc,def,ghi
2 jkl,mno,pqr
ID NAME
1 abc
1 def
1 ghi
2 jkl
2 mno
2 pqr
Need to convert columns to rows in Snaplogic. Kindly let me know for any suggestions? thanks in advance!!
09-11-2017 06:08 AM
please use group by N and try
09-11-2017 06:20 AM
I used “group by N”. after shift validation the error got resolved but unable to get proper result set.
please refer my below screenshot for reference.
09-11-2017 06:23 AM
IMO, this can be achieved in 3 steps:
Step 1. Split the Name on basis of comma.
Step 2. Create an array using map() with ID and NAME as key like below:
$array.map(x => {‘ID’: $ID,‘NAME’:x})
Step 3. Use json splitter.