Adding Widgets in SQL Notebooks for Data Warehouse

Glasier 440 Reputation points
2024-10-08T13:23:26.84+00:00

How can I add widgets for SQL using notebooks in Data Warehouse?

Azure Databricks
Azure Databricks
An Apache Spark-based analytics platform optimized for Azure.
2,218 questions
{count} votes

Accepted answer
  1. Smaran Thoomu 16,890 Reputation points Microsoft Vendor
    2024-10-08T14:15:52.57+00:00

    Hi @Glasier
    Welcome to the Microsoft Q&A and thank you for posting your questions here.
    As per this Documentation, It is only mentioned about the usage of the existing Widgets in the SQL warehouse but not the creation of the widgets through SQL code.

    You can see that it is giving the same result for the removal of widget as well.
    User's image

    It seems to be currently, creation and removal of widgets through SQL code is not supported in SQL warehouse.

    Appreciate if you could share the feedback on our feedback channel. Which would be open for the user community to upvote & comment on. This allows our product teams to effectively prioritize your request against our existing feature backlog and gives insight into the potential impact of implementing the suggested feature.

    If you want to use widgets, you can create the and remove the widgets by using the notebook UI. Go to Edit-> Add widget -> create widget like below.

    After creating widget, you can access the widget value in the SQL warehouse notebook by using :<widget_name> like below.

    User's image

    As an alternative, you could create a table to keep track of the widgets you need. This table can have a column for each widget. You can update or remove rows as needed and use the row value to access the widget's value.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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