Dataset in Email Body

Solved!
sj0071992
Dataset in Email Body

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

0 Kudos
1 Solution
AlexT
Dataiker

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.

 

 

View solution in original post

7 Replies
sj0071992
Author

Hi Team,

 

Could you please help here

0 Kudos
AlexT
Dataiker

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.

 

 

sj0071992
Author

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?

0 Kudos
AlexT
Dataiker

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. 

0 Kudos
InnaB
Level 1

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
Level 2

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
Level 1

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.

0 Kudos