tFileList on list of directories?

One Star

tFileList on list of directories?

Hi,
I have a job which starts by recursively parsing 1 directory and list all files therein.
But what if I want the tFileList to recursively parse not only 1 directory but - say - several (that I can ideally configure in a file)?
Thanks
Matt

Moderator

Re: tFileList on list of directories?

Hi Matt,

We have a jira issue about "recursivity in tFileList" https://jira.talendforge.org/browse/TDI-270.
For your job requirement, could you please set an example?

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tFileList on list of directories?

Hi,
sure. Here is the example. Let's say, I have this directory structure:

+--X

+--A
   +--AA
    +--AB
+--B
    +--BA
    +--BB
    +--BC
+--C
   +--CA


Let's assume, each subdirectory contains files. With tFileList, it would be really easy to traverse this entire tree recursively by simply pointing to the root of the tree: to X.
But let's now assume, I just want to traverse 2 directories: A + C
I would like to create a file into which I could enter the directories I wish to traverse:

/X/A/
/X/C/


And then find a way to use the tFileList component to point to this file and have it only traverse the directories listed in that file: A + C.
How can that be done?
Thanks
Matt

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog