sorry for the weird topic - couldn’t think of a better one. Situation
There are postings on a monthly base.
Postings may have a Tax Registration Number (TRN) or not (i.e., NULL / MISSING is a valid state).
Transactions are transferred to the KNIME workflow in 6 files of different structure.
Observation
The TRN is a string value that starts usually with two letters followed by 11 significant digits.
It may occur, that a TRN is a 13 digit number (no leading letters) - this is a valid state.
If a file contains only numerical TRN, KNIME sets “double” as type.
Challenge
In case KNIME sets the type to double, I need to cast this to string. Since the type may change from run to run, I need a kind of a ‘conditional’ cast.
Hi @Patrick1974,
did you try the Number to String node? It should do exactly what you want, the double values are turned into String values without any scientific formatting.
To do a “Conditional Cast” you could use a Column Splitter node with a type split:
nice idea, will try that one! Actually, I use the number to string node. However, in case KNIME identifies the column already as string, execution stops. That’s where your idea kicks in! I like your approach.