Created 06-30-2023 08:04 AM
Hi there,
I got log table to show the row counts of various tables
However, I want to be able to create an email notification that contains the following:
id | count | TableName | UpdateDate | operation | total_count |
4162 | 1 | Table 1 | 15:44.8 | Insert | 1333 |
How can I make this happen. Do I require an updateattribute processor or can i connect directly from excecutesql processor to putemail processor
many thanks
Ranjit
Created 06-30-2023 09:08 AM
@TaxcalcRanjit Welcome to the Cloudera Community!
To help you get the best possible solution, I have tagged our NiFi experts @steven-matison and @cotopaul who may be able to assist you further.
Please keep us updated on your post, and we hope you find a satisfactory solution to your query.
Regards,
Diana Torres,Created 06-30-2023 09:13 AM
Thanks
Created on 06-30-2023 09:22 AM - edited 06-30-2023 09:24 AM
@TaxcalcRanjit I have a flow that demos how to take a CSV flowfile and format into html table. That flow is here:
https://raw.githubusercontent.com/cldr-steven-matison/NiFi-Templates/main/CSV_to_Table_Demo.json
In this example I am using GenerateFlowfile to send some CSV data to a ReplaceText to replace the , (commas) with html code for separating each column in the table (</td><td>), and end of line and new line with html to end each row and start another ( </tr><tr>). The end result is a full html table with the results of the csv as rows and columns.
You need to do something similar here to solve your use case to build the html source for your table's data. I am not sure if your upstream flowfiles are all lines in one flowfile or one flowfile per result. Either way you have to manipulate those flowfiles into html for the table structure matching your data Once the flowfile is formatted correctly as html, then you can send to PutEmail.
Created 07-03-2023 10:47 AM
@TaxcalcRanjit Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. Thanks.
Regards,
Diana Torres,