Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Tmap does not allow lookup input

For this job, I am using a MSXML input to parse an XML file into 3 output tables. I am trying to retrieve the full node for Status and Event information, so I used a  tfileInputXML tool and selected "get nodes".

However, when I try to join the status and event node string fields back into the first output branch, I am not able to add the STATUS_EVENTS output as a lookup to the tmap.

 

I have tried using a tHash to break up the flow into another input, and have tried a tJoin instead of a tMap, but have not found a solution. Does anyone know why I cannot connect these inputs?

0683p000009M9tl.png

Labels (4)
5 Replies
nivedhitha
Creator III
Creator III

@shusted3 ,

 

Yes, you will not be able to connect the output as a lookup to tMap as it forms a loop and Talend doesnt allow that. however passing the output to a Hashoutput or BufferOutput and using that as a lookup should work. Can you provide screenshots of your job where you tried using hashoutput? 

Anonymous
Not applicable
Author

Thanks @nivedhitha,

Here I tried to use a tHashOutput, but I am still not able to connect the output to the tmap as a lookup.0683p000009M9u0.png

nivedhitha
Creator III
Creator III

@shusted3 ,

Yes this wouldn't work because the loop is still there.

You will have to disconnect tHashOutput and tHashInput and just connect the hashoutput to tMap

 

Anonymous
Not applicable
Author

Ok, with the tHash components disconnected I can use the output as a lookup. However, I'm now getting an error that the "Exception in component tHashInput_1 (LZ_EN_LP_WITH_REG)
java.lang.RuntimeException: The hash is not initialized : The hash must exist before you read from it"

 

@nivedhitha Is there a way I can ensure the tHashOutput creates the file before it's read by tHashInput without creating a loop?

0683p000009M9u5.png

nivedhitha
Creator III
Creator III

@shusted3 , Okay i thought that could be an issue.

One way to overcome this is to move everything after the tFileList component to a child job and pass the file name or whatever is needed.

 0683p000009M9cI.png

 

And execute the above as a subjob after the below on the event 'On Subjob Ok'0683p000009M9b6.png

This way we are sure that the data has been written tot the hash before it is being read as lookup in tMap