Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Note: You may notice some temporary visual or styling issues in the Community. Our vendor is actively investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Darmesh
Contributor III
Contributor III

How to start the job based on month

0683p000009LybH.png1st flow : when month is given as march. only on that month this job should trigge0683p000009LybM.png2nd flow : except march month .remaining month it should run0683p000009LybR.pngdate 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

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

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)

View solution in original post

7 Replies
Anonymous
Not applicable

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)

Darmesh
Contributor III
Contributor III
Author

Not able to store date column in string format using context or global map.

can you explain me.

Darmesh
Contributor III
Contributor III
Author

Thanks, got the month as per your logic.

But i can able to find the conitional logic.

this is my flow

0683p000009LyRT.png

0683p000009LyQH.pnggot month as output in tjava

 

based on my tjava. i need to run the process separately.

Anonymous
Not applicable

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.

Darmesh
Contributor III
Contributor III
Author

0683p000009Lybb.png0683p000009LyVo.png0683p000009Lybg.png

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
Champion II
Champion II

As there is no "Else" trigger, the condition is required for each "If" trigger.
Anonymous
Not applicable

@TRF is correct, but your problem is that you have a semicolon in the condition. Remove the semicolon and it should work