Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
sushantV
Creator
Creator

Extract FileName from tLogRow/tSortRow

am new to Talend and just trying to work my way through it. Have been trying to extract the most recent file from a list within a directory. Iterated through all the files, retained their properties in a buffer. Post completion of this sub-task, read through the buffer, sorted with descending mime, extracted the top record and was able to print it using tLogRow. All seems to be fine except I don't know how to use the filename now for next task. I am certain this is very rudimentary but I'll be honest, I've been scourging the internet/help from quite some time now, with no success. Any pointers would help. The job flow is attached for your reference.

 

All I need is a way to use the "abs_path" variable, which I can later use to process the file dynamically.

 

 

0683p000009LzFR.png

Labels (2)
3 Replies
Jesperrekuh
Specialist
Specialist

Good job buddy, almost there!!!
get the iterate to a tFileInputDelimited component and where you put the file path and name ... use CTRL+SPACE and scroll for the tFileList1.CURRENT_FILEPATH and thats it. Like you did with the tFileProperties...

Now I assume you want tBufferInput -> tFlowtoIterate -> tFileInputDelimited to process the files.


sushantV
Creator
Creator
Author

Thanks for responding.

Not sure if I followed your recommendation. Mind elucidating a bit? 

 

I can get all the needed information by my last node, as printed by the tLogRow. How do I pipe that to the tPositionalFile, is what I am confused about.

sushantV
Creator
Creator
Author

Finally fixed the issue (and simplified the flow a little more). Utilized the tFileList component, used the tIterateToRow to pipe the iterated list into tSampleRow. Kept one record and used tSetGlobalVar component to capture the needed variables.