โ10-26-2021 02:27 PM
Hello,
Say I have a .csv
with the following row:
value1_value2_value3_value4_value5
How can I split the string by โ_โ so each value can be mapped to its own field? I basically need to do stuff with each record, but through the Mapper I canโt seem to figure out how to accomplish this.
Mapping from: โvalue1_value2_value3_value4_value5โ
To:
โvalue1โ
โvalue2โ
โvalue3โ
โvalue4โ
โvalue5โ
Thank you in advance.
Best,
Izzy Babcock
Solved! Go to Solution.
โ10-26-2021 02:53 PM
Hello @izzy.babcock,
You can use .split() method in a mapper like this โ $row.split("_")
, this will create an array then you can simply map that value to the target path and after that use a JSON Splitter to split on the target path containing the array fields.
โ10-26-2021 02:53 PM
Hello @izzy.babcock,
You can use .split() method in a mapper like this โ $row.split("_")
, this will create an array then you can simply map that value to the target path and after that use a JSON Splitter to split on the target path containing the array fields.
โ10-26-2021 03:28 PM
thank you!