Pentaho Tools :

Pentaho C-Tools(CDE,CDF,CDA),Pentaho CE & EE Server,OLAP-Cubes,Analysis using Pivot4J, Saiku Analytics, Saiku Reporting, Ad-hoc Reporting using Interactive Reporting Tool,Dashboards,Reports using PRD, PDD,Data Integration using Kettle ETL,Data Mining usign WEKA,Integration of Servers with Databases,Mobile/iPad compatible Dashboards using Bootstrap Css,Drilldown dashboards,Interactive Dashboards

Sunday, 21 August 2016

Tip : How to create postgresql JNDI connection in Pentaho Data Integration (PDI) or Kettle ETL

Hi,

In this post you will see how to connect to postgresql "foodmart"database in PDI using JNDI concepts.

Software used : PDI 6.1 CE, PostgreSQL foodmart db

Steps :
1) Install postgresql driver in "lib"folder of PDI installation  (download driver here)
  Example : D:\data-integration\lib

2) Navigate to "sample-jndi" folder at PDI instllation  and open jdbc.properties file using notepad
3) Add below set of properties with foodmart database information

FoodMart/type=javax.sql.DataSource
FoodMart/driver=org.postgresql.Driver
FoodMart/url=jdbc:postgresql://localhost:5432/foodmart
FoodMart/user=postgres
FoodMart/password=postgres

NOTE : FoodMart is the JNDI name we use in PDI tool to connect foodmart database

4) Launch the PDI tool and create a  new transformation
Click on View tab -> then under the transformation name right click on "Database connectioin"node to create a new connection
Give a name for the connection and in the setting write "FoodMart" as the JNDI name
make sure that you are accessing "JNDI" from General selection.


 5) Click on "Test" button to see the successfull connection of JNDI. note that you need not to relaunch the PDI tool if you are modifying only properties file with foodmart information. Incase of installating driver if your PDI is running, a restart/relaunch of PDI tool is required.


Cheers.!
Sadakar Pochampalli