Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Stuck with basic variable operation

  1. #1

    Angry Stuck with basic variable operation

    Hi!

    I'm trying to create a simple transformation and run it from job.
    Name:  Clipboard02.jpg
Views: 74
Size:  8.9 KB

    The only thing (and main problem) is that I want to set file name as variable supplied by job
    Name:  Clipboard04.jpg
Views: 69
Size:  10.5 KB

    ..and how it's done in "Text file output"
    Name:  Clipboard06.jpg
Views: 72
Size:  25.0 KB

    When I run job, I see in "Write to log" step that variable value for FILE_LOCATION is assigned. But then I get an error in "Text file output" step:
    Code:
    2018/02/01 09:33:23 - Write to log.0 - FILE_LOCATION = c:\temp\export_file
    2018/02/01 09:33:23 - Write to log.0 - 
    2018/02/01 09:33:23 - Write to log.0 - row1 = 1
    2018/02/01 09:33:23 - Write to log.0 - row2 = 2
    2018/02/01 09:33:23 - Write to log.0 - 
    2018/02/01 09:33:23 - Write to log.0 - ====================
    2018/02/01 09:33:23 - Text file output.0 - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : Unexpected error
    2018/02/01 09:33:23 - Text file output.0 - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : org.pentaho.di.core.exception.KettleStepException: 
    2018/02/01 09:33:23 - Text file output.0 - File name field [${FILE_LOCATION}] couldn't be found in the input stream!
    What I did wrong? Why I can't use assigned variable value in "Text file output"?
    I attached .ktr+.kjb files
    test.zip

  2. #2
    Join Date
    Apr 2008
    Posts
    4,690

    Default

    If I guess that you're a programmer, would that be a good guess?

    Variables in PDI don't behave the way that most programmers expect. (Variables won't...)

    Put your ${FILE_LOCATION} in the filename box rather than telling PDI that it's a field.

  3. #3

    Default

    Thank you, gutlez!
    Sometimes obvious things is the hardest to get

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.