Checking csv file for ASCII Characters and getting java error

2 Looping_over_all_columns_and_manipulation_of_each.knwf (33.2 KB)

Hi,
I changed Column Rename Regex Serarch string from Master_id to RTN since I am using a new csv file.
Now when I execute the String Manipulation Node I get a Java error.

Any help is appreciated,
Scott

Hi Scott,

Depending on the file you are reading, some of the columns could be numeric. And the String Manipulation node works only on String columns. You can either filter out the numeric columns before the loop start or add the Number To String node before your String Manipulation node to make sure your ANONYMOUS_COLUMN is always string.

Best,
Temesgen

1 Like

Hi @sgilmour,

as mentioned in another reply if you are performing same manipulation over multiple string columns you can use String Manipulation (Multi Column) node to avoid loop. Check out this example on KNIME Hub: https://kni.me/w/BX714o2vw7uXGObl

Br,
Ivan

Yes I have a couple of Date fields and I am having issues with the format getting changed in my workflows.
The Date is currently setup as 2020-02-06 00:00:00 but sometime it is getting changed to a nuber such as 4378 or it adds the letter T 2020-02-06T00:00

2 Looping_over_all_columns_and_manipulation_of_each.knwf (33.2 KB)

When I import my xlsx file into the file reader it changes the dates from 2020-02-06 00:00:00 to 2020-02-06T00:00 Which happened in my other workflow but when I finish my workflow whether I use the CSV file or the Excel Sheet Appender it still has the T in the date. What can I do to have the date filed end up as 2020-02-06 00:00:00 at the end of my workflow when I create a XLS Sheet Appender or the CSV File.
Any suggestions will be appreciated.
Thanks
Scott

You can remove time portion using


or

to get rid of T.

Thanks I will try the second option. Should I add that before I convert it to a CSV File?

Hi @sgilmour,

this “T” in KNIME indicates it is Date&Time format and there are specific nodes to handle this kind of data. If you write it to Excel file it should be without this “T”. If you write it to CSV you will have letter “T” as CSV file contains no styling information and no data type information. So if you are writing data to CSV you need to use Date&Time to String node before CSV Writer node. Then you’ll have same format but only without “T” in KNIME and when you write it out to CSV.

Br,
Ivan

Hi Ivan,
The only issue I am having is the Date&Time to String is not being populated.
When I go to configure the Node my columns are not getting populated to the exclude area so I can select the two date columns to include.
Thanks
Scott

Hi @sgilmour,

not sure I understand and believe this is a bit off topic so can you open a new topic with more description, some printscreen and preferably with workflow example where your problem can be seen? See here how to share reproducible workflow example:

Br,
Ivan

1 Like