<?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 Re: Inquiry About Adding Filters on Notebook Dashboard in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/inquiry-about-adding-filters-on-notebook-dashboard/m-p/105144#M42010</link>
    <description>&lt;P&gt;Then you can use alternate way, which is to use &lt;STRONG&gt;widgets&lt;/STRONG&gt;&amp;nbsp;in databricks which you can leverage to parametrize your notebook and queries. And any changes to parameter will auto trigger the code block where you read parameter in cell.&lt;/P&gt;&lt;P&gt;Also, you can set action on widget changes like sepecific cell or complete notebook.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hariprasad_0-1736503840320.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/14038i1F5C6D21354558CA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hariprasad_0-1736503840320.png" alt="hariprasad_0-1736503840320.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is a sample Python code. Please note that the auto-trigger/execute functionality for specific cells only works with Python. For SQL, you need to templatize your queries in spark.sql. Ensure you include the following code line &lt;EM&gt;&lt;STRONG&gt;dbutils.widgets.get("catalog_name_param")&lt;/STRONG&gt;&lt;/EM&gt; in the cell to enable auto-triggering.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# To create a widget in the notebook, use the following command:
dbutils.widgets.text("catalog_name_param", "")&lt;/LI-CODE&gt;&lt;LI-CODE lang="python"&gt;# Read parameter in notebook with templatized SQL query
query = """
select * from system.information_schema.catalog_privileges
where catalog_name like :catalog_name_param
"""

args = {"catalog_name_param": dbutils.widgets.get("catalog_name_param")}

df = spark.sql(query, args)
display(df)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hariprasad_2-1736504271526.png" style="width: 821px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/14040i82CDF5A1AA12F6D7/image-dimensions/821x466?v=v2" width="821" height="466" role="button" title="hariprasad_2-1736504271526.png" alt="hariprasad_2-1736504271526.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Jan 2025 10:21:36 GMT</pubDate>
    <dc:creator>hari-prasad</dc:creator>
    <dc:date>2025-01-10T10:21:36Z</dc:date>
    <item>
      <title>Inquiry About Adding Filters on Notebook Dashboard</title>
      <link>https://community.databricks.com/t5/data-engineering/inquiry-about-adding-filters-on-notebook-dashboard/m-p/105129#M42001</link>
      <description>&lt;P&gt;Subject: Inquiry About Adding Filters on Notebook Dashboard&lt;/P&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have recently created some visuals on Notebook and added them to the Notebook dashboard. However, I am unable to find a way to add filters to the dashboard. I have looked through the available options but have not found anything related to filters.&lt;/P&gt;&lt;P&gt;Please note that I am referring to the Notebook dashboard and not the SQL Dashboard.&lt;/P&gt;&lt;P&gt;I would appreciate any guidance on how I can add filters to the Notebook dashboard.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 08:28:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/inquiry-about-adding-filters-on-notebook-dashboard/m-p/105129#M42001</guid>
      <dc:creator>amarnathpal</dc:creator>
      <dc:date>2025-01-10T08:28:23Z</dc:date>
    </item>
    <item>
      <title>Re: Inquiry About Adding Filters on Notebook Dashboard</title>
      <link>https://community.databricks.com/t5/data-engineering/inquiry-about-adding-filters-on-notebook-dashboard/m-p/105130#M42002</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/141803"&gt;@amarnathpal&lt;/a&gt;&amp;nbsp;Thank you for bringing this.&lt;BR /&gt;Currently, it is not possible to add filters directly to a Notebook dashboard in Databricks. The available options for adding filters are specific to AI/BI dashboards, which offer more advanced features such as cross-filtering, independent user sessions, and better scalability and management.&lt;BR /&gt;If you need to use filters, you might consider transitioning your notebook visualizations to an AI/BI dashboard. This can be done by using the "Add to Dashboard" option available for SQL cells in notebooks. This integration allows you to move your SQL cell content, including queries, parameters, and visualizations, to an AI/BI dashboard where you can then add and configure filters as needed&lt;BR /&gt;Check this:&amp;nbsp;&lt;A href="https://www.databricks.com/blog/present-and-share-notebook-results-in-aibi-dashboards" target="_blank"&gt;https://www.databricks.com/blog/present-and-share-notebook-results-in-aibi-dashboards&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 08:34:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/inquiry-about-adding-filters-on-notebook-dashboard/m-p/105130#M42002</guid>
      <dc:creator>shashank853</dc:creator>
      <dc:date>2025-01-10T08:34:20Z</dc:date>
    </item>
    <item>
      <title>Re: Inquiry About Adding Filters on Notebook Dashboard</title>
      <link>https://community.databricks.com/t5/data-engineering/inquiry-about-adding-filters-on-notebook-dashboard/m-p/105132#M42003</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/141803"&gt;@amarnathpal&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Please follow the steps below (1 to 5) from snapshot to add filters to your dashboard. Additionally, you may need to explore using parameters to customize your filters for optimized value selections.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hariprasad_0-1736500063896.png" style="width: 823px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/14035iE90BE55DA8B8B011/image-dimensions/823x405?v=v2" width="823" height="405" role="button" title="hariprasad_0-1736500063896.png" alt="hariprasad_0-1736500063896.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Hari Prasad&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 09:10:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/inquiry-about-adding-filters-on-notebook-dashboard/m-p/105132#M42003</guid>
      <dc:creator>hari-prasad</dc:creator>
      <dc:date>2025-01-10T09:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: Inquiry About Adding Filters on Notebook Dashboard</title>
      <link>https://community.databricks.com/t5/data-engineering/inquiry-about-adding-filters-on-notebook-dashboard/m-p/105134#M42005</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/98469"&gt;@hari-prasad&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you for your prompt response. The solution you provided seems suitable for an SQL Dashboard. However, my inquiry was specifically about the capabilities of the Notebook Dashboard.&lt;/P&gt;&lt;P&gt;To elaborate, I have displayed data in a notebook and created visuals accordingly. Upon adding these visuals to the dashboard using the "Add to Notebook Dashboard" option, it appears that the Notebook Dashboard lacks several features that I was hoping to access.&lt;/P&gt;&lt;P&gt;Could you please confirm if there are additional functionalities or workarounds available for enhancing the Notebook Dashboard, such as implementing filters directly within it?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 09:27:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/inquiry-about-adding-filters-on-notebook-dashboard/m-p/105134#M42005</guid>
      <dc:creator>amarnathpal</dc:creator>
      <dc:date>2025-01-10T09:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Inquiry About Adding Filters on Notebook Dashboard</title>
      <link>https://community.databricks.com/t5/data-engineering/inquiry-about-adding-filters-on-notebook-dashboard/m-p/105144#M42010</link>
      <description>&lt;P&gt;Then you can use alternate way, which is to use &lt;STRONG&gt;widgets&lt;/STRONG&gt;&amp;nbsp;in databricks which you can leverage to parametrize your notebook and queries. And any changes to parameter will auto trigger the code block where you read parameter in cell.&lt;/P&gt;&lt;P&gt;Also, you can set action on widget changes like sepecific cell or complete notebook.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hariprasad_0-1736503840320.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/14038i1F5C6D21354558CA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hariprasad_0-1736503840320.png" alt="hariprasad_0-1736503840320.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is a sample Python code. Please note that the auto-trigger/execute functionality for specific cells only works with Python. For SQL, you need to templatize your queries in spark.sql. Ensure you include the following code line &lt;EM&gt;&lt;STRONG&gt;dbutils.widgets.get("catalog_name_param")&lt;/STRONG&gt;&lt;/EM&gt; in the cell to enable auto-triggering.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# To create a widget in the notebook, use the following command:
dbutils.widgets.text("catalog_name_param", "")&lt;/LI-CODE&gt;&lt;LI-CODE lang="python"&gt;# Read parameter in notebook with templatized SQL query
query = """
select * from system.information_schema.catalog_privileges
where catalog_name like :catalog_name_param
"""

args = {"catalog_name_param": dbutils.widgets.get("catalog_name_param")}

df = spark.sql(query, args)
display(df)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hariprasad_2-1736504271526.png" style="width: 821px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/14040i82CDF5A1AA12F6D7/image-dimensions/821x466?v=v2" width="821" height="466" role="button" title="hariprasad_2-1736504271526.png" alt="hariprasad_2-1736504271526.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2025 10:21:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/inquiry-about-adding-filters-on-notebook-dashboard/m-p/105144#M42010</guid>
      <dc:creator>hari-prasad</dc:creator>
      <dc:date>2025-01-10T10:21:36Z</dc:date>
    </item>
  </channel>
</rss>

