Hi, I have a text file with school addresses and phone numbers sampled below. As you can see that the # of rows per record is not fixed. Otherwise I could use transpose node. Is there a way I can convert the rows to columns, having one row per record? Thank you!
Test School3
7639 W Dawl St
Tallahassee, FL 32304-3556
UNITED STATES
Test1 School
1234 Street Dr NE
Atlanta, GA 30322-0001
UNITED STATES
Phone: (999)999-9999(0)
Fax: (999)999-9999
Test2 Université
1234, ave de la Medecine
bureau 6745
Pavillon Ferdinand-Vandry
Quebec City, QC G1K 7P4
CANADA
Phone: 1232345432(0)
Fax: 1234327890
Here’s an example that should get you started. I’m assuming that the empty lines that you show in your example data are present in your actual data.
I used the line reader node to read the text file, making sure to go to the Advanced Settings tab and replace empty lines with a character that won’t appear in any of the text. In this case I used ‘|’.
The Transpose nodes turns this single column into a single row with multiple columns.
The Column Combiner node combines all these columns into a single cell, with the comma as the delimiter.
I then split this single cell into multiple columns using ‘,|,’ as the delimiter (from step 1)