cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Email snap with both pipeline variables and HTML table?

wpenfold
New Contributor III

I need to produce an HTML email that includes both pipeline variable information in the HTML header and an HTML table that is a multiline error report. I can make one or the other work, but not both. The error report is being read from a database table. I want the email to look like:

Pipeline aaaa was run with parameters x, y, z

Error Report:

GUROUTP_LINE

POPULATION SELECTION EXTRACT
CONTROL REPORT PAGE 1

ERROR Parm 3 must be entered if 1 and 2 are
SQLCODE = 0000
SQL ERROR =
X01 ROLLBACK SQLCODE=0000
X01 COMMIT (1) SQLCODE=0000
SQLCODE = 0000
ORA-01403: no data found
DQY-ABORT ROLLBACK SQLCODE = 0000
ORA-01403: no data found

11 REPLIES 11

igormicev
Contributor

Hi @wpenfold

Youโ€™re probably close to your goal.

Make changes in your email sender snap like below:

attachments

I guess your Template body is OK, i.e. in the HTML you should have something like

...
<table> 
</table>
<br>
</body>
</html>

and before the email sender snap you should have a mapper like this one (note the $table object) that provides the $table:

table_mapper

That should be enough

/Igor

wpenfold
New Contributor III

It appears I can only use $list if the table is the only input to the email snap. If I try to union in the header data I need to include in the email, then the snap objects

wpenfold
New Contributor III

I created the table as you suggested ($list), but if I try to use it for table-data path, I get โ€˜Failure: invalid path, Reason: Snap failed unexpectedly and did not provide any reasonโ€™. Even though the output from the mapper seems goodโ€ฆ

[

{

โ€œjobโ€:

โ€œrorbpstโ€

โ€œone_up_noโ€:

3370175

โ€œexit_codeโ€:

0

โ€œoutputโ€:

โ€œORACLE_BASE environment variable is not being set since this\ninformation is not available for the current user ID snapuser.\nYou can set ORACLE_BASE manually if it is required.\nResetting ORACLE_BASE to its previous value or ORACLE_HOME\nThe Oracle base has been set to /u01/oracle/12.2.0.1/client\ndoing banner C programs\nโ€

โ€œwarning_messageโ€:

โ€œConnected.\nConnected.\nโ€

}

{

โ€œlistโ€:{

โ€œlineโ€:"\n"

}

}

{

โ€œlistโ€:{

โ€œlineโ€:" ELLUCIAN \n"

}

}

{

โ€œlistโ€:{

โ€œlineโ€:" POPULATION SELECTION EXTRACT \n"

}

}

{

โ€œlistโ€:{

โ€œlineโ€:" CONTROL REPORT PAGE 1 \n"

}

}

{

โ€œlistโ€:{โ€ฆ}

}

{

โ€œlistโ€:{โ€ฆ}

}

{

โ€œlistโ€:{โ€ฆ}

}

{

โ€œlistโ€:{โ€ฆ}

}

{

โ€œlistโ€:{โ€ฆ}

}

{

โ€œlistโ€:{โ€ฆ}

}

{

โ€œlistโ€:{โ€ฆ}

}

{

โ€œlistโ€:{โ€ฆ}

}

{

โ€œlistโ€:{โ€ฆ}

}

{

โ€œlistโ€:{โ€ฆ}

}

{

โ€œlistโ€:{โ€ฆ}

}

]

cstewart
Former Employee

@wpenfold It is certainly possible to both use the table data, and a set of other fields in the email template.
I have an email sender which uses $group for the table, and then goes on to use a set of other fields (my summary data) in a footer. Those other fields are at the root level in my input document.