Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Connection parameterizable

  1. #1

    Default Connection parameterizable

    My problem: i have four databases accessible via different connections
    (config, stage, edwh, dm1). Each database has the same table "schema_version"
    with the same structure (version, upgrade_date).

    I would like to create a parametrized transformation (connection name as
    parameter) which inserts/updates the current schema_version.

    All steps have the connection name "hardcoded" (i.e. i cant use variables
    for the connection names).

    My current solution is to have a transformation for each database
    (exampel: upgrade_version_edhw.ktr) and a parent job which picks
    the right transformation file based on the connection name
    (upgrade_version_${connection}.ktr). This is less than optimal because
    all transformations are the same with the exception of the connection

    My question: is there a way to create such a parametrized "insert"?
    (PDI version 4.1.2 - so i can't use Meta-Data Injection on "Table output",
    or "Insert/Update" step). Maybe there is some "Java-Script-API" Vodo

    kind regards
    Last edited by maxh; 11-18-2011 at 02:48 AM.

  2. #2
    Join Date
    Feb 2008


    If the connections are of the same type (e.g. MySQL) then you can have one connection which has variables for the server / port / user / password etc. Set the variables first in a job, then afterwards you will connect to the correct database in subsequent jobs / transformations.

  3. #3
    Join Date
    Apr 2008


    You could even nest them, so that the first transformation builds a list of DBs to update, the host, port, user, etc.
    Then a Job which sets a variable, and does the update.

    Job 1 (Master)
    - Transform 1 (Generate list of DBs)
    - Job 2 (Update DB; execute once for each row)
    - - Transform 2 (Set Variable)
    - - Transform 3 (Perform DB update)

  4. #4


    Thanks for the suggestions.

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.