Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: cannot replace variable when running with Kitchen.bat

  1. #1
    Join Date
    Feb 2014
    Posts
    1

    Default cannot replace variable when running with Kitchen.bat

    Hello All,

    I have developed a transformation which to get data from a DB (MS SQL Server) and then export to a CSV file. On both the "table input" and "Text file output" steps inside the transformation, I have used a variable calls "yesterday" in the where clause on the SQL on "table input" step and filename on "Text file output" step.

    The transformation works fine when I click the run button on PDI. Then I created a job to run this transformation, the job also works fine when I clicked the run button on PDI.

    However, I found it doesn't work when I execute the job with Kitchen.bat since I need to schedule this to run daily. The error I can see from the job is that the date's format is not correct so that DB engine can't covert it. I then check the actual SQL statements which the DB run using SQL Profiler, and I find that if I run the transformation or job inside PDI, the SQL statements is good but If I run via the Kitchen.bat, the variable in the SQL statement cannot be replaced. I got something like below:

    select * from tablea where lastdate = convert(date, '${yesterday}', 112)

    Can someone please help on this?

    The PDI i am using is 5.0.1-stable

    Thanks!!!

    Jor

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

    Default

    Maybe you call it a variable and it actually should be a named parameter?
    What does your kitchen command line look like?
    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.