Submit your inspiring success story or innovative use case to the 2022 Dataiku Frontrunner Awards! ENTER YOUR SUBMISSION

Accessing Scenario\Trigger variables in a python custom trigger

indy2005
Level 3
Accessing Scenario\Trigger variables in a python custom trigger

Hi,

I am trying to send emails from custom triggers on the outcome of the trigger execution.  How can I access the variables available within the scenario to make the code more reusable, such as scenario and project name, next schedule execution time etc. 

 

Any advice appreciated.

i

0 Kudos
2 Replies
JuanE
Dataiker
Dataiker

Hello,

Could you please clarify what you are trying to do? You would configure sending the e-mails in a Mail reporter. You will then be presented with a list of variables you can use, like this:

mails.png

0 Kudos
indy2005
Level 3
Author

Hi

We dont have acess to the trigger logs (I believe the trigger logs are not available as part of the scenario logs).  We are writing custom triggers in Python.  So we are using pyhton to generate emails to tell us if the trigger (not the scenario) passed or failed.

I understand Reporters tells us at the end of a scenario run, and do not report out the success or failure of a trigger run.

So our python trigger, emails us based on the success or failure of the trigger. 

 I would like to include details in there about the project and scenarion being triggered using variables available at runtime on the context.

 

Regards

 

i

0 Kudos