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

 

7 REPLIES
Forteen Stars TRF
Forteen 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
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?
Six Stars

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

String type
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

Forteen Stars TRF
Forteen 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
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.

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