Use the DatabricksReposDeleteOperator to delete an existing Databricks Repo via api/2.0/repos/ API endpoint.

Using the Operator

To use this operator you need to provide either repo_path or repo_id.



repo_path: str

Path to existing Databricks Repos, like, /Repos/<user_email>/repo_name (required if repo_id isn’t provided).

repo_id: str

ID of existing Databricks Repos (required if repo_path isn’t provided).

databricks_conn_id: string

the name of the Airflow connection to use.

databricks_retry_limit: integer

amount of times retry if the Databricks backend is unreachable.

databricks_retry_delay: decimal

number of seconds to wait between retries.


Deleting Databricks Repo by specifying path

An example usage of the DatabricksReposDeleteOperator is as follows:


    # Example of deleting a Databricks Repo
    repo_path = "/Repos/"
    delete_repo = DatabricksReposDeleteOperator(task_id="delete_repo", repo_path=repo_path)

Was this entry helpful?