16 digit string value is replacing the last digit as zero after Talend Load to mySql database.

Highlighted
Six Stars

16 digit string value is replacing the last digit as zero after Talend Load to mySql database.

Hello Folks,

 

Looking for some urgent help here with below issue.

 

In the Input file I have data like below for the field acct_ID.

84973032626808

74973032626807

 

The input file of .csv type and in talend work flow there is no formatting as such for this field.

 

But when this data loads into mySQl database it is replacing the last digit as zero and not the correct number.

 

What could be the issue and the fix for this?

 

Output: (wrong o/p)

84973032626800

74973032626800

 

Regards,

Deepak

 

Highlighted
Sixteen Stars
Sixteen Stars

Re: 16 digit string value is replacing the last digit as zero after Talend Load to mySql database.

Hi,

If no transformation on Talend side, maybe a before insert trigger on MySQL side.


TRF
Highlighted
Ten Stars

Re: 16 digit string value is replacing the last digit as zero after Talend Load to mySql database.

What is the data type for the acct_ID column in your schema?
Highlighted
Six Stars

Re: 16 digit string value is replacing the last digit as zero after Talend Load to mySql database.

String type
Highlighted
Six Stars

Re: 16 digit string value is replacing the last digit as zero after Talend Load to mySql database.

@TRF

 

Even if I output this to simple csv from talend it is doing the same.

 

Any modification to input field I need to do to avoid the replacement of exact value to zero. 

 

Regards,

Deepak

Highlighted
Sixteen Stars
Sixteen Stars

Re: 16 digit string value is replacing the last digit as zero after Talend Load to mySql database.

Incredible!!!

It sounds so strange, double check your job.

If already done, triple check it.

Can you also share your job design and maybe settings for principal components.


TRF
Highlighted
Six Stars

Re: 16 digit string value is replacing the last digit as zero after Talend Load to mySql database.

I am using Encoding as UTF-8,

no dynamic setting as such for input file and output file.

 

I have attached the design and metadata. Could you please check it.

Highlighted
Six Stars

Re: 16 digit string value is replacing the last digit as zero after Talend Load to mySql database.

But when I open with notepad++ the output field shows me correct format but not as normal csv it shows me wrong output replacing the last digit to zero.

 

And in MySQL also wrong output replacing the last digit as zero. 

 

I will try a trigger now before insert.

 

DELIMITER //

CREATE TRIGGER contacts_before_insert
BEFORE INSERT
   ON contacts FOR EACH ROW

BEGIN
END; //

DELIMITER ;

 

Regards,

Deepak

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog