Scenario
![Music1392](https://us.v-cdn.net/6038231/uploads/Dataiku/nAvatar4.png)
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.
Best Answer
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,876 Neuron
Yes. Just make sure your SQL only changes the result on a monthly basis when you want it to run.
Answers
-
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?
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 1,876 Neuron
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.
-
Got it. Thank you