PDA

View Full Version : Can we define the db connection in kettle properties file



Murali Doss
08-21-2008, 05:39 PM
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

tdidomenico
08-22-2008, 09:12 AM
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!

Murali Doss
08-22-2008, 06:54 PM
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.