Pentaho

 View Only

 PDI Table Input, how to define SSH Tunneling for it when querying MySQL? Is this possible?

  • Pentaho
  • Kettle
  • Pentaho
  • Pentaho Data Integration PDI
Jaanus Piksaar's profile image
Jaanus Piksaar posted 05-26-2020 08:12

We need to set up SSH Tunneling when querying one of our source MySQL databases.

 

Does the Table Input step have the possibility to set up the tunnel? If not then how should we set the Tunnel up?

 

For example the database browser DBeaver enables to set the tunneling up when defining the connection.


#PentahoDataIntegrationPDI
#Pentaho
#Kettle
Brandon Jackson's profile image
Brandon Jackson

If you are on linux there are a lot of options. If you want to do all of this through Spoon itself, you could create a KJB (Job) to execute a script which would hand off the tunnel creation to the OS layer you are using. Then your KTRs when they initialize will simply find the database connection waiting for them. Just remember that the URL has to hit localhost:whatever port forward you choose. The functionality for tunneling is not built into the default concept of connections in PDI.

Jaanus Piksaar's profile image
Jaanus Piksaar

Thanks. Needed this for Windows, though the options are more limited, then basically did the same solution: the scheduling is done via Task Scheduler, this then calls a Powershell script that checks if the tunnel is up, if not then creates the tunnel and calls the actual PDI job that does the load. Would be great to have the tunneling as part of connections.