Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
requirement: Split the input string of one column based on \n (new line character) and then capture first 5strings that are splitting earlier and then assign those 5strings to 5 different rows
How can do this
Actually I am reading a column which has n-number of strings with the new line character as a separator.
I need to read the whole string and then split the string based on newline character and then assign the 1st string to one output component and 2nd string to another output component and 3rd string to third output component.
Can do this in tmap? If yes can someone please share me the example. Or if there’s another approach please let me know with an example.
input column1:
data
mailing
details
output:
row1: Data
row2: mailing
row3: details
thanks in advance!
Hi
Try the tNormalize component, this component can be used to split the column value to multiple rows.
Regards
Shong
Hi @Shicong Hong I tried using tNormalize component and it didnt worked for me. In ITEM SEPARATOR i mentioned as "\n"
Can someone please help with the above issue
@S K, Which OS? I made a testing on Windows, read the file content as a string , the file has 3 row of data in it , I set the separator as "\r\n" on tNormalize component, see below.
Regards
Shong
where's the data are stored in real case? tfileInputRaw read the whole file content as only one row, tfileInputDelimited read the file line by line and the output data will not contain \n new line character.
tMap is not the right component used to split one row to multiple rows.