Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a series of Talend jobs that process a delimited file. The file itself can be from any of our 20 customers; it will always have the same schema and format, just a different location on our fileserver.
I've written the jobs to use context variables for the file location and file name, so they can be run against any customer file. Right now, I'm using a context within Talend that has file locations and names for 3 different customers (for development purposes). I'd like to store the locations and file names for all our customers in a separate file, so it is easier to update and edit. I was hoping to use tContextLoad for this, but the examples in the documentation use separate files for each context value, rather than one file with multiple values (for example, there is one context file for dev, one for stage, and one for prod); obviously, I don't want to have 20 different context files if I can avoid it.
Is there a way to have all my context values for each customer in one file, rather than 20 separate files, either using tContextLoad or another component? I'm using the licensed version of Data Integration.
Thanks,
David
TRF,
Thanks for the reply. I'll give it a try and let you know if I can get it to work.
TRF,
Your solution worked; thanks!
Here are screen shots of the Talend job and the tMap settings. Note that I needed to be able to control the tMap filter based on the actual context selected for the job; Talend has a variable named "contextStr" that returns the currently selected context name, so I filtered by that. That way, I can select the context at the job level (e.g. "customer1", "customer2") and have tMap filter by that and tContextLoad load the selected context from the file.