Survey banner
The Dataiku Community is moving to a new home! We are temporary in read only mode: LEARN MORE

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

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

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.

0 Kudos
mwmoren
Level 2

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.   

0 Kudos