skip to Main Content

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


  1. 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.

    Login or Signup to reply.
  2. 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.

    enter image description here

    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}.

    enter image description here

    JSON file looks like this …

    enter image description here

    Browse and add your JSON file …

    enter image description here

    Go to Fields tab and Select field …

    enter image description here

    Now in set variable step go to Get Fields …

    enter image description here

    Now let us suppose we have created these variables in JSON file now we use these variables to create a database connection.

    ${mysql_host}
    ${mysql_port}
    ${mysql_username}
    ${mysql_password}
    ${mysql_database_name}
    

    like this …

    enter image description here

    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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search