Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: understanding parameters

  1. #1
    Join Date
    Oct 2012
    Posts
    5

    Lightbulb understanding parameters

    Hi All,

    I have created basic dashboards and looks good till now.

    Now I have added parameters for run time analysis. Here is what I did :

    1. Added simple parameter. name = "noofdays"
    2. Created a Select Component, daysselect. added to a panel.
    3. Create a value array. values are : 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. corresponding arg is same for array values.
    4. created "sql over sqlJdbc" component. Added all required values. Creates a simple query.
    5. created a bar chart for the query in #4. Worked like a charm
    6. Nof in "sql over sqlJdbc" component, used the parameter like below ("noofdays" is visible in parameters on the

    SELECT `a1`,count(`a2`)
    FROM `app_crd`
    WHERE `a3`='RECV'
    and `a4`='CONDITION'
    and where DATE_SUB(CURDATE(),INTERVAL ${noofdays} DAY) <= `datecolumn`
    group by `a1`

    When i check my logs, I see that ${noofdays} return null.

    How do i get the correct value?

    Thanks
    AJay

  2. #2
    Join Date
    Nov 2011
    Posts
    16

    Default

    Do you put your parameter in the chart's params and in the sql query params ?
    Alexandre Guglielmini, Devsys-inf2001 Programmer Analyst

  3. #3
    Join Date
    Mar 2011
    Posts
    257

    Default

    I suggest taking a look at the CDE tutorials. there is a sticky for them.
    You can download the first 2 chapters for free and it will give you a great start !

  4. #4
    Join Date
    Oct 2012
    Posts
    5

    Default

    Quote Originally Posted by alexgug View Post
    Do you put your parameter in the chart's params and in the sql query params ?
    This worked. Added the paramater to chat param. Then their value become available to sql query.

  5. #5
    Join Date
    Apr 2012
    Posts
    253

    Default

    Is value as Id set on the select? Is noofdays set as the parameter for the select? Other thing you can try is to do a query against dual, with id,value (2 columns) with [1,1], [2,2] etc.

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 - 2019 Hitachi Vantara Corporation. All Rights Reserved.