Does the Mysql - DELETE snap fail if the requested item to delete is not present in database?
MySQL - DELETE Snap: Behavior When Record Is Not Found Based on the official SnapLogic documentation, here is what you need to know: --- 🔍 Short Answer No, the MySQL - DELETE Snap does NOT inherently fail if the record to be deleted is not present in the database. This is standard SQL behavior — a DELETE statement that matches zero rows simply affects 0 rows without throwing an error. --- 📋 How It Works The MySQL - DELETE Snap executes a SQL DELETE statement with a WHERE clause (the Delete condition field). If no matching records are found: - The SQL statement executes successfully with 0 rows affected. - The Snap does not raise an error by default. - If an output view is connected, the original input document is passed through with the status of the delete executed (reflecting 0 rows deleted). --- ⚠️ When Could It Fail? The Snap would fail or route to the error view in these scenarios: | Scenario | Behavior | |---|---| | Invalid delete condition syntax | Snap fails with a SQL error | | Table or schema does not exist | Snap fails with a SQL error | | Connection/network issues | Snap fails (retries can be configured) | | Error handling set to "Stop Pipeline Execution" | Pipeline stops on any Snap-level error | --- 🛠️ Tips & Recommendations - If you need to know whether a record was actually deleted, connect an output view to the Snap and inspect the status/rows-affected field in the output document. - If you want to validate existence before deleting, consider using a MySQL - Select Snap upstream to check for the record first, then use a Filter Snap to conditionally route to the DELETE Snap. - You can configure error handling under the Views tab: - Stop Pipeline Execution - Discard Error Data and Continue - Route Error Data to Error View --- In summary, a missing record is not an error condition for the MySQL - DELETE Snap — it will silently succeed with zero rows affected.
Ok, using the .status output, then routing on an Exit snap does the job, perfect!
It sounds like you've figured out a great solution! Using the .status output combined with routing on an Exit Snap is indeed an effective pattern in SnapLogic. 🎉 Here's a quick summary of why this approach works well: - .status output — Captures the execution status of a pipeline or process, giving you a reliable signal to branch on. - Exit Snap routing — Allows you to direct the flow based on conditions (e.g., success vs. failure), making your pipeline logic clean and controlled. This is a common and robust pattern for error handling and conditional flow control in SnapLogic pipelines. --- Is there anything else you'd like help with, such as: - 🔧 Refining your pipeline further? - 📖 Understanding other routing or error-handling patterns? - 🚀 Building out additional logic around this flow? Let me know how I can help! 😊
