Strategies for facing failures in PDI: handling errors and logging in transformations and jobs, using preview rows and breakpoints for debugging, analyzing step logs and performance metrics, and recovery best practices for failed transformations.

Every pipeline will fail — it's not a question of "if", but "when". Database connections drop, the file being read changes format, strange data triggers errors. What sets great engineers apart isn't being free of errors, but the speed at which they find and fix problems.
This episode covers error handling and debugging in PDI: how to make sure failures are caught properly, how to find root causes with preview and breakpoints, and how to read logs and metrics to speed up diagnosis.
Errors in PDI can be grouped into three types, each with a different handling strategy:
Most errors occur at a specific step with a message that's actually fairly explanatory — as long as you know where to look. The key: never ignore the red log.
Within a transformation, there are several error handling mechanisms:
The best pattern is to prevent errors from appearing in the first place: validate early, and route suspicious rows to a clear path instead of letting them explode mid-pipeline. But for unavoidable errors, make sure there's a trail: write the key fields and error message to a log file.
When running a transformation from the command line, controlling the log level is very useful. Use the Debug level to see stream details when hunting a problem:
pan.sh -file=mytrans.ktr -level=Debug -logfile=/tmp/mytrans_debug.logThe available log levels: Error, Minimal, Basic, Detailed, Debug, and Rowlevel. Start with Basic, go up to Debug only while investigating, and don't forget to return to a normal level for production — -level=Basic is almost always enough for routine runs.
When a transformation fails, the error message usually points to the step and the offending row — for example ... at step 'Select values' .... These two pieces of information are your starting point for investigation: open that step, check the suspected fields with Preview, then trace their values back to the source. The habit of recording the full error message — not just its last sentence — will help a lot when you ask questions in the community.
Jobs have a different error handling mechanism because of their orchestration nature. The main strategies:
The industry standard you should emulate: every production job has a failure path that sends a notification and records complete context — which job, which step, what time, and the error message. Episode 13 will cover logging and observability comprehensively.
Spoon's interactive debugging mechanisms are your main weapons:
These techniques let you "walk with the data" and find exactly at which step a value starts to go wrong. Combining previews at several points is often more effective than reading a long log line by line.
Spoon stores the Execution history of every transformation run. After several runs, compare the Step Metrics numbers across runs: if a step starts processing slower or its error count rises, you can detect degradation before a full failure. This is like a mini dashboard that needs no external tools — just click the Execution History tab in the bottom panel.
A practical exercise: run the same transformation with different data volumes, then observe how time and row counts change. This ability to read trends between runs is your preparation for episode 13, when we discuss monitoring and observability comprehensively.
Info
The best debugging exercise you can do: break something on purpose — change a field type in Select values, misname a column, or add a duplicate key in the output — then practice finding it with preview and breakpoints. Debugging reflexes are built with practice, not theory.
When a transformation runs, the log panel and Step Metrics tab give a health picture of each step. Things you should watch:
To find a bottleneck, look at steps with a high active count or slowing lines read. Waiting steps — usually those doing database queries or disk writes — are the prime suspects.
When a transformation truly fails in production, the goal is to get healthy again as fast as possible without corrupting data. The best practices:
Success
The golden rule: if a transformation can't be safely rerun, its design isn't finished. Idempotency is the cheapest insurance for a data engineer's peace of mind.
In episode 7 you equipped yourself for facing failures: understanding the types of errors in PDI, handling errors in transformations and jobs, using preview and breakpoints for debugging, analyzing step logs and performance metrics, and applying safe recovery best practices.
The key takeaways:
In episode 8, we widen our reach: advanced sources & targets — connecting databases, CSV, Excel, XML, JSON, and REST APIs, using Hadoop and cloud storage connectors, writing to data warehouses, and leveraging lookup and caching for performance.