<?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 Dynamic Parameter in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/dynamic-parameter/m-p/116966#M45402</link>
    <description>&lt;P&gt;I have a query I need to run with two parameters: Workflow and workflow steps. The dropdown list supplied by "Steps" should change based on the input of the "Workflow" dropdown.&lt;/P&gt;&lt;P&gt;When I use the following code, it creates the "Steps" dropdown list based on the "Workflow" value that is selected in the parameter&amp;nbsp;&lt;EM&gt;at that time&lt;/EM&gt;. And then the list will not change from there. Is it possible to configure the "Steps" parameter to consistently change the dropdown values as selections for "Workflow" change?&lt;/P&gt;&lt;P&gt;current code:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CREATE&lt;/SPAN&gt;&lt;SPAN&gt; WIDGET DROPDOWN Step &lt;/SPAN&gt;&lt;SPAN&gt;DEFAULT&lt;/SPAN&gt; &lt;SPAN&gt;'All'&lt;/SPAN&gt;&lt;SPAN&gt; CHOICES &lt;/SPAN&gt;&lt;SPAN&gt;SELECT&lt;/SPAN&gt;&lt;SPAN&gt; stepname &lt;/SPAN&gt;&lt;SPAN&gt;from&lt;/SPAN&gt; &lt;SPAN&gt;reference&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;workflowsteps&lt;/SPAN&gt; &lt;SPAN&gt;where&lt;/SPAN&gt;&lt;SPAN&gt; workflowname &lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt;(:Workflow)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 29 Apr 2025 12:40:53 GMT</pubDate>
    <dc:creator>SeekingSolution</dc:creator>
    <dc:date>2025-04-29T12:40:53Z</dc:date>
    <item>
      <title>Dynamic Parameter</title>
      <link>https://community.databricks.com/t5/data-engineering/dynamic-parameter/m-p/116966#M45402</link>
      <description>&lt;P&gt;I have a query I need to run with two parameters: Workflow and workflow steps. The dropdown list supplied by "Steps" should change based on the input of the "Workflow" dropdown.&lt;/P&gt;&lt;P&gt;When I use the following code, it creates the "Steps" dropdown list based on the "Workflow" value that is selected in the parameter&amp;nbsp;&lt;EM&gt;at that time&lt;/EM&gt;. And then the list will not change from there. Is it possible to configure the "Steps" parameter to consistently change the dropdown values as selections for "Workflow" change?&lt;/P&gt;&lt;P&gt;current code:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CREATE&lt;/SPAN&gt;&lt;SPAN&gt; WIDGET DROPDOWN Step &lt;/SPAN&gt;&lt;SPAN&gt;DEFAULT&lt;/SPAN&gt; &lt;SPAN&gt;'All'&lt;/SPAN&gt;&lt;SPAN&gt; CHOICES &lt;/SPAN&gt;&lt;SPAN&gt;SELECT&lt;/SPAN&gt;&lt;SPAN&gt; stepname &lt;/SPAN&gt;&lt;SPAN&gt;from&lt;/SPAN&gt; &lt;SPAN&gt;reference&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;workflowsteps&lt;/SPAN&gt; &lt;SPAN&gt;where&lt;/SPAN&gt;&lt;SPAN&gt; workflowname &lt;/SPAN&gt;&lt;SPAN&gt;in&lt;/SPAN&gt;&lt;SPAN&gt;(:Workflow)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 29 Apr 2025 12:40:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dynamic-parameter/m-p/116966#M45402</guid>
      <dc:creator>SeekingSolution</dc:creator>
      <dc:date>2025-04-29T12:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Parameter</title>
      <link>https://community.databricks.com/t5/data-engineering/dynamic-parameter/m-p/117119#M45428</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/162591"&gt;@SeekingSolution&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Databricks widgets don’t support dependent dropdowns automatically. So, when you create a Steps dropdown based on the Workflow selection, it won’t update on its own, you’ll need to manually re-run the cell that builds the Steps widget after selecting a different workflow.&lt;/P&gt;&lt;P&gt;You can set it up by by first creating the Workflow dropdown:&lt;/P&gt;&lt;P&gt;workflows = [row[0] for row in spark.sql("SELECT DISTINCT workflow_name FROM reference.workflowsteps").collect()] dbutils.widgets.dropdown("Workflow", workflows[0], workflows, "Workflow")&lt;/P&gt;&lt;P&gt;And then create the Steps dropdown (re-run this after selecting a Workflow)&lt;/P&gt;&lt;P&gt;selected_workflow = dbutils.widgets.get("Workflow") steps = [row[0] for row in spark.sql(f"SELECT stepname FROM reference.workflowsteps WHERE workflowname = '{selected_workflow}'").collect()] dbutils.widgets.dropdown("Steps", steps[0], steps, "Steps")&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2025 09:35:00 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dynamic-parameter/m-p/117119#M45428</guid>
      <dc:creator>SP_6721</dc:creator>
      <dc:date>2025-04-30T09:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic Parameter</title>
      <link>https://community.databricks.com/t5/data-engineering/dynamic-parameter/m-p/117546#M45524</link>
      <description>&lt;P&gt;That's a shame it has to be re-instantiated each time! Thank you for letting me know that functionality is not currently supported.&lt;/P&gt;</description>
      <pubDate>Fri, 02 May 2025 18:12:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/dynamic-parameter/m-p/117546#M45524</guid>
      <dc:creator>SeekingSolution</dc:creator>
      <dc:date>2025-05-02T18:12:45Z</dc:date>
    </item>
  </channel>
</rss>

