Dataset in Email Body

Options
sj0071992
sj0071992 Partner, Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Dataiku DSS Developer, Neuron 2022, Neuron 2023 Posts: 131 Neuron

Hi Team,

Can we use Data of any DSS table while creating Email body? Actually I want data(prepared in my DSS workflow) to be displayed in Tabular form in Email Body.

I am fine if i need to write any custom Python Code for it.

Thanks in Advance

Best Answer

  • Alexandru
    Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,209 Dataiker
    Answer ✓
    Options

    Hi,

    If I understand correctly you could use a Send Message scenario step and define the dataset to be added in the body of the email. PLease see the screenshot below:

    Screenshot 2021-10-14 at 10.15.44.png

    Let us know if this works for you.

Answers

  • sj0071992
    sj0071992 Partner, Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Dataiku DSS Developer, Neuron 2022, Neuron 2023 Posts: 131 Neuron
    Options

    Hi Team,

    Could you please help here

  • sj0071992
    sj0071992 Partner, Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Dataiku DSS Developer, Neuron 2022, Neuron 2023 Posts: 131 Neuron
    Options

    Thanks Alex, this solves my problem but can we get more structure to the output? As i can see there is no border and alignment is also not proper. How can we make it more readable?

  • Alexandru
    Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,209 Dataiker
    Options

    You should be able to use Freemaker to format you dataset https://freemarker.apache.org/docs/dgui_quickstart_template.html

    You can try something like this :

    <table border=1>
    ${variable_name}
    </table>

    In most cases sending it as an attachment directly may be more suitable instead of including this in the body of the email.

  • InnaB
    InnaB Dataiku DSS Core Designer, Registered Posts: 1 ✭✭✭
    Options

    Hey Alex,

    Is there any simple way to put the borders between the columns of the table, not just around the table, as in the example <table border=1> ${variable_name} </table>

    I would really appreciate your answer.

    Inna

  • mwmoren
    mwmoren Dataiku DSS Core Designer, Registered Posts: 5
    edited July 17
    Options

    You can using CSS. Here is an example.

    <html>
         
    <head>     
        <style media="screen">
            table {
                margin: 0 auto;
                border-collapse: collapse;
                border-style: hidden;
    
            }
            table td {
                padding: 0.1rem;
                border: 1px solid Gray;
            }
            table th {
                padding: 0.5rem;
                border: 1px solid Black;
            }
        </style>
    </head>
    
    ${Variable_Name}
    </html>
  • pc_1999
    pc_1999 Partner, Dataiku DSS Core Designer, Dataiku DSS Adv Designer, Registered Posts: 2 Partner
    Options

    How we can add the borders to this table in dataiku send email notification. Please refer the below mail screenshot for more details. If you look at the screenshot you will see the four tables attached but this format is not looking good. so can you help me how i can add borders to this variables.

  • swalker
    swalker Registered Posts: 3
    Options

    Hi all, simple question here

    How I can add a dataset's column in my mail body ${column_name} doesn't work. I thought I could add as a local variable but I don't know about the configs. Coould you please help out? Thanks.

  • mwmoren
    mwmoren Dataiku DSS Core Designer, Registered Posts: 5
    Options

    I don't know of a way to reference just a column from a dataset natively like you are wanting to. Best bet is to create another dataset with just that column in it and then pass that to the mail body.

Setup Info
    Tags
      Help me…