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.