Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2025 05:20 AM
Hi @r_g_s_cn ,
When a streaming query (like Auto Loader) fails in Databricks, especially due to a schema mismatch, the job or task is automatically marked as FAILED, even if you catch the exception in your code. That’s because the failure is detected at the engine level, outside the Python try/except block.
To avoid this, set:
cloudFiles.schemaEvolutionMode = "rescue"
This makes Auto Loader handle unexpected columns by placing them in the rescued_data column, so your job continues running without being marked as failed.