how to seperate text file data into columns

I’m beginner to knime
I have a text file which contains data as follows
details.txt
{name:abc,rollno:123,class:10,phone:982747937}
{name:abc,class:10,phone:982747937}
i have seperated this data into columns with ,(comma) as separator
but at 2nd row i got error how to overcome this and i want to insert ? (showing that missing value) for rollno column in 2nd row without modifying original file with inserting ,

when i separated into columns i got in this way
col0 col1 col2 col3
name:abc rollno:123 class:10 phone:982747937
but i want
name rollno class phone
abc 123 10 982747937

You current file has irregular column structure. To avoid it, add coma for missed rollno. After you load file in KNIME it automatically marks empty fields with ?. As the next step you may separate headers from the data by Cell Splitter using : as separator.

1 Like

you are correct thats fine for 10 rows 15 rows to check up and keep comma but my file contains 1500 rows so is their any other way to do that other than manually keeping comma at all missed columns

Hello,
could you import an example csv or txt (few line input file)?

— Robert

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.