Pentaho (PDI) importer options and exit codes
The importer runs inside Apache Hop, two ways, with the same options:
| Way | Import | Audit |
|---|---|---|
| Hop GUI | File → 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.
| Option | Default | Meaning |
|---|---|---|
-t, --type | kettle | pdi for the import with the migration report, pdi-audit for the audit |
-i, --input | The folder with the .ktr and .kjb files | |
-o, --output | Where the .hpl and .hwf files are written, in the input's folder layout; for the audit, where the audit is written | |
-s, --shared-xml | PDI's shared.xml, for the connections it defines | |
-k, --kettle-properties | A kettle.properties, for its variables | |
-c, --target-config-file | The environment file the variables are written to, relative to the output folder. Its folder must exist | |
-j, --jdbc-properties | PDI's simple-jndi/jdbc.properties: one Generic connection per data source, named after it | |
-e, --skip-existing | on | Leave target files that already exist untouched |
-p, --skip-hidden | on | Skip hidden files and folders |
-f, --skip-folders | off | Do not read sub-folders |
-n, --naming-scheme | A naming scheme in the target's metadata, applied to connection names | |
--no-apply-naming-schemes | Apply no naming scheme; connection names are still aligned to one spelling | |
-r, --pipeline-run-configuration | The run configuration set on every pipeline. Without it, each pipeline keeps the one its file names | |
-w, --workflow-run-configuration | The run configuration set on every workflow. Without it, each workflow keeps the one its file names | |
-P, --project | Import into this Hop project: an existing project's home folder is the output folder, a new project is registered at -o | |
-l, --list-plugins | List 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
.ktrtransformations and.kjbjobs under-i; every other file under-iis copied to the output as it is;- the files
-s,-kand-jname.
What it writes
| File | Written by |
|---|---|
.hpl and .hwf files, and copies of the other input files | Import |
metadata/rdbms/*.json, metadata/*-run-configuration/local.json | Import |
connections.csv | Import |
The environment file -c names | Import, with -k and -c |
migration/conversion-metadata.json | Import |
pdi-migration-report.md | Import; see The migration report |
pre-migration-audit.md, audit.json | Audit; see Audit risks |
Exit codes
The exit codes are those of hop-import:
| Code | Meaning |
|---|---|
0 | The import or audit finished without an error |
1 | It finished with an error, or --help was asked for |
2 | An unexpected error |
9 | An 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.