Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Hi fellow DSS users,
I have a scenario that currently triggers once a day - once when certain criteria are met, and again when they are no longer met. The first it great, working as I want it too, the second is unwanted and I would like to add some login so this second run doe snot happen.
I have tried to do this by creating a new Global variable:
"segment_trigger": "True"
And then adding this to be SQL trigger like so:
WHEN '${segment_trigger}' = "True"
AND ...
Then the final step in my scenario sets this value to "False":
My thinking is that my variable will be set to "True" every morning (I refresh my variables in another scenario), then after the scenario runs the first time the value will be "False", so the trigger will not fire the second time.
However, my scenario is STILL running twice a day. What am i missing? Is DSS resetting the value of segment_trigger to "True" every time I run a scenario?
Best,
Ben
Hi,
if the step where you set the variable to false is a "set global variables" one, then your flip-floping of segment_trigger has no reason not to work. You should check
A possible dirtier solution could be to set the scenario to inactive at the end of its run (using the python wrapper on the DSS public API) and set it to active again in your daily scenario.
Regards,
Frederic
Hi,
if the step where you set the variable to false is a "set global variables" one, then your flip-floping of segment_trigger has no reason not to work. You should check
A possible dirtier solution could be to set the scenario to inactive at the end of its run (using the python wrapper on the DSS public API) and set it to active again in your daily scenario.
Regards,
Frederic
Hi Frederic,
When you say:
(the '...' = "True" is strange, since double-quotes are used for identifiers in many DBs)
Are you suggesting that I should change this too WHEN "${segment_trigger}" = "True"
Ben
actually, I would expect '${segment_trigger}' = 'True' .
But that depends on the actual DB
The DB is BigQuery, I expect " to work, but I have changed to ' to see if there is any impact!