<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic CREATED WIDGET - SQL syntax - how do I specify a label? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/created-widget-sql-syntax-how-do-i-specify-a-label/m-p/96888#M39358</link>
    <description>&lt;P&gt;What is the syntax in SQL for creating a widget in a notebook with a label?&lt;BR /&gt;&lt;BR /&gt;This &lt;A href="https://docs.databricks.com/en/notebooks/widgets.html#language-sql" target="_self"&gt;documentation&lt;/A&gt; says "The last argument is &lt;SPAN class=""&gt;label&lt;/SPAN&gt;, an optional value for the label shown over the widget text box or dropdown."&lt;BR /&gt;The one example provided on that page doesn't use a label for the widget. Here are my attempts:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;CREATE WIDGET TEXT some_variable DEFAULT 'a great default' --succeeds, but no label
CREATE WIDGET TEXT some_variable DEFAULT 'a great default' 'some label/description' --syntax error
CREATE WIDGET TEXT some_variable DEFAULT 'a great default' LABEL 'some label/description' --syntax error&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Oct 2024 22:04:57 GMT</pubDate>
    <dc:creator>eriodega</dc:creator>
    <dc:date>2024-10-30T22:04:57Z</dc:date>
    <item>
      <title>CREATED WIDGET - SQL syntax - how do I specify a label?</title>
      <link>https://community.databricks.com/t5/data-engineering/created-widget-sql-syntax-how-do-i-specify-a-label/m-p/96888#M39358</link>
      <description>&lt;P&gt;What is the syntax in SQL for creating a widget in a notebook with a label?&lt;BR /&gt;&lt;BR /&gt;This &lt;A href="https://docs.databricks.com/en/notebooks/widgets.html#language-sql" target="_self"&gt;documentation&lt;/A&gt; says "The last argument is &lt;SPAN class=""&gt;label&lt;/SPAN&gt;, an optional value for the label shown over the widget text box or dropdown."&lt;BR /&gt;The one example provided on that page doesn't use a label for the widget. Here are my attempts:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="java"&gt;CREATE WIDGET TEXT some_variable DEFAULT 'a great default' --succeeds, but no label
CREATE WIDGET TEXT some_variable DEFAULT 'a great default' 'some label/description' --syntax error
CREATE WIDGET TEXT some_variable DEFAULT 'a great default' LABEL 'some label/description' --syntax error&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 22:04:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/created-widget-sql-syntax-how-do-i-specify-a-label/m-p/96888#M39358</guid>
      <dc:creator>eriodega</dc:creator>
      <dc:date>2024-10-30T22:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: CREATED WIDGET - SQL syntax - how do I specify a label?</title>
      <link>https://community.databricks.com/t5/data-engineering/created-widget-sql-syntax-how-do-i-specify-a-label/m-p/96894#M39359</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/115065"&gt;@eriodega&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I do not know how it works with sql but a possibility is to use a python cell in your SQL notebook and create it like this:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;%python
dbutils.widgets.text("some_name", "a great default", "some label/description")&lt;/LI-CODE&gt;&lt;P&gt;All the best&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 00:32:16 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/created-widget-sql-syntax-how-do-i-specify-a-label/m-p/96894#M39359</guid>
      <dc:creator>nefflev</dc:creator>
      <dc:date>2024-10-31T00:32:16Z</dc:date>
    </item>
  </channel>
</rss>

