<?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: Databricks bundle custom variables feature does not work for workspace host in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/databricks-bundle-custom-variables-feature-does-not-work-for/m-p/90829#M1829</link>
    <description>&lt;P&gt;Hosts can't - and shouldn't be - variable. If you have multiple hosts, you need to define them properly in targets.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Sep 2024 07:20:30 GMT</pubDate>
    <dc:creator>Witold</dc:creator>
    <dc:date>2024-09-18T07:20:30Z</dc:date>
    <item>
      <title>Databricks bundle custom variables feature does not work for workspace host</title>
      <link>https://community.databricks.com/t5/administration-architecture/databricks-bundle-custom-variables-feature-does-not-work-for/m-p/90801#M1827</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am not sure whether this is a bug. I followed the &lt;A href="https://learn.microsoft.com/en-us/azure/databricks/dev-tools/bundles/variables" target="_self"&gt;document&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;My databricks.yml file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;bundle:
  name: test

variables:
  DATABRICKS_HOST:
    description: The host of the Databricks workspace.
  DATABRICKS_JOB_RUNNING_SERVICE_PRINCIPAL_CLIENT_ID:
    description: The Databricks workspace service principal for running jobs.

targets:
  dev:
    mode: development
    default: true
    workspace:
      host: ${var.DATABRICKS_HOST}
    run_as:
      service_principal_name: ${var.DATABRICKS_JOB_RUNNING_SERVICE_PRINCIPAL_CLIENT_ID}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I run the following command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;databricks bundle validate --var="DATABRICKS_HOST=https://aaaaa" --var="DATABRICKS_JOB_RUNNING_SERVICE_PRINCIPAL_CLIENT_ID=asdasdasdaa"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I get the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;Name: test
Target: dev
Workspace:
  Host: ${var.DATABRICKS_HOST}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looks like the `${var.DATABRICKS_HOST}` custom variable&amp;nbsp;substitution does not work for `workspace.host`.&lt;/P&gt;&lt;P&gt;If I modify my&amp;nbsp;databricks.yml file to use the real value instead variable for `workspace.host`:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;bundle:
  name: test

variables:
  DATABRICKS_HOST:
    description: The host of the Databricks workspace.
  DATABRICKS_JOB_RUNNING_SERVICE_PRINCIPAL_CLIENT_ID:
    description: The Databricks workspace service principal for running jobs.

targets:
  dev:
    mode: development
    default: true
    workspace:
      host: https://aaaaa
    run_as:
      service_principal_name: ${var.DATABRICKS_JOB_RUNNING_SERVICE_PRINCIPAL_CLIENT_ID}&lt;/LI-CODE&gt;&lt;P&gt;Everything works including `databricks bundle deploy`. That means the custom variable substitution works for other configurations, but not for `workspace.host`.&lt;/P&gt;&lt;P&gt;What do you think?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Albert&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2024 23:36:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/databricks-bundle-custom-variables-feature-does-not-work-for/m-p/90801#M1827</guid>
      <dc:creator>AlbertWang</dc:creator>
      <dc:date>2024-09-17T23:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks bundle custom variables feature does not work for workspace host</title>
      <link>https://community.databricks.com/t5/administration-architecture/databricks-bundle-custom-variables-feature-does-not-work-for/m-p/90829#M1829</link>
      <description>&lt;P&gt;Hosts can't - and shouldn't be - variable. If you have multiple hosts, you need to define them properly in targets.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 07:20:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/databricks-bundle-custom-variables-feature-does-not-work-for/m-p/90829#M1829</guid>
      <dc:creator>Witold</dc:creator>
      <dc:date>2024-09-18T07:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks bundle custom variables feature does not work for workspace host</title>
      <link>https://community.databricks.com/t5/administration-architecture/databricks-bundle-custom-variables-feature-does-not-work-for/m-p/90831#M1830</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/115243"&gt;@AlbertWang&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;The &lt;A href="https://docs.databricks.com/en/dev-tools/bundles/settings.html#variables-mappings" target="_self"&gt;documentation&lt;/A&gt; states you cannot map workspace host:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="filipniziol_0-1726644087377.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/11306iCC67A534E9077A38/image-size/medium?v=v2&amp;amp;px=400" role="button" title="filipniziol_0-1726644087377.png" alt="filipniziol_0-1726644087377.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>Wed, 18 Sep 2024 07:21:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/databricks-bundle-custom-variables-feature-does-not-work-for/m-p/90831#M1830</guid>
      <dc:creator>filipniziol</dc:creator>
      <dc:date>2024-09-18T07:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks bundle custom variables feature does not work for workspace host</title>
      <link>https://community.databricks.com/t5/administration-architecture/databricks-bundle-custom-variables-feature-does-not-work-for/m-p/90965#M1845</link>
      <description>&lt;P&gt;Thank you for your kind reply,&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/107959"&gt;@Witold&lt;/a&gt;. May I ask why host should not be variable? Is there any specific reason?&lt;/P&gt;&lt;P&gt;I use Azure DevOps pipelines as the CI/CD tool. So I define the host in variable groups. I don't want to define it again in a different location (like the Databricks bundle file).&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Albert&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 20:23:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/databricks-bundle-custom-variables-feature-does-not-work-for/m-p/90965#M1845</guid>
      <dc:creator>AlbertWang</dc:creator>
      <dc:date>2024-09-18T20:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks bundle custom variables feature does not work for workspace host</title>
      <link>https://community.databricks.com/t5/administration-architecture/databricks-bundle-custom-variables-feature-does-not-work-for/m-p/90966#M1846</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/117376"&gt;@filipniziol&lt;/a&gt;. Even though I don't know why, but since it is a documented feature, it is not a bug &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2024 20:25:43 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/databricks-bundle-custom-variables-feature-does-not-work-for/m-p/90966#M1846</guid>
      <dc:creator>AlbertWang</dc:creator>
      <dc:date>2024-09-18T20:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks bundle custom variables feature does not work for workspace host</title>
      <link>https://community.databricks.com/t5/administration-architecture/databricks-bundle-custom-variables-feature-does-not-work-for/m-p/91003#M1847</link>
      <description>&lt;P&gt;Try to see it from the perspective of DAB, and not Azure DevOps. Your DevOps pipeline is only the orchestrating tool for DAB. Just think of a workspace being an environment, like a production environment. Do you want "anyone from the outside" (outside of DAB) decide what your production is? Is your production environment supposed to change every time you deploy?&lt;/P&gt;&lt;P&gt;Your answers will most likely be no for obvious reasons. And if you really want to change our target, your production environment to another workspace, it's usually associated with other, quite high efforts.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2024 08:06:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/databricks-bundle-custom-variables-feature-does-not-work-for/m-p/91003#M1847</guid>
      <dc:creator>Witold</dc:creator>
      <dc:date>2024-09-19T08:06:13Z</dc:date>
    </item>
  </channel>
</rss>

