cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

how to set retry attempt and how to set email alert with error message of databricks notebook

Siddhesh2525
New Contributor III

how to set retry attempt in the data bricks notebook in term of like if any cmd /cell get fails that times that particular cmd/cell should be rerun for purpose of connection issue etc.

4 REPLIES 4

Hubert-Dudek
Esteemed Contributor III
  • you can just implement try/except in cell, handling it by using dbutils.notebook.exit(jobId) and using other dbutils can help,
  • when job fail you can specify your email to get job alerts,

image.png

  • additionally if notebook job fail you can specify retry in job task settings

image.png

Siddhesh2525
New Contributor III
  • "you can just implement try/except in cell, handling it by using dbutils.notebook.exit(jobId) and using other dbutils can help,

@HubertDudek As i am fresher in the databricks ,Could you please suggest /explain me in detail

Hubert-Dudek
Esteemed Contributor III

https://docs.databricks.com/notebooks/notebook-workflows.html

dbutils.notebook.run() - run other notebook from main notebook

dbutils.notebook.exit("failed") - quit notebook and can return status to main notebook (it can be in except block)

With all this command you can implement any own logic.

I also use azue data factory to run databricks notebook as with data factory you can nice handle many data flow scenarios depend on task success/failure/completion/timeout etc.

SailajaB
Valued Contributor III

Hi,

I also use azue data factory to run databricks notebook as with data factory you can nice handle many data flow scenarios depend on task success/failure/completion/timeout etc. -- Can't we implement this type of scenario in Databricks using Multiple tasks job.

Thank you

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group