Databricks SQL Editor query takes forever (SQL Warehouse not working?)

Tessa Ickx 6 Reputation points
2022-12-26T09:42:33.167+00:00

Hello everyone,

I am working on Azure Databricks (premium pricing tier).

I have been working in the "data science & engineering" workspace, with a cluster compute resource, where I can see my data in the data tab, and I can also query it in a notebook. No problems there.

However, I wanted to add an alert. For this, I need to create a query in the SQL environment first.
I have an SQL Warehouse (starter warehouse, type classic, cluster size Small, min 1 max 1 worker).
I try to query a small table (I also have really big tables available). The query keeps running forever. When I click on the query, I see the following information: 274035-image.png . The query duration is 100% "Optimizing query & pruning files".
In the SQL data explorer, I can see all my tables, I can see the schema's, but the "sample data" tab also does not show anything.

Can someone help me view my data in the Databricks SQL environment? Is there any way I can use my working cluster from the "Data science & engineering" to create the SQL query and alert? Thank you.

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. PRADEEPCHEEKATLA 91,496 Reputation points Moderator
    2022-12-27T09:10:41.963+00:00

    Hello @Tessa Ickx ,

    Thanks for the question and using MS Q&A platform.

    As per the repro from my end, I'm able to see the sample data without any issue:

    274214-image.png

    Once the SQL Warehouses clusters are ready, you can view the data in the Databricks SQL environment without any issue.

    Note: For Databricks SQL enironment you need to use the clusters created in SQL Warehouses and you cannot use the clusters from the Data Science & Engineering compute to create the SQL query and alerts.

    You can create alert based on the query as shown below:

    274271-image.png

    Dashboards, Queries, and Alerts can now be organized and shared alongside existing Workspace content. Newly created DBSQL objects will be stored in your home folder. Learn more.

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is jhow you can be part of Q&A Volunteer Moderators

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.