Discover all of the brand-new features and improvements to existing capabilities in the Dataiku 11.3 updateLET'S GO

Attempting to send conditional email

Solved!
Ron_vB
Level 2
Attempting to send conditional email

Hello,

I am attempting to create an output email scenario where one email with a specific dataset attached will always send and a second email will send only if the dataset has output in it.

I attached a capture of how I currently have this set up but, I am thinking there maybe some Python script involved to fix this. Any help would be appreciated.

Thanks,

Ron

0 Kudos
1 Solution
JordanB
Dataiker

Hi @Ron_vB,

Can you describe which step you think you might be missing? Did you add the check to the dataset (status > edit > checks >  select "metric value is in a numeric range")? 

Screen Shot 2022-12-09 at 12.45.41 PM.png

Thanks!

Jordan

View solution in original post

0 Kudos
4 Replies
JordanB
Dataiker

Hi @Ron_vB,

You could use a python step, but a simpler way to achieve this would be to use a check on the dataset with a minimum record value of 1.

Screen Shot 2022-11-30 at 5.58.35 PM.png

Then, add a "run checks" step in the scenario. You will need to check "consider warnings as failures".

In the "send message" step, for the field "Run this step", you can add "if no prior step failed".

If the dataset has at least 1 record, the step will pass and the message will send. If the dataset is empty, the message step will not run.

Please let me know if this works for you.

Thanks!

Jordan

Ron_vB
Level 2
Author

Thank you for the response. I put a run check into the scenario but, I do not seem to have the same options as you. Am I running an older version maybe? 

0 Kudos
JordanB
Dataiker

Hi @Ron_vB,

Can you describe which step you think you might be missing? Did you add the check to the dataset (status > edit > checks >  select "metric value is in a numeric range")? 

Screen Shot 2022-12-09 at 12.45.41 PM.png

Thanks!

Jordan

0 Kudos
Ron_vB
Level 2
Author

Ahhh ha! Yes now I see what I was missing. Thank you that worked correctly!