- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Nifi || Mail || Display csv files content in tabular format.
- Labels:
-
Apache NiFi
Created on
‎12-30-2019
12:08 AM
- last edited on
‎12-30-2019
12:11 AM
by
VidyaSargur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I have to display the records of csv file over mail body in tabular format using Putmail.
I am extracting records by executing sql which is scheduled at some duration and than forwarding the same using putmail to some specific users.
Can someone please tell me how to display the data of generated csv file in tabular format.
Created on ‎12-30-2019 09:50 AM - edited ‎12-30-2019 09:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To get it into a table, you need something like this:
<table><tr><td>
${'$1':replace(',','</td><td>'):replace('\n','</td></tr>\n<tr><td>')}
</td></tr></table>
and it should output an HTML Table like this:
<table><tr><td>
Release Cause</td><td>Previous Count</td><td>Current Count</td><td>Change_Ratio</td><td>SEVERITY</td>
</tr><tr><td>SIP: [487] Request Terminated</td><td>173</td><td>393</td><td>1.271676300578034682</td><td>Critical
</td></tr></table>
You may have to play with the last </td></tr> depending on if you have an empty line on bottom or not.
You may also have to adjust \n to \r\n again depending on the source file actual return chars (not seen they are hidden).
Created ‎09-30-2021 10:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes Sumita, it worked.

- « Previous
-
- 1
- 2
- Next »