Issue with concatenate node joining different data types

Hi,

I am running into an issue where I have to concatenate 3 different data files
I am having an issue with one of the columns as each file has a different datatypes.
From File-1 it’s a double, File-2 it’s a date and File-3 it’s an amount with double having amount values.
When I use concatenate the data type changes to “?” and the amounts are not handled correctly

How can i fix this issue, i need the amounts to be shown correctly

Hi @chaithuj ,unless I’m misunderstanding it sounds like you have one column that is named the same on the three files but which actually represents different data.

I would suggest renaming the column from one of more of the data files prior to concatenation. Then, once they are concatenate you will have separate columns

If that doesn’t work for you, or doesn’t give you what you want, please can you tell us how you want to process the data since clearly a single column cannot be both Double and Date (hence KNIME treating it as an undefined data type).

If we know what you want to do, we can hopefully show you how to do it.

Also perhaps you can upload examples of the data in the three files.

2 Likes

Thank you @takbb,

I was able to rename after concatenate and changed to string and it worked.
It was able to save all the 3 datatypes.
It is a weird requirement that ha store 3 different data types into one column.
Can you please suggest a fix for below scenario,

Datatype string
stores date – no issues
saves amount – no issues
integer values : 1,2,3, are saved as 1.0.2.0,…
image

I ahve to change only the numbers to 1,2,3, etc without disturbing any other values

Hi @chaithuj , can you show the data in the individual files before you concatenate it.

Without seeing your input data I cannot easily say what you should be doing, but I think your best option is to resolve the Integer issue prior to concatenation if you really want this data all stored in the one column.

What type of files is your input data? Eg Excel, csv ?

1 Like

these are the data we are pulling from our database from 3 different tables/columns and data types.
Its little bit weird requirement that based on few conditions we fetch

  1. date
  2. No of years (1 to 100)
    3 Balance amount which is a double
    Then we combine all 3 sources to a single source so all these go to a single column when we concat

Historic Data.xlsx (10.6 KB

After concat if i change to string, the amount values become
20590.239999999998
20590.239999999998
20590.239999999998
I should only have double with 3 decimal places

or it becomes unreadble