Reputation: 33
I have build an ADF pipline and i am executing multiple databricks notebooks in the pipeline. When one of the notebook fails the remianing command in the notebook skipped but the pipeline did not fail. I want to make sure that the pipeline execution stops if the notebook fails and next command skipped
I have tried trigering an error so that the pipeline fails
NA
I want to make sure that the pipeline execution stops if the notebook fails and next command skipped
Upvotes: 2
Views: 1400
Reputation: 237
Use assert
; here a the Scala code snippet:
try {
... ... ...
}
catch {
case e: Exception => {
println("exception caught while ... ... : " + e)
assert(false)
}
}
This will fail your Notebook Activity in Azure Data Factory.
Upvotes: 0
Reputation: 3182
If you connect the Azure Databricks acitivities as follows:
Notebook2-Activity will only be executed if the first Notebook-Activity is successfull.
Here the first activity fails and the next is not executed (Monitoring view of Azure Data Factory):
Upvotes: 1