<?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 Orchestrate jobs using a parameter set in a notebook in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/orchestrate-jobs-using-a-parameter-set-in-a-notebook/m-p/54209#M30015</link>
    <description>&lt;P&gt;I am trying to orchestrate my Databricks Workflows tasks using a parameter I would set in a &lt;EM&gt;notebook&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;Given the workflow below I am trying to set a parameter in the &lt;EM&gt;Cinderella&lt;/EM&gt; task which is a python notebook. Once set I would like to use this parameter in the &lt;EM&gt;true_false_selection&lt;/EM&gt; block instead of this 1=1 condition. Something like:&lt;/P&gt;&lt;P&gt;if &lt;EM&gt;${notebook_parameter}&lt;/EM&gt; == "Rolling" --&amp;gt; execution continues to the &lt;EM&gt;isTrue&lt;/EM&gt; task which is also a python notebook&lt;/P&gt;&lt;P&gt;elif &lt;EM&gt;${notebook_parameter}&lt;/EM&gt; == "Prophet" --&amp;gt; execution continues to the &lt;EM&gt;isNotTrue&lt;/EM&gt; task which is another python notebook.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="george_ognyanov_0-1701258224857.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/5380i913214E15C8E328D/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="george_ognyanov_0-1701258224857.png" alt="george_ognyanov_0-1701258224857.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Precisely, I want to use parameter set inside notebook in this menu selection as the pseudo code shows:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="george_ognyanov_0-1701259276034.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/5382iDF31342641CC4707/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="george_ognyanov_0-1701259276034.png" alt="george_ognyanov_0-1701259276034.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am aware of both&amp;nbsp;&lt;BR /&gt;&lt;EM&gt;dbutils.jobs.taskValues.set(key='selection', value='Rolling') &lt;/EM&gt;&lt;BR /&gt;&amp;amp;&amp;amp;&amp;nbsp;&lt;BR /&gt;&lt;EM&gt;dbutils.widgets.text("selection", "Rolling")&lt;BR /&gt;&lt;/EM&gt;but it appears neither can be used in the if/else condition task.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Nov 2023 12:02:12 GMT</pubDate>
    <dc:creator>george_ognyanov</dc:creator>
    <dc:date>2023-11-29T12:02:12Z</dc:date>
    <item>
      <title>Orchestrate jobs using a parameter set in a notebook</title>
      <link>https://community.databricks.com/t5/data-engineering/orchestrate-jobs-using-a-parameter-set-in-a-notebook/m-p/54209#M30015</link>
      <description>&lt;P&gt;I am trying to orchestrate my Databricks Workflows tasks using a parameter I would set in a &lt;EM&gt;notebook&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;Given the workflow below I am trying to set a parameter in the &lt;EM&gt;Cinderella&lt;/EM&gt; task which is a python notebook. Once set I would like to use this parameter in the &lt;EM&gt;true_false_selection&lt;/EM&gt; block instead of this 1=1 condition. Something like:&lt;/P&gt;&lt;P&gt;if &lt;EM&gt;${notebook_parameter}&lt;/EM&gt; == "Rolling" --&amp;gt; execution continues to the &lt;EM&gt;isTrue&lt;/EM&gt; task which is also a python notebook&lt;/P&gt;&lt;P&gt;elif &lt;EM&gt;${notebook_parameter}&lt;/EM&gt; == "Prophet" --&amp;gt; execution continues to the &lt;EM&gt;isNotTrue&lt;/EM&gt; task which is another python notebook.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="george_ognyanov_0-1701258224857.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/5380i913214E15C8E328D/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="george_ognyanov_0-1701258224857.png" alt="george_ognyanov_0-1701258224857.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Precisely, I want to use parameter set inside notebook in this menu selection as the pseudo code shows:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="george_ognyanov_0-1701259276034.png" style="width: 999px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/5382iDF31342641CC4707/image-size/large/is-moderation-mode/true?v=v2&amp;amp;px=999" role="button" title="george_ognyanov_0-1701259276034.png" alt="george_ognyanov_0-1701259276034.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am aware of both&amp;nbsp;&lt;BR /&gt;&lt;EM&gt;dbutils.jobs.taskValues.set(key='selection', value='Rolling') &lt;/EM&gt;&lt;BR /&gt;&amp;amp;&amp;amp;&amp;nbsp;&lt;BR /&gt;&lt;EM&gt;dbutils.widgets.text("selection", "Rolling")&lt;BR /&gt;&lt;/EM&gt;but it appears neither can be used in the if/else condition task.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 12:02:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/orchestrate-jobs-using-a-parameter-set-in-a-notebook/m-p/54209#M30015</guid>
      <dc:creator>george_ognyanov</dc:creator>
      <dc:date>2023-11-29T12:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Orchestrate jobs using a parameter set in a notebook</title>
      <link>https://community.databricks.com/t5/data-engineering/orchestrate-jobs-using-a-parameter-set-in-a-notebook/m-p/63910#M32399</link>
      <description>&lt;P&gt;Here's how we can proceed, follow the instructions below:&lt;BR /&gt;&lt;BR /&gt;In your previous task, depending on whether you're using Python or Scala, set the task value like this:&lt;BR /&gt;&lt;STRONG&gt;dbutils.jobs.taskValues.set("check_value", "2")&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In your if-else task, you must reference the name of the previous task as follows:&lt;BR /&gt;&lt;STRONG&gt;{{tasks.['previous_task'].values.['check_value']}}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Please review the attached screenshot for further clarification&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Panda_0-1710635500605.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6681iEE2BD2BEFFDED86A/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="Panda_0-1710635500605.png" alt="Panda_0-1710635500605.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Mar 2024 00:34:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/orchestrate-jobs-using-a-parameter-set-in-a-notebook/m-p/63910#M32399</guid>
      <dc:creator>Panda</dc:creator>
      <dc:date>2024-03-17T00:34:38Z</dc:date>
    </item>
  </channel>
</rss>

