Using data from a dataset in a Send Message scenario step. (Scenario Variables?)

I've built a project that determines a set of upcoming worker hires and sends an email (with an Excel attachment) to a group that begins working their access needs. I want to make the body of the email dynamic by adding a summary of the count of workers and the range of start dates.
I have that data in a separate, single row dataset.
I want to reference these values in the body of my email like this:
See attached spreadsheet containing <EmployeeID_distinct> upcoming provider starts between <Effective_Date_min> and <Effective_Date_max>.
I see that there's an available step to 'Define Variables' in the Scenario, but the documentation is really thin on how to do so.
Is this possible? If so, can anyone share the steps?
Operating system used: Windows 11
Answers
-
Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,467 Neuron
Indeed this can be done. This answer covers pretty much all of what you need to do. As you are using Cloud storage you will have to use metrics or move your dataset to a SQL compatible technology layer if you want to use SQL to retrieve the data in the scenario but I prefer to use metrics. You will need to create 3 different variables, one of each of your fields. You can ignore the conditional part of the post. Then use the newly defined variables in the Mail report or email step like this: ${variable}.
PS1: Your "Effective Date_max" column name has a space.
PS2: Your dates aren't dates, they are strings. If you want them to behave like dates use dates data types.