<?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: Passing parameters in Databricks workflows in Machine Learning</title>
    <link>https://community.databricks.com/t5/machine-learning/passing-parameters-in-databricks-workflows/m-p/80528#M3516</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;&amp;nbsp;please allow me sometime, I will get back to you.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jul 2024 11:00:46 GMT</pubDate>
    <dc:creator>argl1995dbks</dc:creator>
    <dc:date>2024-07-25T11:00:46Z</dc:date>
    <item>
      <title>Passing parameters in Databricks workflows</title>
      <link>https://community.databricks.com/t5/machine-learning/passing-parameters-in-databricks-workflows/m-p/80057#M3490</link>
      <description>&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Hi Databricks, we have created several Databricks workflows and the `json-definition.json` for the same is stored inside version control i.e. GitHub. There are several parameters which are referred from params.json inside this job definition but the issue is the params.json is hardcoded as of current design.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;We are trying to figure out a way to pass config parameters to the Controller workflow without using hotfix branch / Databricks UI with some approvals/governance in place. Is there a more better way of doing this so that we don't have to dig inside the params.json to update/modify the existing keys/values.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;I am adding the basic tree structure for my MLOps repo:&lt;/FONT&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;├── README.md&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;├── databricks_notebook_jobs&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; ├── CONTROLLER_JOB_CLUSTER&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; │ &amp;nbsp; ├── YOUR_FIRST_NOTEBOOK_NAME.py&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; │ &amp;nbsp; ├── job-definition.json&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; │ &amp;nbsp; └── spark_env_vars&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; │ &amp;nbsp; &amp;nbsp; &amp;nbsp; ├── dev.json&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; │ &amp;nbsp; &amp;nbsp; &amp;nbsp; ├── expl.json&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; │ &amp;nbsp; &amp;nbsp; &amp;nbsp; ├── prod.json&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; │ &amp;nbsp; &amp;nbsp; &amp;nbsp; └── qa.json&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; ├── all_cluster_init.sh&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; ├── default_job_config.json&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; ├── example_module.py&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; └── release.json&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;├── devops&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; └── params.json&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;├── requirements.txt&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; └── utils&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; &amp;nbsp; &amp;nbsp; ├── Config.py&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; &amp;nbsp; &amp;nbsp; ├── Config_old.py&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; &amp;nbsp; &amp;nbsp; └── setenv.py&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;├── test_requirements.txt&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;├── tests&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;│ &amp;nbsp; └── test_cleaning_utils.py&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;└── version.py&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Please suggest.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 04:18:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/passing-parameters-in-databricks-workflows/m-p/80057#M3490</guid>
      <dc:creator>argl1995dbks</dc:creator>
      <dc:date>2024-07-23T04:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Passing parameters in Databricks workflows</title>
      <link>https://community.databricks.com/t5/machine-learning/passing-parameters-in-databricks-workflows/m-p/80069#M3495</link>
      <description>&lt;P&gt;Have you considered using Databricks Asset Bundles? Very easy to parameterize!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 06:42:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/passing-parameters-in-databricks-workflows/m-p/80069#M3495</guid>
      <dc:creator>jacovangelder</dc:creator>
      <dc:date>2024-07-23T06:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: Passing parameters in Databricks workflows</title>
      <link>https://community.databricks.com/t5/machine-learning/passing-parameters-in-databricks-workflows/m-p/80528#M3516</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;&amp;nbsp;please allow me sometime, I will get back to you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 11:00:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/passing-parameters-in-databricks-workflows/m-p/80528#M3516</guid>
      <dc:creator>argl1995dbks</dc:creator>
      <dc:date>2024-07-25T11:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Passing parameters in Databricks workflows</title>
      <link>https://community.databricks.com/t5/machine-learning/passing-parameters-in-databricks-workflows/m-p/80539#M3521</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/102253"&gt;@jacovangelder&lt;/a&gt;&amp;nbsp;, I have created a `variables.yaml` file i.e.&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;variables&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;job_cluster_key&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;description&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;Databricks job cluster&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;default&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;job_cluster&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and while I am trying to refer this variable in my `job.yaml` file like this:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;tasks&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - &lt;/SPAN&gt;&lt;SPAN&gt;task_key&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;Sum_Task&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;job_cluster_key&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;${var.job_cluster_key}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;spark_python_task&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;python_file&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;../src/sum.py&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;and when I tried to validate it using `databricks bundle validate`, I got this error:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;**Error: reference does not exist: ${variables.job_cluster_key}**&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;However, when I added variables in the same job.yaml file it is validated successfully.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any reasons, why is that?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 25 Jul 2024 11:33:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/passing-parameters-in-databricks-workflows/m-p/80539#M3521</guid>
      <dc:creator>argl1995dbks</dc:creator>
      <dc:date>2024-07-25T11:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: Passing parameters in Databricks workflows</title>
      <link>https://community.databricks.com/t5/machine-learning/passing-parameters-in-databricks-workflows/m-p/80540#M3522</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/102253"&gt;@jacovangelder&lt;/a&gt;&amp;nbsp;, I got the solution when you're referring the variables from the same file it should be referred as ${var.varname} and when you're referring from a different file use ${vars.varname}. Though I suspect why is that. Is there any specific reason?&lt;/P&gt;&lt;P&gt;Also I got an error at the time of deploying a bundle while referring the variables from another file, i.e. **A managed resource "vars" "job_cluster_key" has not been declared in the root&lt;BR /&gt;module.**&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 11:56:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/machine-learning/passing-parameters-in-databricks-workflows/m-p/80540#M3522</guid>
      <dc:creator>argl1995dbks</dc:creator>
      <dc:date>2024-07-25T11:56:52Z</dc:date>
    </item>
  </channel>
</rss>

