Skip to main content

Pentaho (PDI) importer options and exit codes

The importer runs inside Apache Hop, two ways, with the same options:

WayImportAudit
Hop GUIFile → Import from PDI (with migration report)…File → Audit a PDI project before a migration…
hop-import<hop>/hop-import.sh -t pdi -i <input> -o <output><hop>/hop-import.sh -t pdi-audit -i <input> -o <audit-folder>

Give paths in full: hop-import.sh runs from the Hop folder. There is no standalone jar.

Options​

They are the options of hop-import, the same as for Hop's own Kettle import (-t kettle). The importer hands every one of them to the Kettle import.

OptionDefaultMeaning
-t, --typekettlepdi for the import with the migration report, pdi-audit for the audit
-i, --inputThe folder with the .ktr and .kjb files
-o, --outputWhere the .hpl and .hwf files are written, in the input's folder layout; for the audit, where the audit is written
-s, --shared-xmlPDI's shared.xml, for the connections it defines
-k, --kettle-propertiesA kettle.properties, for its variables
-c, --target-config-fileThe environment file the variables are written to, relative to the output folder. Its folder must exist
-j, --jdbc-propertiesPDI's simple-jndi/jdbc.properties: one Generic connection per data source, named after it
-e, --skip-existingonLeave target files that already exist untouched
-p, --skip-hiddenonSkip hidden files and folders
-f, --skip-foldersoffDo not read sub-folders
-n, --naming-schemeA naming scheme in the target's metadata, applied to connection names
--no-apply-naming-schemesApply no naming scheme; connection names are still aligned to one spelling
-r, --pipeline-run-configurationThe run configuration set on every pipeline. Without it, each pipeline keeps the one its file names
-w, --workflow-run-configurationThe run configuration set on every workflow. Without it, each workflow keeps the one its file names
-P, --projectImport into this Hop project: an existing project's home folder is the output folder, a new project is registered at -o
-l, --list-pluginsList the import types this Hop has

The audit uses the input, the files it reads (-s, -k, -j), the skip options and the naming scheme. It writes no Hop files, so -c, -r, -w and -P do nothing there.

What it reads​

  • .ktr transformations and .kjb jobs under -i; every other file under -i is copied to the output as it is;
  • the files -s, -k and -j name.

What it writes​

FileWritten by
.hpl and .hwf files, and copies of the other input filesImport
metadata/rdbms/*.json, metadata/*-run-configuration/local.jsonImport
connections.csvImport
The environment file -c namesImport, with -k and -c
migration/conversion-metadata.jsonImport
pdi-migration-report.mdImport; see The migration report
pre-migration-audit.md, audit.jsonAudit; see Audit risks

Exit codes​

The exit codes are those of hop-import:

CodeMeaning
0The import or audit finished without an error
1It finished with an error, or --help was asked for
2An unexpected error
9An option is wrong; the usage is printed

Check the report's Files without a converted file section as well: it lists the PDI files the Kettle import wrote nothing for.

Why and how to move, and how we help: Migrations to Apache Hop, and from Pentaho PDI in particular.