Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
ann-gaelle
Contributor III
Contributor III

tHmap return empty payload if the job is close and reopen

Hi everybody,

I have an issue with a job wich is doing several api calls to retrieve products data. The job works and give me the response I want but, when I close the job and then open it again, the payload of my final mapping is empty. I need to add a component to simulate a change of the input schema to rectify the behavior.

Here is the picture of the subjob giving me difficulties.

0695b00000SrqEGAAZ.pngThis subjob take back the previous response of an API Call with "tFixedFlowInput_1", the response is a json string with some dynamic fields so the tHMap "Undynamising2" undynamised it. After that I need a tFilterColumns, just to have a main row as output of the mapping and send the data in tHmap5 with a look_up row.

I do, too, a call to the same API, to retrieve other data. I only keep the column "string" with a tFilterColumns_2. The string is a json string with dynamic field to. I get it undynamised. And then I sent it to tHMap_5.  It loops the two json string together.  Then I display the output.

The thmap which is giving me some problems is the "tHMap_5".  When I ran the first time my job, there was no problem, the mapping was working, so everything was great. However, when I closed my job and opened it again, the mapping "tHMap_5" returned an empty payload even if empty payload is disabled ...

And I found out that if I had a tlogRow between "" and "tHmap5", and then change the schema (like deleting the string output and putting it back), the mapping is working again. Let me show you, what I mean :

I closed my job, and when I run it here is the result :

[statistics] connecting to socket on port 3590

[statistics] connected

{}

{}

{}

{}

[statistics] disconnected

So I add a tlogrow between "GetProducts_Undynamised" and "tHmap_5" to make appear a warning about connection synchronisation, I close it without doing anything so normally it doesn't change my thmap_5.

0695b00000SrqEcAAJ.pngBut when I run my job again, I have the payload I want. As you can see here, there is no empty payload anymore :

0695b00000SrqFGAAZ.png

(The one beginning with "items" is the output of my tHMap_5).

I think something isn't set well in my thmap_5 connection after comparing java code of the job when it works and when it doesn't.. And I searched on the forum and talend documentation, but I didn"t find what could it be...Sorry If I missed it.

Here is the part about tHMAP_5 changing :

0695b00000SrqFpAAJ.png

This is the configuration of my tHMap_5 on data mapper :

0695b00000SrqFVAAZ.pngI try to add an entry representation, but it didn't resolve my issue.

And here is the configuration on the component view.

0695b00000SrqFzAAJ.png0695b00000SrqG4AAJ.png

I just disabled the empty payload in the component parameters.

I apologize for my approximative English and the French words on some screenshot that can be confusing,

Thank you for your time,

Labels (3)
1 Solution

Accepted Solutions
ann-gaelle
Contributor III
Contributor III
Author

I resolved the problem, by re-making my job from scratch the same way. I think some component I added and deleted after created the issue. No idea wich one.

View solution in original post

1 Reply
ann-gaelle
Contributor III
Contributor III
Author

I resolved the problem, by re-making my job from scratch the same way. I think some component I added and deleted after created the issue. No idea wich one.