Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Variable setting for Mail step works in Spoon, not in kitchen

  1. #1
    Join Date
    Oct 2017
    Posts
    6

    Default Variable setting for Mail step works in Spoon, not in kitchen

    Hello,

    I am on Pentaho 7. I have used variables quite heavily before. I have a batch of emails that need to be sent when certain things happen and I wanted to use the Mail Job step to send these emails out. The Mail Job step is quite nice because you can insert variables throughout the text in the Email message (essentially pulling data directly from the database).

    My problem:
    Works fine when I run from Spoon on my Windows machine.
    When I push it out to my Pentaho Linux box, the variables aren't taking. I have set a bunch of validation checks along the way and have found none of my variables are getting set.

    My structure:
    I have one master job that decides which people get to be emailed, they get pitched into the "email" job one by one. My first step in the email job is to set the variables for the email step itself.

    Anyone had a similar experience or able to point me in the right direction?

    Thanks,
    Dustin

  2. #2
    Join Date
    Aug 2016
    Posts
    279

    Default

    Where are the variables originating from? You need to log the variables step by step. Start with where it's created and move your way up to the destination.

  3. #3
    Join Date
    Oct 2017
    Posts
    6

    Default

    My variables originate in a transformation from a Table Input step. They are being set from data in a database. They don't get up to the job when I run in kitchen. I have a simple evaluation step that emails me if they aren't set. I have also tried adding another "sub-job" to send the emails, the variables also don't get down to the sub-job when run in kitchen (both scenarios work in spoon). I have the variables setup with the "valid in root job" option.

  4. #4
    Join Date
    Aug 2016
    Posts
    279

    Default

    The "problem" with Spoon is variables can sometimes live between executions and transfer between different jobs/transformations. If you want to test in Spoon, you need to close and re-open Spoon first. Every time you want to test those variables in spoon, you need to close the program and re-open again. Otherwise you have no guarantee the variables you see are not left-overs from a previous execution. You need to somehow isolate this problem, either by investigating exactly where the variable exists (for example verify the variable value exists in a field before being exported to variable). You can also try to make a test program just to make sure that you're able to export a variable. Can you make a test program first, which simply creates a single variable, send it to parent job and then log this variable in the parent job?

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 - 2017 Pentaho Corporation. All Rights Reserved.