Import a Pentaho project into a Hop project
For a real migration, import into the Hop project the pipelines and workflows will live in, rather than into a loose folder. Hop reads connections from the metadata folder of the active project, so connections written elsewhere are not found.
1. Import
mkdir -p <project-home>/environments
<hop>/hop-import.sh -t pdi -i <pdi-project> -o <project-home> -P <project> \
-s <path>/shared.xml \
-k <path>/kettle.properties -c environments/dev-config.json \
-r <pipeline-run-config> -w <workflow-run-config>
-P <project>imports into that Hop project. An existing project's home folder is used as the output folder; a project Hop does not know yet is registered at-o.- The connections and run configurations go to
<project-home>/metadata. -rand-wset a run configuration on every pipeline and workflow. Without them, each file keeps the run configuration it names, and actions that name none uselocal, which is created if the project does not have one.- By default, files that already exist in the output folder are left alone, so importing again does not overwrite a pipeline you have already finished by hand.
In Hop GUI, File → Import from PDI (with migration report)… has the same options.
2. Create the environment
With -k and -c, the variables of kettle.properties are written to the environment file -c
names, relative to the output folder. The folder it is in must exist: the import fails if it does
not.
Register the file as an environment of the project:
<hop>/hop-conf.sh -ec -e dev -ep <project> -eg <project-home>/environments/dev-config.json
Import once per PDI environment, each with its own kettle.properties and -c file, and you get
one Hop environment per stage. Run with -e dev on hop-run, or pick the environment in Hop GUI.
3. Replace the KETTLE_ settings
kettle.properties also holds PDI's own settings, such as KETTLE_EMPTY_STRING_DIFFERS_FROM_NULL.
The import copies them into the environment as variables, but Hop reads its settings under HOP_
names, so they have no effect. The audit lists them as KETTLE_ settings in kettle.properties.
For each one, set the HOP_ equivalent (HOP_EMPTY_STRING_DIFFERS_FROM_NULL, …) in Hop's
configuration, or with -s HOP_…=Y on hop-run, and remove the KETTLE_ variable from the
environment.
4. Finish the connections
Connections need their passwords, and JNDI connections a URL. See Finish connections and passwords.
Why and how to move, and how we help: Migrations to Apache Hop, and from Pentaho PDI in particular.