I am trying to develop a job with different data flow for different markets.
So for example I have a job which has 2 sub jobs one for each market US and India. I need to pass market name to TAC for running that specific sub job. How is it possible to run job from TAC based on parameter passed to job?
Also which would be a better idea 1) creating a sub-job or 2) creating two separate jobs.
In your current use case, it is better to have 2 separate jobs if there is no dependency between the 2 jobs, i.e. one market should run before the other.
You define context variable for your master job. Then in TAC, you specify the value for the context variable as per the documentation https://help.talend.com/reader/uwwCVAHxWDS6l5fZQ~lVYA/fDSrWEDOmNp1gWJjavINdQ
Thanks for your input. I would like to explain in detail my requirement :
I have to get an consent for a customer. Now the consent logic is different for US and INDIA market. For US market consent is at customer level so if consent is false for one number then consent for all other number for same customer will be false where as INDIA market consent is at individual phone number in this case customer can have two phone number one opt-out and other opt-in.
In order to processed this data I will get customer and Consent for US market whereas Customer,phone number and consent for INDIA market. Now I want to run the flow or job based on whether phone number is available or not. If phone number is missing then run US market sub-job or US market Job, if phone number is available then run INDIA market sub-job or INDIA market job.
I am attaching a ppt to explain my requirement.
It depends on your dataflow. Are Customer, Phone Number and Consent columns in a file? Or are they different files?
You can have a Main job that receives Customer, Phone Number and Consent, and then check the availability of the Phone Number, and decide whether to run the US Market Logic or India Market Logic. I feel you can check the availability of Phone Number in a tMap if it is a column, or using a Run If trigger if it is a file. I don't see a need for context variable to decide what job to run here. And thus, in this case, you will have 1 master job that embeds the whole logic with subjob or child jobs. Subjob and child jobs are different terminologies in Talend jargon.