Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: SQL Select + Send Mail

  1. #1
    Join Date
    Jun 2010
    Posts
    1

    Default SQL Select + Send Mail

    Hi,

    I have to check a DB with a SELECT on a regular basis. If the SELECT returns something I want to receive an email with the result of the SELECT.

    I was thinking of putting the SELECT in a Table/input step of a transformation and thes if the row count is grater than zero it would launch a Mail step.

    The problem is that I can't attach the rowset to an email and can't even make the mail step works. I have an error message saying that the Destination Field is not working.

    What would be the best way to proceed? Is the Transformation approach a good way to do it? Would the Job be a better way? How?

    I'm Using PDI 4.0.1 under Windows 7

    Thanks
    Last edited by Biggs; 09-27-2011 at 11:00 AM.

  2. #2
    Join Date
    Jun 2007
    Posts
    260

    Default

    If you are using MySQL then use SQL_CALC_FOUND_ROWS and SELECT FOUND_ROWS() so that you rub your query once.

    Otherwise you'll probably use both a job and transformation - Use the SQL Evaluate Rows step to get the count, then your transformation to get the result rows.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.