Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Variable with value $[0] not passed on: How do I solve this?

  1. #1
    Join Date
    Aug 2008
    Posts
    563

    Default Variable with value $[0] not passed on: How do I solve this?

    Hi,
    I am trying to set a variable with the value $[0] and use it in the succeeding jobs/transformations. This value doesn't get passed on. Do I have to escape it somehow?

    Please find attached an example that demonstrated this. I test this example also with a normal value and these ones get passed on.
    loop_variables_passed.zip
    Does somebody know how to solve this?
    Best regards,
    Diethard
    ===============
    Visit my Pentaho blog which offers some tutorials mainly on Kettle, Report Designer and Mondrian
    ===============

  2. #2
    Join Date
    Mar 2010
    Posts
    159

    Default

    I guess it probably needs an escape if possible. I checked with Slawo yesterday on the possibility of ${${varname}} dereferencing and it sounds like it can work - so the leading $ possibly in combination with the square brackets leads to something that the engine tries to dereference.

    I don't know if there are any provisions in the code for escaping variable values containing $.

  3. #3
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    $[00] means the zero byte. As mentioned in the post next-door you can specify hexadecimal values inside the square brackets.

    However, the assumption that you assign these values to a variables is wrong (I think). Perhaps a feature request in JIRA is in order. However, if anyone files one, please keep the use-cases a bit more simple. Diddy's example is a bit too much for me to look at right now ;-)

  4. #4
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    $[00] means the zero byte. As mentioned in the post next-door you can specify hexadecimal values inside the square brackets.

    However, the assumption that you assign these values to a variables is wrong (I think). Perhaps a feature request in JIRA is in order. However, if anyone files one, please keep the use-cases a bit more simple. Diddy's example is a bit too much for me to look at right now ;-)

  5. #5
    Join Date
    Aug 2008
    Posts
    563

    Default

    Thanks for your replies! I need the 0 byte only as a string to pass on to the CSV input step. I want to make my transformation more dynamic so that I can define the delimiter i.e. from the command line. It would be great if we could escape this.
    Best regards,
    Diethard
    ===============
    Visit my Pentaho blog which offers some tutorials mainly on Kettle, Report Designer and Mondrian
    ===============

  6. #6
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Actually, recursive variable resolution is already in place. I'm just saying I don't think it works for the hex values.

  7. #7
    Join Date
    Aug 2008
    Posts
    563

    Default

    Thanks for the clarification!
    Best regards,
    Diethard
    ===============
    Visit my Pentaho blog which offers some tutorials mainly on Kettle, Report Designer and Mondrian
    ===============

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.