Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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?
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.
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
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?
@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.
And execute the above as a subjob after the below on the event 'On Subjob Ok'
This way we are sure that the data has been written tot the hash before it is being read as lookup in tMap