I use a Python Script (1 => 1) Node and sometimes the input table is empty. When this is the case a column that was Double before is suddenly a string.
Is there a way to retain the column types?
My solution was to use an empty table switch afterwards. If the table is empty I add a row with just 0.1, then use String to Number to convert the column I need in double to double and then drop all rows again. This results in the column being double again.
But I’m sure there is a better way, does somebody have an idea?
I created a workflow losing_keeping_column_types.knwf (17.9 KB) where the test-table in both situation (empty or not-empty, keeps the column type (a double). Is this what you are looking for?