Skip to main content
Question

Send email with content that has been written to sql table

  • November 14, 2017
  • 2 replies
  • 84 views

Forum|alt.badge.img

Hi,

I am creating a workbench that executes an sql query (select query) and writes the results to an MS SQL table. I would like to write the contents to an email. I have used the shut down python script before (emailing after workbench has run successfully and writes the number of features written) but I cannot find resources in writing the contents of what has been written to the SQL table. I have four rows and with four fields that gets appended every time the workbench is run.

 

Is there a way to parse these values to the email?

Thank you.

2 replies

nielsgerrits
VIP
Forum|alt.badge.img+54
What version Workbench? I'm no Py expert but the Emailer Transformer should do the job fairly easy? Attachment or HTML.

Forum|alt.badge.img+2
  • November 14, 2017

Try the combination of FeatureWriter and SQLExecutor transformers. these can be used to write to your SQL Server database and then read back the rows you need and append them to an email using the Emailer transformer. There is an example of using FeatureWriter and Emailer in the article Using the FeatureWriter Transformer with your Database (featurewriter-final.fmwt). Not exactly your scenario, but it might give you some ideas.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings