i wanted to try to run the pentaho from Linux Centos 7.
In the server there are no GUI for it, so i can’t open the Spoon GUI where we usually drag and drop the components.
If we use the Spoon, we can change the Database Connection by clicking the Database Connection then re-type the host.
But how do i do that if i can’t open the Spoon? Is there a file or something where i can change those?
2
Answers
All transformation and job files are just XML.
You can edit a transformation in your laptop with the correct parameters, save it, find the relevant XML snippet, copy, open the ktr on the server in a text editor, delete the old db connection and paste in the new one.
It may actually be a bit tricky if you mess something up, but with a few tries you should have it done.
You can use JSON file to change database connection in Pentaho Data Integration without using GUI.
Set variable and database connection value in that variable inside that JSON file so that next time you just drag and drop JSON file in server where you cannot open Spoon GUI to change the database connection values.
Let me explain how we do it.
First create a transformation where we take JSON file as input and set that value into variable to later use that value anywhere inside that job as ${variable_name}.
JSON file looks like this …
Browse and add your JSON file …
Go to Fields tab and Select field …
Now in set variable step go to Get Fields …
Now let us suppose we have created these variables in JSON file now we use these variables to create a database connection.
like this …
In this way you can build your ETL with dynamic database connection in Pentaho Data Integration. Just replace JSON file in server then database connection will be changed in that whole ETL package.
This example ETL package can be downloaded from this link:
Download