Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Sending Email from a Job based on the output of the transformation.

  1. #1

    Smile Sending Email from a Job based on the output of the transformation.

    Hi Everybody,

    I am new to kettle. I am trying to send an email from a job depending on the nature of the output of a transformation included in the job.

    That is,

    1. In my transformation,say transformation1, I have used Filter Rows to check a condition.

    2. As per the result(true/false) from the Filter Rows, I am able to perform two different steps in the transformation.

    3. What I need is, to send an email (based on the result(true/false) from Filter Rows).

    4. I am not trying to send the email from the transformation as I do not have an email field for my table.

    5. I need to send the email from the job just after completing the transformation1 and before executing transformation2.

    6. I need to know if there is any option to save the true or false result of filter rows and pass it to the next transformation or is there any other way to do this.??

    Thanks in Advance

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    If you dropped the idea of sending the mail from inside the transformation T1 only because the mail address is not part of the stream, you missed the point: The Mail step is designed to send a mail for each input row, while the Mail job entry is not.

    You can store the filter result sets as files or in-memory tables, so the Mail job entry may pick them up for attachment, and T2 can continue processing the already partitioned data.

    If you just want to store the test result you can do so in a calculated field - no filtering necessary in this case.
    So long, and thanks for all the fish.

  3. #3

    Default

    Thanks Marabu.. Yeah I know that the mail step in a transformation is designed to send an email for each input row but ain't it necessary to have email as one of the fields in the input stream.http://forums.pentaho.com/archive/in.../t-84549.html?

    However, I succeeded in sending an email based on the result of the filter row but as a job step.

    Actual purpose of transaction 1was to migrate data from an excel file to a table.
    And the purpose of the filter row was to stop this migration if the date values in the date field in the input stream is not matching with another specific date .
    And what I required was to send an email with the excel file as attachment when a date mismatch occurs.
    Now, what I did is, when a mismatch occurs instead of populating the table. the data is loaded into a text file.
    And in the next step the size of the file is evaluated and based on which an email is sent/not sent and then the file is deleted.

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.