szymon_dybczak
Esteemed Contributor III

Hi @Puru20 ,

Yes, there is 🙂 Databricks determines whether a job run was successful based on the outcome of the job's leaf tasks. A leaf task is a task that has no downstream dependencies. 

So, just add another task that will have a dependency on your final task (so, now this task becomes your final one) and in that task you can define your success/failure logic. 

https://docs.databricks.com/aws/en/jobs/monitor#how-does-databricks-determine-job-run-status

View solution in original post