special characters in table writer filename.

Hi Knime Team,

we have a requirement to create a table using table writer in the below path:

knime://knime.workflow/../../../../Current_Models_new/{}[]%=_510_5600_out10_diag_ana_10_dc40_1000hz_v.table

Below is the error message :

ERROR Table Writer 6:3626 Configure failed (IllegalArgumentException): URLDecoder: Illegal hex characters in escape (%) pattern - For input string: “=_”

Please let me know how to create a table using above mentioned path.

Hello @rajvenkatesh_k,

is this supposed to be your file name - {}[]%=_510_5600_out10_diag_ana_10_dc40_1000hz_v? If so then you have to replace % char with %25 as it seems it doesn’t get properly encoded. You can use String Manipulation node for it with replace() function (or String Manipulation (Variable) in case you have path in flow variable). Also there is urlEncode() function to be sure that all characters are properly encoded in such cases.

Additionally new KNIME version (4.4) features new Table Writer node which addresses this issue and above workaround probably won’t be needed.

Br,
Ivan

5 Likes

Hi @ipazin ,

Could you please help me to create the below file name using table writer?
knime://knime.workflow/../../../../Current_Models_new/{}[]?%=/_510_5600_out10_diag_ana_10_dc40_1000hz_v.table

I guess “?” and “/” are causing the problem here and tried the urlencode function which equals to %3F and %2F. Unfortunately it didn’t work.
[/quote]

Hello @rajvenkatesh_k,

what OS are you running on? Some characters can’t be part of file name. See list from Windows 10:

FileNameChars

And not that it’s any of my business but why are you naming your file like that?

Br,
Ivan

2 Likes

Thanks for the quick reply.

We are working on windows OS and our internal systems generate .table files from the column names. So we are evaluating all the possible characters that can be used in the Column names.

Regards,
Raj

Hello @rajvenkatesh_k,

ok. Then you should be fine as long as you don’t use characters that are not allowed on Windows :wink:

Br,
Ivan

3 Likes