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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Issue getting file lists out of tFileList into a table

Hi, I'm still pretty new to Talend and need some help with tFileList.

 

I am basically wanting Talend to read the contents of a directory and output the filenames of all the files into a data table.

 

To start I created a job to see if I could out the filenames to a tLogRow, so I did this.

 

tFileList_1 >> tFileProperties_1 >> tMap >> (basename column) >> tLogRow_1

 

tFileList  - Directory is set (using a context variable).

tFileProperties - "File" set to ((String)globalMap.get("tFileList_1_CURRENT_FILE"))

 

But my tLogRow output has NULL in the basename column.

 

Thanks

 

Steve

Can anyone tell me why?  I'm not a java developer (just a SQL developer).

 

 

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

change 

((String)globalMap.get("tFileList_1_CURRENT_FILE"))

to

((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))

Even though you identify the directory in the fileList you'll still need to specify the full path in the fileProperties

CURRENT_FILE is just the filename

View solution in original post

2 Replies
Anonymous
Not applicable
Author

change 

((String)globalMap.get("tFileList_1_CURRENT_FILE"))

to

((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))

Even though you identify the directory in the fileList you'll still need to specify the full path in the fileProperties

CURRENT_FILE is just the filename

Anonymous
Not applicable
Author

Thanks @evansdar 

How odd though.  It's quite misleading to have CURRENT_FILEPATH and CURRENT_FILE, and especially to then have CURRENT_FILE do absolutely nothing and CURRENT_FILEPATH show only the filename. Very odd