Search code examples
pentahoetlkettlepentaho-spoon

Duplicating a job in Pentaho Data Integration for different connections


I've generated a job via the Copy Tables wizard in Spoon UI, that copies some tables from an oracle database source to an SQL Server one, and made some changes to the job as well.

Now I want to duplicate the same job (same tables and same changes), but changing just the connexions. Is that possible in Spoon ?

I've looked through the Spoon UI and didn't find any option that lets me duplicate the job with changing connexions.

EDIT
After I created the two steps: one for generating rows and the other for obfuscating passwords, In the encrypted field, I do not get the 'Encrypted : Obfusctaed Password' output as expected

enter image description here
here is what the step generate rows looks like :
enter image description here

and here is an other picture for the Modified Java Script Value :

enter image description here


Solution

  • You need to make a copy of your kjb file. Jobs and transformations are in fact XML files. You can then edit it manually.

    This is pretty straight-forward, with <connection> tags so you should be able to figure it all out by yourself.

    I find it the fastest way if you want to keep two jobs instead of changing db connection credentials every time.

    If you need to provide an obfuscated password (they are not encrypted, just obfuscated) you can create a transformation that will obfuscate it for you providing you the value to put into XML file.

    Steps to reproduce creating a transformation for obfuscating passwords in Kettle 6.1 (for older versions the name of the Script Values / Mod step is Modified Java Script Value):

    1. Step Generate rows with just 1 row storing password as value
    2. Step Script Values / Mod for basic obfuscation

    enter image description here