Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Can we define the db connection in kettle properties file

  1. #1
    Join Date
    Jul 2008
    Posts
    12

    Default Can we define the db connection in kettle properties file

    Can we define the db connection in kettle properties file and use it in kettle script...if possible please explain me how to use that in ktr script

  2. #2
    Join Date
    Jul 2007
    Posts
    1,013

    Default

    You can define connection parameters in the kettle.properties file, like this:

    db_server=10.10.10.1
    db_name=PENTAHODB1
    db_user=albert
    db_pass=whatever

    Then you have this data available as variables, so for example in the "Username" field of your DB connection in your transformation, instead of the username text, you would enter ${db_user}

    However, you may be talking about storing a connection in a file so you can use it from many places without replicating it. In that case you just have to right click on the connection in Spoon, and select "Share". This will store the connection in a file named "shared.xml". Anything in that file will be available to all transformations.

    Cheers!

  3. #3
    Join Date
    Jul 2008
    Posts
    12

    Default

    Thanks a lot some how i did this before your reply.Anyway thanks for your effrot.Can we have the kettle.properies file in different location instead of C:\Documents and Settings\userid\.kettle.

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.