01-30-2024 03:41 AM
Lets say i have this input string in my mapper:
"Mercedes;6658;TypeS;2022;\r\nAudi;5558;TypeA8;2022;Diesel"
How can i save it to csv file as single rows? in this example it should be:
Mercedes;6658;TypeS;2022;
Audi;5558;TypeA8;2022;Diesel
I've tried myString.split('\r\n') it creates two strings which i can not export/save as file because its list, or these strings were comma separated and stored as one line in export file
Thank you for your help
Solved! Go to Solution.
01-30-2024 04:45 AM
01-30-2024 11:50 PM
Hi Alexandar, curious, if scenatio below is possible to do in snaplogic:
Scenario first row has fixed length 10 fields
"Audi";"5558";"TypeA8";"2022";"Diesel";"";test1;"";"";"Germany";
Second row has 5
"Mercedes";"";"TypeS";"2022";"India";
there can be empty space in both in first row and in second row as well. Is it possible instead of this:
"Audi";"5558";"TypeA8";"2022";"Diesel";"";test1;"";"";"Germany";
"Mercedes";"";"TypeS";"2022";"India";"";"";"";"";"";
get this? (get rid of empty fields(from field 6 to field 10)
"Audi";"5558";"TypeA8";"2022";"Diesel";"";test1;"";"";"Germany";
"Mercedes";"";"TypeS";"2022";"India";
thank you
02-01-2024 01:40 AM
Hello @SL12345,
Could you please try with the following sample pipeline?
In the Map - Fields Snap expression we have a filter that filters out the empty values.
Let me know if this helps you.
Regards,
Aleksandar.