When a Databricks SQL user is removed from an organization, the queries owned by the user remain, but they are only visible to those who already have permission to access them.
A Databricks SQL admin can transfer ownership to other users, as well as delete alerts, dashboards, and queries owned by the disabled user account.
Clone a query
A Databricks SQL admin has view access to all queries by default. As an admin, you can view and delete any query.
You cannot edit a query, if it is not shared with you. This includes admin users.
The solution is to clone a query, and then edit the permissions.
- Open Databricks SQL.
- Click Queries.
- Click Admin View.
- Select the query you want to clone.
- Click the vertical ellipsis and select Clone.
You can now edit the copy of the original query as needed.
Delete a query
- Open Databricks SQL.
- Click Queries.
- Click Admin View.
- Select the query you want to delete.
- Click the vertical ellipsis and select Move to Trash.
- Click Move to Trash to confirm.