Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
tale103108
Contributor III
Contributor III

How to load contexts from a file then execute job using context?

Talend 6.0.1
Windows 7
How can I load context from a file and then execute a job using that context but do so 1 row at a time?
Pseudo code
1. read 1 row from file
2. load context
3. execute job using context
4. repeat steps 1-3 until end of file
I do know how to load a context variable from a file.  It is the "loading one row at a time and executing a job" part that I am having issues with at the moment.
🙂

Labels (2)
2 Replies
Anonymous
Not applicable

You can use the component tContextLoad to load a context when you need it.
tFileInputDelimited --> tContextLoad
Setup the tFileInputDelimited with field separator "="
tale103108
Contributor III
Contributor III
Author

Thank you jlolling for your feedback.  However, as I mentioned in my initial post I know how to load context from a file.  I need to know how to (after loading a row into a context) call a job and then repeat the process for each row in the file.
For example:
File:
state=Alaska
state=Hawaii
state=Florida
the job should load the context "state" with "Alaska", then run a job that uses the context "state", then load the context "state" with "Hawaii", then run the same job again, and so on until the end of file.

If anyone has a solution, please include pictures of job and components as an example.

HTH