Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Help on variables

  1. #1
    Join Date
    Mar 2007
    Posts
    5

    Unhappy Help on variables

    Hi Guys,

    Can you help me what's wrong with my use of variables here. Its been days, reading the manual and the forums, I still can't get it to work. From report_sales_tc.ktr, I am trying to pass variables (var_month, var_day, and var_year) to a table input to filter a specific day. I have created the variables from report_init.ktr using set variable, but I can't seem to get the variables to work. Please help, thanks.


    P.S.

    I know that there are other ways to get my query to work without variables, but I just want to get the concept right. Hope somebody can help me.
    Attached Files Attached Files

  2. #2

    Smile Don't forget to generate row (as input)

    Try this..

    Samatar
    Attached Files Attached Files

  3. #3

    Default

    You should also change your JS (Number by integer)

    Nom champ Renommer en Type Longueur Précision
    var_day Integer 16 0
    var_year Integer 16 0
    var_month Integer 16 0

  4. #4
    Join Date
    Mar 2007
    Posts
    24

    Default

    I think your query should use "var_day", "var_month", "var_year" as its variables to check on, instead of ${VAR_DAY}, ${VAR_MONTH}, ${VAR_YEAR}.

    Regards,
    Sander

  5. #5

    Exclamation

    It depends how to name your env var (see picture).


    Samatar
    Attached Images Attached Images  

  6. #6
    Join Date
    Mar 2007
    Posts
    5

    Smile Thanks a lot!

    Hi guys!

    Thanks a lot! After running and reviewing the file given by shassan2, I was surprised how simple it was. Just needed a row generator to initialize the javascript step. Then it made sense.

    Thanks for your support!

  7. #7

    Default

    Yes,
    A trans deals with rows so you need first step that generate rows :-)

    generate (input) rows ---> transform --> output rows

    In general ,the transform step (ie JS) need input rows.

    Samatar

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.