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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
lmit
Creator II
Creator II

Sql execution

Hi all,

I have a set of SQL queries which I need to execute in talend and send the output to files
For initial load I have one set of queries and for incremental loaf other set of queries
Initial load queries should run only day one
Can you suggest any approach for this requirement

Thanks in advance,
Lmit
Labels (1)
5 Replies
TRF
Champion II
Champion II

What if you have a set of 3 context variables:

- dayOne set to true for 1rst time, false for other cases

- SQLDayOne SQL quesry for day 1

- SQLDayN SQL query for day n

Then you can decide which SQL query to use based on dayOne value:

context.dayOne ? context.SQLDayOne : context.DayN

Is that this kind of things you're searching for?

 

lmit
Creator II
Creator II
Author

Thanks for your reply

Sorry I didn't understood your logic .
Can you please elaborate a little bit more and we can't change dayOne context in production server

Thanks,
Lmit
TRF
Champion II
Champion II

The Idea is to have queries in context variables instead of hard code then into tour tSqlXxxx components. This way you can also adapt queries without changing the concerned jobs.
If you can't change context manually on Prod, your job can create a properties file in which you will put the value for the dayOne context variable (dayOne=false). Using tContextLoad when the job starts you can get the the value.
lmit
Creator II
Creator II
Author

Ok thanks for the explanation but I have a set of queries to execute not one.
On day one I have to execute more than 10 queries which means I have to create 10 contexts and 10 more for incremental load.
How do I execute these 10 queries?
thanks in advance,
Lmit
lmit
Creator II
Creator II
Author

Any suggestions?

Would be great help

Thanks in advance,
Lmit