Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: How do I use parameters?

  1. #1
    Join Date
    Sep 2005
    Posts
    1,403

    Default How do I use parameters?

    ->>QUERY A

    DECLARE @D1 AS DATETIME, @D2 AS DATETIME
    SET @D1 = '?' Note: ? should be replaced with a date. 01/01/2000
    SET @D2 = '?' Note: ? should be replaced with a date. 02/01/2000

    SELECT A.BR, A.DEALNO, A.SEQ, @D1 AS DATEFR, @D2 AS DATETO, A.CCY, A.VDATE, A.MDATE,
    A.PRODTYPE, A.CCYAMT,
    ADB = ( ABS(A.CCYAMT) *

    -----------------------

    As you can see, I placed ?s so that they will be replaced by the parameters.

    My transformation looks like this...

    Add Constants -> DB Input (Using Query A) -> Dummy

    Add Constants contains
    Field Name: Date1 Value: 01/01/2000 (January)
    Field Name: Date2 Value: 02/01/2000 (February)

    both fields are type of DATE

    The problem is I cannot preview the data. It says, null pointer exception.

  2. #2
    Join Date
    Nov 1999
    Posts
    459

    Default RE: How do I use parameters?

    I think I found the problem and assume you use the 'Table Input' step.

    The preview button in this step returns null pointer exception when parameters are used (I open a Bug for this).

    Circumvention: Mark the step in the graphical view and do a preview here - this works.

    BTW: I think the select statement makes sense when you use the @D1 parameter in the where clause...

    Thanks for your feedback!

    Cheers,
    Jens

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.