Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
1st flow : when month is given as march. only on that month this job should trigge
2nd flow : except march month .remaining month it should run
date input file. based on this date i have run the job
Requirement:
Quarter : mar,jun,sep,dec
client will give the input file as mar-17 based on that i want to trigger the flow
1.whenever the input file has month as mar then i want to run 1st flow and 2nd flowshould not run.
2.whenever the input file has month as jun,sep,dec then i want to run 2nd flow and 1st flow should not run.
so whole flow will be in single job. How to implement this
These are the steps you will need.....you will learn more by implementing them yourself using the online Talend documentation.
1) Identify the month. Use the TalendDate routines to help with this. Check out Java date formats to help translate the String date you receive.
2) Store this date in a context variable or the globalMap
3) Use a tJava as a base for your conditional logic
4) Connect RunIf links to your tJava and then to your respective SubJobs which process the data according to month. Use the value you stored in your context variable or globalMap to trigger the IF conditions. This post talks about RunIf links (https://community.talend.com/t5/Design-and-Development/How-to-use-Trigger-Run-If/td-p/3333)
These are the steps you will need.....you will learn more by implementing them yourself using the online Talend documentation.
1) Identify the month. Use the TalendDate routines to help with this. Check out Java date formats to help translate the String date you receive.
2) Store this date in a context variable or the globalMap
3) Use a tJava as a base for your conditional logic
4) Connect RunIf links to your tJava and then to your respective SubJobs which process the data according to month. Use the value you stored in your context variable or globalMap to trigger the IF conditions. This post talks about RunIf links (https://community.talend.com/t5/Design-and-Development/How-to-use-Trigger-Run-If/td-p/3333)
Not able to store date column in string format using context or global map.
can you explain me.
Thanks, got the month as per your logic.
But i can able to find the conitional logic.
this is my flow
got month as output in tjava
based on my tjava. i need to run the process separately.
Right click on the tJava and select "Trigger" and then "RUn If". Connect it to one of your SubJobs. Do this for each of your SubJobs. Then, to set the condition, click on the link and you will be presented with a space to put your conditional logic in the "Component" tab.
i ahve give the condition correctly. but before going to the condition it is failing.
1. only for if(order1) we have to give condition
2. for if(order2) no need to give condition?
@TRF is correct, but your problem is that you have a semicolon in the condition. Remove the semicolon and it should work