tFileInputJSON failed when i changed a value in JSON data

Highlighted
Four Stars

tFileInputJSON failed when i changed a value in JSON data

Hi,

  I'm having an issue when I try to extract some values from a JSON data reading a file with  tFileInputJSON. The problem is that when i changed a value of the JSON data, tFileInputJSON doesn't extract the pk value. 

 

jobExtract_1.png

 

Successfull Case

 tFileInputJSON read the file with the JSON

{"pk":"2147422292","marketplace_pk":13,"shop_pk":1083925,"reference":"2147422292"}

 

The output shows that the value pk is extracted sucessfully.

[statistics] connected
pk
2147422292
[statistics] disconnected

---------------------------------------------------------------------------------------------------------------------

Failed Case

 tFileInputJSON read the file with the JSON (as you can see I only change the value pk, only that)

{"pk":"2147488276","marketplace_pk":13,"shop_pk":1083925,"reference":"2147422292"}

 

The output shows that the value of pk wasn't extracted, even when the structure is the same.

[statistics] connected
pk
[statistics] disconnected

 

For this case I got also the reject output which says

|pk | errorCode | errorMessage |
|=-+---------+---------------------------------------=|
|0 |null |For input string: "2147688276" - Line: 0|
'--+---------+----------------------------------------'

------------------------------------------------------------------------------------------------------------------------------

 

I did some test and from 30 different pk values, it only read 7, but I don't know why if is the same data and structure.

 

Can somebody help me to understand why is happenning this or if I'm doing something wrong?

 

Best Regards

Tags (2)

Accepted Solutions
Fifteen Stars TRF
Fifteen Stars

Re: tFileInputJSON failed when i changed a value in JSON data

Is your pk field defined as an integer?
In this case, value must be less or equal to 2,147,483,647.

TRF

All Replies
Fifteen Stars TRF
Fifteen Stars

Re: tFileInputJSON failed when i changed a value in JSON data

Is your pk field defined as an integer?
In this case, value must be less or equal to 2,147,483,647.

TRF
Four Stars

Re: tFileInputJSON failed when i changed a value in JSON data

Hi,

 

 You are correct, I forgot to check that. I change the type from Integer to String and now I get the date from all the PK values.

 

Thanks!!

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch 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

Best Practices for Using Context Variables with Talend – Part 3

Read about some useful Context Variable ideas

Blog