Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Switch between Development and Production Environment

  1. #1

    Default Switch between Development and Production Environment

    I would like to be able to switch between a development (testing) environment and a production environment without changing my scripts. I tried this procedure:
    1. copying all my production database connection files (.kdb) to a directory outside of my Kettle Repository
    2. changing all the database connections inside my Kettle Repository to point to the development databases
    3. copying these development database connection files to a second directory outside of my Kettle Repository
    4. Creating two shell scripts / batch files to copy the either the development connections or the production connections to my Kettle Repository


    This didn't work. Even though all my database connections are shared, not all are in .kdb files, and it appears that at least one copy of all database connections are inside each and every transformation (.ktr).

    So, I'd like to ask how everyone else is switching between development and production scripts.

  2. #2
    Join Date
    Aug 2011
    Posts
    236

    Default

    Hi dsa42,

    The way I went to achieve this was to :-

    1) Create a delimited csv file with all the variable db connection (and other changeable) values. You would have one for dev and one for prod (each would have the appropriate values for the environment). Example

    hostname,port,dbname,.....
    db1.hostname,2301,analytics,...

    2) In my jobs, the first thing I do is to initialize a whole bunch of parameters the are then used with the job.

    Name:  pdi_031814_1.jpg
Views: 328
Size:  7.9 KB

    Name:  pdi_031814_2.jpg
Views: 326
Size:  7.3 KB

    Name:  pdi_031814_3.jpg
Views: 321
Size:  13.9 KB

    Name:  pdi_031814_4.jpg
Views: 325
Size:  15.7 KB

    3) You then use the parameters in your db connectivity setup

    Name:  pdi_031814_5.jpg
Views: 329
Size:  21.9 KB

    4) In your script that starts kitchen, include a parameter value as part of the call :-

    ./kitchen.sh -rep="pentaho_repo",..other parms..., -paramarameter_directory=/your/directory/parameters_prod

    HTH
    PDI 8.0.0
    MySQL - 5.6.27
    Redshift - 1.0.1485
    PostgreSQL 8.0.2
    OS - Ubuntu 10.04.2

  3. #3
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    You may also want to look at:
    https://code.google.com/p/kettle-franchise/

    If they are shared, then the values are stored in <UserHome>/.kettle/shared.xml (eg. ~/.kettle/shared.xml or C:\Users\dsa42\.kettle\shared.xml )
    **THIS IS A SIGNATURE - IT GETS POSTED ON (ALMOST) EVERY POST**
    I'm no expert.
    Take my comments at your own risk.

    PDI user since PDI 3.1
    PDI on Windows 7 & Linux

    Please keep in mind (and this may not apply to this thread):
    No forum member is going to do your work for you. We will help you sort out how to do a specific part of the work, as best we can, in the timelines that our work will allow us.
    Signature Updated: 2014-06-30

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.