Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Different Database Access and table input execution problem

  1. #1
    Join Date
    Dec 2013
    Posts
    4

    Exclamation Different Database Access and table input execution problem

    Good Morning everyone.

    I have a problem with some steps and need your help to figure it out what will be the best way to build a transformation I'm trying to create. Im unexperienced using this tool.

    From a properties file I read 2 variables, one of them indicate me to which database I have to connect (I have 10 different databases with same structure but each of them have different data, all of them under MySQL Server), so for this step I have a switch case that depending of the value, I have an specific flow for each data base connection (if there is a better way to do this step, I will be very glad to know).

    But my real problem is on the next steps, for each of the 10 flows defined after the switch case step, I have a table input step with differents database connection configured all pointing to the same MySQL Server but poiting each to a respective database, with a query that use the other variable input, and so when I execute my transformation, following for example the flow to path A in the switch case, the query executes great, but for the others table input of the rest of the switch cases, throws me an error

    Unexpected error
    org.pentaho.di.core.exception.KettleException:
    Expected to read parameters from step [Filter rows] but none were found.
    at org.pentaho.di.trans.steps.tableinput.TableInput.readStartDate(TableInput.java:85)
    at org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:122)
    at org.pentaho.di.trans.step.RunThread.run(RunThread.java:50)
    at java.lang.Thread.run(Thread.java:722)

    so what I understand of my problem is that even if I have a switch case that defines the execution path, the other table input steps are going to be executed anyway and because they don't receive the expected parameter it throws me this error. So I will like to know how can I do my transformation, because I have tried using "dynamic sql row step" and "execute sql script step" and this solutions only gives me as output the statement executed with the parameters incrusted on it, but not the execution result of the query.

    Thanks in advance, Greetings

  2. #2
    Join Date
    Apr 2008
    Posts
    1,771

    Default

    Expected to read parameters from step [Filter rows] but none were found.
    It seems that Filter Rows step is expecting some values but it's not receiving any.
    You have to check your data/variable flow.
    -- Mick --

  3. #3
    Join Date
    Dec 2013
    Posts
    4

    Default

    Yes I know is not receiving, because of what I said about using a Switch Case Step, its something like this

    _____ Step A Table Input (query expecting parameters)
    /
    Switch Case ---------- Step B Table Input (query expecting parameters)
    \ ____ Step C Table Input (query expecting parameters)

    In the case the switch case sends the parameters to step A, steps B and C wont receive the parameters, but anyway, table input of steps B and C are being executed anyway, and I dont want them to being executed, how can I do this?

    thanks in advance

  4. #4
    Join Date
    Dec 2013
    Posts
    4

    Default

    Yes I know is not receiving, because of what I said about using a Switch Case Step, its something like this

    _____ Step A Table Input (query expecting parameters)
    /
    Switch Case ---------- Step B Table Input (query expecting parameters)
    \ ____ Step C Table Input (query expecting parameters)

    In the case the switch case sends the parameters to step A, steps B and C wont receive the parameters, but anyway, table input of steps B and C are being executed anyway, and I dont want them to being executed, how can I do this?

    thanks in advance

  5. #5
    Join Date
    Apr 2008
    Posts
    1,771

    Default

    How many different cases have you got?
    I think that you should re-think your work flow.
    In PDI, every step within a transformation is executed at the same time, which is not what you want.
    I would try to create the whole connection + SQL syntax using variables so you don't need a "Switch case" but everything is handled by the correct variables.
    (Hope my explanation is clear!)
    -- Mick --

  6. #6
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Could be you're not yet acquainted with the data flow model of Kettle transformations, but for now it should ease your worries, if you enable option "Execute for each row" in the Table Input settings.
    So long, and thanks for all the fish.

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.