Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Backstory: I'm coming from FME and started using Talend since 4th of October, without a course. So bear with me 😉
Issue:
I'm reading a folder where there are 2 files, an XML and a PDF. The XML contains the metadata from that PDF (both have the same name).
Now I'm uploading that PDF with a tFileFetch but I want to pass the metadata directly with that request. Is that even possible with my job?
What I tried:
Here's my job
use on subjob ok from the tFileList component to the tHashInput
yes but you have to set one globalvar for one pdf so you have to process xml and pdf on the same iteration. here the iteration is only for the xml
so maybe you can do this , filelist on all xml files get the metadata values and the file name.
Stock it into a hash.
Then filelist on all pdf files make a lookup with the hash on the file name to get the pdf fields and metadata fields in the same flow then tFlowToIterate and filefetch
Now I got this:
I need to loop then?
I'll go work this out, tnx:)
also wich values will you stock in the pdf flow ?
cause if it's just filename so after you get the xml file metadata just check if the pdf exist (it's easy if they have the same file name) with a tFileExist and if it's ok filefetch with the values you got.
tFilelist -->iterate -->fileinput XML -->xmlMap--> tSetGlobalVar -->on component ok -->fileExist -->run if fileExist is true and globalvar from xml not null--> tfilefetch
I got it working! Thank you so much.
Here's the solution
use a run if link instead of on component ok between fileexist and filefetch, and control the value of the EXISTS var of tFileExist is true and if value of the metadata is not null on the run if link
My bad, it had an If. But had to rebuild my tFetch.
Thanks for noticing!