- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Showing table contents into Putemail Processor
- Labels:
-
Apache NiFi
Created 06-30-2023 08:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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,Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:
Created 06-30-2023 09:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks
Created on 06-30-2023 09:22 AM - edited 06-30-2023 09:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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,Community Moderator
Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:
