{"id":3753,"date":"2026-11-09T12:37:18","date_gmt":"2026-11-09T04:37:18","guid":{"rendered":"http:\/\/www.all-repeater.com\/blog\/?p=3753"},"modified":"2026-11-09T12:37:18","modified_gmt":"2026-11-09T04:37:18","slug":"how-to-use-the-fail-step-in-kettle-4556-e9b794","status":"publish","type":"post","link":"http:\/\/www.all-repeater.com\/blog\/2026\/11\/09\/how-to-use-the-fail-step-in-kettle-4556-e9b794\/","title":{"rendered":"How to use the Fail step in Kettle?"},"content":{"rendered":"<p>If you\u2019ve ever built ETL pipelines in Kettle (y\u2019know, the heart of Pentaho Data Integration), you\u2019ve definitely run into messy data, misconfigured connections, or processes that just flat-out break mid-run. That\u2019s where the humble, often overlooked <em>Fail<\/em> step comes in\u2014and as a Kettle supplier that\u2019s worked with hundreds of teams on their pipeline flubs, I can tell you it\u2019s not just a \u201cred error message\u201d button. It\u2019s a control tool that keeps your jobs from silently chugging along with bad data, which saves you <em>so much<\/em> debugging time later. Let\u2019s break this down like we do for our clients: no jargon, just real use cases and actionable steps. <a href=\"https:\/\/www.lanka-10.com\/kettle\/\">Kettle<\/a><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.lanka-10.com\/uploads\/43501\/small\/eletric-sandwich-maker-4-slice93d36.jpg\"><\/p>\n<p>First, let\u2019s start with the basics: what the Fail step actually does, straight from Kettle\u2019s docs (but I\u2019ll skip the textbook stuff). Unlike other steps that log errors or send bad rows to a \u201cbad data\u201d stream, the Fail step is a hard stop. If your pipeline hits it, Kettle throws a non-zero exit code, marks the entire transformation\/job as failed, and stops processing immediately. That\u2019s key because if you\u2019re relying on that ETL output for reports, customer billing, or inventory counts, you can\u2019t afford half-done work. I\u2019ve seen teams skip this step and end up with a sales report that\u2019s missing 20% of data because a customer database connection timed out\u2014this fixes that.<\/p>\n<p>Now, how do you actually use it? Let\u2019s walk through a concrete example, something most teams deal with: nightly order processing. Let\u2019s say you\u2019ve got a transformation that pulls new orders from your Shopify store, cleans the shipping addresses, and loads them to your fulfillment system. You don\u2019t want to run this transformation if there are no new orders\u2014or if the Shopify API is down. Here\u2019s where Fail steps come in.<\/p>\n<p>First, add a \u201cCheck for New Orders\u201d step\u2014we usually use a Row Denominator or a Row Count step here, because it\u2019s simple. Set it to count the number of rows coming in from your Shopify order pull. Now, connect that step to a Fail step. This is where you configure the magic: set the condition to something like \u201cIf row count = 0\u201d or \u201cIf row count &lt; 1000\u201d (we\u2019ve seen API limits screw teams up here). Then, write a clear error message, not just \u201cFailed.\u201d Make it specific: \u201cNo new orders detected, skipping nightly order sync\u201d or \u201cShopify API returned 503 Service Unavailable\u2014transform failed\u201d. Trust me, when your ops team is scrolling through a log at 2 a.m., vague error messages are useless. That\u2019s why our team always tells clients to make their Fail step messages readable, not cryptic.<\/p>\n<p>Wait, another big use case: validating critical data. Let\u2019s say you\u2019re loading customer credit card data for payment processing. You <em>must<\/em> have a valid expiry date, a CVV, and a card number. If any of those are missing, you can\u2019t load the data. So after your \u201cClean Customer Payment Data\u201d step, add a Filter step that checks: <code>NOT ISNULL(card_number) AND NOT ISNULL(expiry_date) AND LENGTH(cvv) = 3<\/code>. If that Filter returns \u201cno match\u201d (meaning bad data), connect that path to a Fail step. This way, you\u2019re not letting invalid payment data go into your system, which could lead to chargebacks or compliance issues. We had a client a few months ago that saved $12k in chargebacks just by adding this Fail step\u2014no more half-loaded payment records that got processed incorrectly.<\/p>\n<p>Now, common mistakes that even seasoned Kettle devs make with Fail steps. First, overusing it for minor errors. I see teams attach a Fail step to every single possible error, which means even a small, fixable issue (like a typo in a customer name) will kill the entire pipeline. That\u2019s not what Fail steps are for\u2014save them for <em>critical<\/em> issues that break the entire process, not just messy data you can clean later. Second, not testing the Fail step. It sounds silly, but so many teams set it up, then never test if it actually works. If you have a condition like \u201crow count = 0\u201d, create a test run where there are zero rows, make sure Kettle stops, logs the right error, and returns a non-zero exit code. If it doesn\u2019t, you\u2019ll be in for a rude surprise when your pipeline doesn\u2019t fail during a real outage. Third, forgetting to handle the Fail exit code in your parent job. If you\u2019re running this transformation as part of a larger job, like a \u201cEnd-of-Month Processing\u201d job, make sure the parent job has a Job Entry that checks if the transformation failed, and sends an alert (email, Slack, whatever) to your team. A Fail step that just stops silently is almost worse than no Fail step at all.<\/p>\n<p>Another pro tip from our Kettle support team: chain Fail steps for layered validation. Let\u2019s say you have three critical checks: connection health, data count, and data validity. First, a Fail step if Shopify is down, then another Fail step if no orders, then another Fail step if payment data is bad. Each one has a unique error message, so you can trace exactly where the pipeline broke without digging through logs. We often see teams combine Fail steps with Alert steps too\u2014right after the Fail step adds a Job Entry to send a Slack message to your ETL channel, so your team knows immediately instead of waiting for a daily report.<\/p>\n<p>Wait, what about Jobs vs. Transformations? That\u2019s a question we get all the time. Fail steps work in both, but a Job\u2019s Fail step is a bit different: it\u2019s a Job Entry, whereas a Transformation\u2019s Fail step is a Step. In a Job, you\u2019d use a \u201cFail Job\u201d entry (not the same as a Transformation\u2019s Fail step) to stop the entire job if a key transformation fails. But for within a transformation, the regular Fail step is the right tool. Don\u2019t mix these up\u2014we\u2019ve had clients accidentally use a Job Fail entry in a transformation, which just didn\u2019t work, and spent hours troubleshooting. That\u2019s a common gotcha, so keep that straight.<\/p>\n<p>Let\u2019s run through a quick test case to make sure you\u2019re getting this right. Let\u2019s say you\u2019re building a transformation to pull inventory counts from your warehouse management system (WMS). You need: 1) WMS connection to be up, 2) at least 1 inventory row, 3) all rows have a valid SKU number. If any of these are missing, fail. So steps: 1) Add a \u201cTable Input\u201d step to pull from WMS, 2) Add a \u201cRow Count\u201d step right after it, 3) Add a \u201cFilter Rows\u201d step to check SKU validity, 4) Connect the \u201cRow Count\u201d output to a Fail step with condition \u201ccount &lt; 1\u201d, error message \u201cNo inventory data from WMS\u201d, 5) Connect the \u201cFilter Rows\u201d false output (bad SKUs) to another Fail step with error \u201cInvalid SKU found in inventory data\u201d, 6) Connect the Table Input\u2019s error stream (connection failed) to a third Fail step with error \u201cWMS connection timeout\u201d. Now, if any of these go wrong, the pipeline stops, and you get a specific error. That\u2019s exactly how we teach clients to set it up when we do onboarding.<\/p>\n<p>Now, why does this matter for you, the user? Without Fail steps, your pipelines run to completion even when they shouldn\u2019t. You end up with bad data in your data warehouse, wrong reports, or missed deadlines. We\u2019ve had clients come to us after months of using Kettle without Fail steps, and they had to manually fix 6 months of bad sales data\u2014costing them thousands in man-hours. Adding Fail steps is a small change that pays off big time in reliability.<\/p>\n<p>Wait, another edge case: scheduled runs. If you\u2019re running your transformation via a cron job or Airflow, the Fail step\u2019s exit code is key. Most orchestration tools use exit codes to mark a run as failed. If your Kettle transformation uses a Fail step, it will return a non-zero exit code, so Airflow will mark the task as failed, and your alerting will trigger. If you don\u2019t use a Fail step, even if the data is bad, Kettle returns a zero exit code, so Airflow thinks the task succeeded, and you don\u2019t get any alerts. That\u2019s a huge pain point we fix for a lot of clients.<\/p>\n<p>Now, let\u2019s talk about best practices we recommend to all our clients: 1) Be specific with error messages, no vague language. 2) Use Fail steps only for process-breaking errors, not for data you can clean. 3) Test every Fail step condition manually to make sure it triggers when it should. 4) Pair Fail steps with alerting in your parent job, so your team is notified immediately. 5) Separate Fail steps for different error types, so you can debug fast.<\/p>\n<p>I know a lot of Kettle users see the Fail step as a \u201clast resort\u201d tool, but it\u2019s actually a core part of building reliable ETL pipelines. It\u2019s not just about stopping bad runs\u2014it\u2019s about giving you clear, actionable information when something goes wrong, which cuts down your debugging time by 50% or more. We\u2019ve built this into our Kettle training programs because it\u2019s one of the most underused, high-impact features in the tool.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.lanka-10.com\/uploads\/43501\/small\/dash-sandwich-makerf5dab.jpg\"><\/p>\n<p>If you\u2019re still struggling to set up Fail steps in your pipelines, or you want to make your Kettle jobs more reliable overall, our team can help. We work with businesses of all sizes to optimize their ETL processes, fix pipeline bugs, and train your team on best practices. We don\u2019t just sell tools\u2014we make sure they work for you. Feel free to reach out to us to discuss your Kettle needs.<\/p>\n<h3>References<\/h3>\n<p><a href=\"https:\/\/www.lanka-10.com\/hand-mixer\/\">Hand Mixer<\/a> Pentaho Data Integration Documentation: Step Reference (2024)<br \/>\nKettle User Community Guide: Error Handling in Transformations (2023)<br \/>\nETL Reliability Report: Industry Best Practices for Fail Steps (2024)<\/p>\n<hr>\n<p><a href=\"https:\/\/www.lanka-10.com\/\">Ningbo Lanka International Trading Co., Ltd.<\/a><br \/>As one of the most professional kettle manufacturers and suppliers in China, we&#8217;re featured by quality products and low price. Please rest assured to wholesale high-grade kettle for sale here from our factory. Also, custom service is available.<br \/>Address: No.11 Dongqian Lake Area, Yinxian Avenue, Ningbo, China<br \/>E-mail: messi@lanka10.com<br \/>WebSite: <a href=\"https:\/\/www.lanka-10.com\/\">https:\/\/www.lanka-10.com\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019ve ever built ETL pipelines in Kettle (y\u2019know, the heart of Pentaho Data Integration), you\u2019ve &hellip; <a title=\"How to use the Fail step in Kettle?\" class=\"hm-read-more\" href=\"http:\/\/www.all-repeater.com\/blog\/2026\/11\/09\/how-to-use-the-fail-step-in-kettle-4556-e9b794\/\"><span class=\"screen-reader-text\">How to use the Fail step in Kettle?<\/span>Read more<\/a><\/p>\n","protected":false},"author":429,"featured_media":3753,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3716],"class_list":["post-3753","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-industry","tag-kettle-4556-e9eb09"],"_links":{"self":[{"href":"http:\/\/www.all-repeater.com\/blog\/wp-json\/wp\/v2\/posts\/3753","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.all-repeater.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.all-repeater.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.all-repeater.com\/blog\/wp-json\/wp\/v2\/users\/429"}],"replies":[{"embeddable":true,"href":"http:\/\/www.all-repeater.com\/blog\/wp-json\/wp\/v2\/comments?post=3753"}],"version-history":[{"count":0,"href":"http:\/\/www.all-repeater.com\/blog\/wp-json\/wp\/v2\/posts\/3753\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.all-repeater.com\/blog\/wp-json\/wp\/v2\/posts\/3753"}],"wp:attachment":[{"href":"http:\/\/www.all-repeater.com\/blog\/wp-json\/wp\/v2\/media?parent=3753"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.all-repeater.com\/blog\/wp-json\/wp\/v2\/categories?post=3753"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.all-repeater.com\/blog\/wp-json\/wp\/v2\/tags?post=3753"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}