Execute job based on file name

Six Stars

Execute job based on file name

I am looking to automate some processes based on a files name. I have several jobs set up to execute on files within the same files. If I have a file names foo*.xls, I would like to run job fooManipulate. If the filename is bar*.xls, I am looking to run job barManipulate and so on and so forth. Is there a way to automate the process so that it iterates through each file in the folder and runs the correct job?


Accepted Solutions
Twelve Stars

Re: Execute job based on file name

on TAC Talend Administrtor Center you can add file triggers with mask to run your Job.

on Standalone add new job with tFileList with mask linked by iterationLink to the coresonding tRunJob. do not forget to set subjob context using globaMal("tFileList_x_CURRENTFILE").
good luck.

Francois Denis

Tag as "solved" for others! Kudos to thanks!


All Replies
Six Stars

Re: Execute job based on file name

Not exactly sure of your flow but have you tried tRunJob?

Ten Stars

Re: Execute job based on file name

 

The tRunJob has an option: dynamic job , you can use a context/global variable which you set runtime while using the tFileList to check for files.

 

 

Six Stars

Re: Execute job based on file name

You can always create a dynamic instance with context or globalMap

Twelve Stars

Re: Execute job based on file name

are you running on TAC or on a standalone jobs?

Francois Denis

Tag as "solved" for others! Kudos to thanks!

Twelve Stars

Re: Execute job based on file name

on TAC Talend Administrtor Center you can add file triggers with mask to run your Job.

on Standalone add new job with tFileList with mask linked by iterationLink to the coresonding tRunJob. do not forget to set subjob context using globaMal("tFileList_x_CURRENTFILE").
good luck.

Francois Denis

Tag as "solved" for others! Kudos to thanks!

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

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 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download