One Star

How to change/reconcile data "Type" in data integration?

Hi, first time using Talend, working with MySQL input and output sources
a) I notice that when I look at the schema there are both DB Type and Type columns. I don't recognize the Type column entries; they include values like "long", "float", "Byte" and "String"
b) When I try and run my debug I get a number of "Type mismatch:" errors, a couple of which look like this:
cannot convert from String to Integer
cannot convert from long to Integer
Now it looks to me that some of these source and target data types are the same as far as "DB Type" is concerned, but not in the Schema editor, which looks like it's using the "Type" column
Basically, I need a better idea of what's going on here and how to reconcile these things.
So far I've watched a couple of YouTube videos and also looked at the tConvertType support page, but I'm still not understanding how this works and what I need to do to get this data from one table to another when the data already seems to be in a compatible format.
...At least in some cases; for other columns they legitimately need a transformation to be done to get them in the proper new data type/format. This will be the next challenge once I get through this one
Thank You Smiley Happy I'm hoping it will all become clear soon enough
3 REPLIES
Community Manager

Re: How to change/reconcile data "Type" in data integration?

Hi
Talend Studio is Java code generator, the values like "long", "float", "Byte" and "String" in the Type column of schema are the Java data types, you could understand them better if you have some Java knowledge. The type of one column should be the same in the input and output component, if not, you need to convert explicitly the value from input type to output type, for example, I convert the value from String to Integer on tMap, as showed in my screennshot.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: How to change/reconcile data "Type" in data integration?

Ok, so I will need to use the expression builder to change the data type then?
Community Manager

Re: How to change/reconcile data "Type" in data integration?

Ok, so I will need to use the expression builder to change the data type then?

You can tConvertType component or use the expression builder with Java code to change the data type.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business