How to check the parameters of the connection to the database in the boiler Pentaho

I have a case where I receive X strings of database names as a parameter that I need to connect to. I did the job and transforms successfully to repeat the step of entering a table for each database name given as a parameter. So it all works well when these dbnames are found to be valid. But if one of these names is invalid (db does not exist with the given name), then the table entry step will fail and all work will stop instead of continuing for the rest of the names that are valid.

So I'm wondering if there is a way to check if the database connection parameters are correct? And maybe skip the step when invalid database parameters are found?


source to share

1 answer

Parameterize the database name for your connection, then use nofollow noreferrer -> Check DB Connections to test the connection. I would guess that this would require a chain of 2 transformations and 1 assignment:

  • A transform that fetches the databases and uses the Job Executor to run the validation job with each database name passed as a parameter.
  • The validation check verifies the connection to Check DB Connections and, if successful, starts a new transformation, continuing to pass the name to the database
  • Final conversion with Table input using parameterized join

Perhaps see this answer for help on using variables in DB joins.

Good luck!

Parameterized Database Name



All Articles