Question

I have a master database, that has a table (companyTable) stores the name of the child database for each company. I need to use Pentaho to

  1. Obtain a list of company database name from companyTable.
  2. Establish the connection to the company database by iterating over the value obtained in 1.
  3. Obtain some information from those company databases and put it in another database.

The problem now is that I can't define the database connection dynamically; When I try to create a new Database Connection by inputing a variable (${{dbname}}):

the program will throw me a

Data source name not found and no default driver specified

exception when run.

Any idea how to connect to multiple databases by retrieving the relevant database connection name from another master database?

I am using Kettle.

Was it helpful?

Solution

If you use Kettle you can use it from java code by accessing to transformation. Parameter must be in java -D=value style

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top