
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DIFFERENCE BETWEEN INT AND INTEGER - How choose between these two types
Hi,
is possible that there is a difference in talend between int and integer values? and how i can choose what type the field is?
I have two integer field in two different jobs, one goes wrong if i compare the field with null values and the other instead work perfectly. How is it possible?
I find out this usefull links: https://community.talend.com/s/feed/0D53p00007vCqUFCA0
if anyone can explain better how these different type works.
thanks for your help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
one answer i find out is if the field is flagged as nullable the type will be integer, if the field is not flagged nullable the type will be int with not null management.
I don't know if this is a great thing because if in the source data the field stop to be primary key i can start to receive null values.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@EV89, if the data of the filed might exist null or empty value, you need to use integer, integer is an Java object, it will read the null value as null, otherwise, it will throw Java exception if you use Int type to read it. Below is an exception:
java.lang.RuntimeException: Value is empty for column : 'newColumn' in 'row3' connection, value is invalid or this column should be nullable or have a default value.
Regards
Shong
