Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Problem passing parameter to mailstep

  1. #1

    Default Problem passing parameter to mailstep

    Hello all,

    I encounter a problem which i cant solve. In my JOB i want to mail reports to my employees.
    My job looks like this:

    First a transformation which only has a Table Input and a Copy Rows To Result. The query in the Table Input gives me the employee ID's from the employees.

    Next in my job another transformation. This transformation has Execute once per input row checked and passes the parameter EmployeeID.
    In this transformation a get rows from result starts an table Input with variabeles. So the table input executes once per EmployeeID.
    This al works fine. After the table input i execute a PRPT which i created in PRD. I give this PRPT a html output.
    This html output i store in a parameter so i can send it in the body of my email.
    This also works fine.

    But then,

    In this transformation i call a Job which must email the HTML to my employees.
    I pass the parameter ${html_body} which i use in the comment section of the mail step.
    I also pass the parameter ${EmailAddress} which i of course use in the MailTo section.

    But here the problems arrive.
    My ${html_body} is working correctly, but my ${EmailAddress} doesnt.
    The first email goes to the text ${EmailAddress} and the second email goes for example to: JoeyJonker@mail.com
    But the first mail has to go to JoeyJonker@mail.com!!!!
    So all my employees get the wrong mail.

    Any ideas??


    Thanks in advance!!

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

    Default

    Reason: Variable ${EmailAddress} is accessed before it is set. You're one off somehow.
    So long, and thanks for all the fish.

  3. #3

    Default

    Any idea how i can solve this?

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

    Default

    I don't have your KJB and KTR files for inspection and I don't know your Kettle version, either.
    If you provide a simple scenario for download you might get more help.

    Job-1 consisting of Trans-1 and Trans-2 where Trans-2 calls Job-2.
    Trans-1 having a Data-Grid providing 2 rows with field EmployeeID, followed by Copy-Rows-To-Result.
    Trans-2 having Get-Rows-From-Result, adding field EmailAddress derived from EmployeeID in a User-Defined-Java-Expression, eventually calling Job-2.
    Job-2 receiving parameter EmailAddress and Documenting it using Write-Log.
    So long, and thanks for all the fish.

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.