Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Add sequence - Table input

  1. #1

    Default Add sequence - Table input

    Hi,

    I need a counter for a SQL query.

    I would like to do something like this:

    A Table input step with this query:
    SELECT * FROM test WHERE start >= ${INTEGER} AND end <= ${INTEGER}

    And ${INTEGER} should come from the Add sequence step.
    I dont know how to pass the output of the Add sequence step to my SQL query.

    Can you please help me out?

    Thanks,
    Dirk

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

    Default

    Feed 2 values in the "Table Input" step and write:

    SELECT * FROM test WHERE start >= ? AND end <= ?

    By the way, logically, if the 2 values are the same you can write:

    SELECT * FROM test WHERE start = end

  3. #3
    Join Date
    Sep 2009
    Posts
    810

    Default

    Hi guys,

    here's a sample that works for me.. just in case you're not sure how to "Feed" fields into a Table Input step

    Cheers

    Slawo
    Attached Files Attached Files

  4. #4

    Default

    @Matt,

    can you please take a look at my transformation, I cant get 2 Add Sequence steps to work. I tried to understand why and looked at the Add Sequence examples, but it confuses me.

    @Slawo,

    thanks, your workaround with the calculator step works like a charm!


    Dirk
    Attached Files Attached Files

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

    Default

    Nope, sorry.

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.