Scenario

Solved!
Music1392
Level 2
Scenario

Is is possible to set up a scenario to run monthly based on SQL change trigger? SQL change trigger will be based on system load date.

0 Kudos
1 Solution
Turribeach

Yes. Just make sure your SQL only changes the result on a monthly basis when you want it to run. 

View solution in original post

0 Kudos
4 Replies
Turribeach

Yes. Just make sure your SQL only changes the result on a monthly basis when you want it to run. 

0 Kudos
Music1392
Level 2
Author

Do you mean by changing run every (seconds) = 30 days*24*60*60? What if the month is 31 days? Then change the formula? Is there a more automated way/process like set the time-based as 1st of the month and sql change?

0 Kudos

No. Just write a SQL that returns the month name or number. That will change at the first day of every month wouldn’t? If you want a specific time on the first day of the month rather than midnight then write a SQL that does this:

- returns the current month name if the current date/time is >= 10am AND the current day of the month is >= than the first day of the month

- otherwise returns the previous month name 

The above SQL will result in a dataset change at 10am on the first day of every month. Scenario triggers in Dataiku are always evaluated separately so you can’t combine them. So you need to make the dataset change trigger work the way you want. 

0 Kudos
Music1392
Level 2
Author

Got it. Thank you