<?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 Why catalog API does not include the catalog ID in the response? in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/why-catalog-api-does-not-include-the-catalog-id-in-the-response/m-p/118859#M3341</link>
    <description>&lt;P&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;I'm using Terraform(TF) to manage the Databricks resources.&lt;BR /&gt;&lt;BR /&gt;I would like to rename the Unity catalog using TF, but I could not. (similar issues have been reported for this:&lt;BR /&gt;-&amp;nbsp;&lt;A href="https://github.com/databricks/terraform-provider-databricks/issues?q=is%3Aissue%20state%3Aopen%20rename%20catalog" target="_blank" rel="noopener"&gt;https://github.com/databricks/terraform-provider-databricks/issues?q=is%3Aissue%20state%3Aopen%20rename%20catalog )&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;After investigating this issue, I found that the Terraform databricks_catalog resource is using the catalog name as its ID.&lt;BR /&gt;&lt;A href="https://github.com/databricks/terraform-provider-databricks/blob/1982317e41702b4210e54666a5681cfd2b1b8c92/catalog/resource_catalog.go#L87" target="_blank" rel="noopener"&gt;https://github.com/databricks/terraform-provider-databricks/blob/1982317e41702b4210e54666a5681cfd2b1b8c92/catalog/resource_catalog.go#L87&lt;/A&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;This causes several serious problems, including:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;It's impossible to rename a catalog using Terraform.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;If I rename a catalog created by Terraform via the UI, Terraform will recognize it as deleted and recreate it based on theTerraform configuration. As a result, two catalogs will exist.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;I looked into why Terraform is using the name as the ID, and it turns out that the REST API does not include the actual catalog ID in its response.&lt;BR /&gt;&lt;A href="https://docs.databricks.com/api/workspace/catalogs/get" target="_blank" rel="noopener"&gt;https://docs.databricks.com/api/workspace/catalogs/get&lt;/A&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Could you please modify the REST API to include the catalog ID in its response?&lt;BR /&gt;This issue is causing us significant trouble.&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Mon, 12 May 2025 09:03:37 GMT</pubDate>
    <dc:creator>littlewat</dc:creator>
    <dc:date>2025-05-12T09:03:37Z</dc:date>
    <item>
      <title>Why catalog API does not include the catalog ID in the response?</title>
      <link>https://community.databricks.com/t5/administration-architecture/why-catalog-api-does-not-include-the-catalog-id-in-the-response/m-p/118859#M3341</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;I'm using Terraform(TF) to manage the Databricks resources.&lt;BR /&gt;&lt;BR /&gt;I would like to rename the Unity catalog using TF, but I could not. (similar issues have been reported for this:&lt;BR /&gt;-&amp;nbsp;&lt;A href="https://github.com/databricks/terraform-provider-databricks/issues?q=is%3Aissue%20state%3Aopen%20rename%20catalog" target="_blank" rel="noopener"&gt;https://github.com/databricks/terraform-provider-databricks/issues?q=is%3Aissue%20state%3Aopen%20rename%20catalog )&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;After investigating this issue, I found that the Terraform databricks_catalog resource is using the catalog name as its ID.&lt;BR /&gt;&lt;A href="https://github.com/databricks/terraform-provider-databricks/blob/1982317e41702b4210e54666a5681cfd2b1b8c92/catalog/resource_catalog.go#L87" target="_blank" rel="noopener"&gt;https://github.com/databricks/terraform-provider-databricks/blob/1982317e41702b4210e54666a5681cfd2b1b8c92/catalog/resource_catalog.go#L87&lt;/A&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;This causes several serious problems, including:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;It's impossible to rename a catalog using Terraform.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P class=""&gt;If I rename a catalog created by Terraform via the UI, Terraform will recognize it as deleted and recreate it based on theTerraform configuration. As a result, two catalogs will exist.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P class=""&gt;I looked into why Terraform is using the name as the ID, and it turns out that the REST API does not include the actual catalog ID in its response.&lt;BR /&gt;&lt;A href="https://docs.databricks.com/api/workspace/catalogs/get" target="_blank" rel="noopener"&gt;https://docs.databricks.com/api/workspace/catalogs/get&lt;/A&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Could you please modify the REST API to include the catalog ID in its response?&lt;BR /&gt;This issue is causing us significant trouble.&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 09:03:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/why-catalog-api-does-not-include-the-catalog-id-in-the-response/m-p/118859#M3341</guid>
      <dc:creator>littlewat</dc:creator>
      <dc:date>2025-05-12T09:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why catalog API does not include the catalog ID in the response?</title>
      <link>https://community.databricks.com/t5/administration-architecture/why-catalog-api-does-not-include-the-catalog-id-in-the-response/m-p/119055#M3348</link>
      <description>&lt;DIV class="paragraph"&gt;The issue regarding renaming a Unity Catalog using Terraform is rooted in the way the Terraform &lt;CODE&gt;databricks_catalog&lt;/CODE&gt; resource is implemented. Specifically, the catalog name is being used as the resource's ID, which is a direct consequence of limitations in the Databricks REST API response that does not include an actual catalog ID. Because of this:&lt;/DIV&gt;
&lt;OL start="1"&gt;
&lt;LI&gt;It is currently not possible to rename a catalog via Terraform.&lt;/LI&gt;
&lt;LI&gt;Renaming a catalog outside Terraform (e.g., via the UI) causes Terraform to interpret the catalog as deleted and recreate it based on the Terraform configuration, leading to duplicate catalogs.&lt;/LI&gt;
&lt;/OL&gt;
&lt;DIV class="paragraph"&gt;From your investigation, it seems these behaviors align with certain known limitations within the Databricks Terraform provider. The relevant code snippet in &lt;CODE&gt;resource_catalog.go&lt;/CODE&gt; confirms the use of the name as the ID:&lt;/DIV&gt;
&lt;DIV class="paragraph"&gt;&lt;CODE&gt;
Id: catalog.Name,
&lt;/CODE&gt; .&lt;/DIV&gt;
&lt;DIV class="paragraph"&gt;You have correctly identified the root cause: the Databricks REST API does not provide a unique catalog ID in its response for workspace catalog operations. Although the Terraform provider relies on the API, this limitation is outside the scope of Terraform itself.&lt;/DIV&gt;
&lt;DIV class="paragraph"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="paragraph"&gt;Hope this helps, Lou.&lt;/DIV&gt;</description>
      <pubDate>Tue, 13 May 2025 14:00:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/why-catalog-api-does-not-include-the-catalog-id-in-the-response/m-p/119055#M3348</guid>
      <dc:creator>Louis_Frolio</dc:creator>
      <dc:date>2025-05-13T14:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Why catalog API does not include the catalog ID in the response?</title>
      <link>https://community.databricks.com/t5/administration-architecture/why-catalog-api-does-not-include-the-catalog-id-in-the-response/m-p/119106#M3349</link>
      <description>&lt;P class=""&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/34815"&gt;@Louis_Frolio&lt;/a&gt;&amp;nbsp;Thank you for your quick and thorough response! I'm glad to know that my assumption was correct.&lt;/P&gt;&lt;P class=""&gt;Would it be possible for you to escalate this issue to the backend team that is developing the catalog REST API?&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 00:45:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/why-catalog-api-does-not-include-the-catalog-id-in-the-response/m-p/119106#M3349</guid>
      <dc:creator>littlewat</dc:creator>
      <dc:date>2025-05-14T00:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Why catalog API does not include the catalog ID in the response?</title>
      <link>https://community.databricks.com/t5/administration-architecture/why-catalog-api-does-not-include-the-catalog-id-in-the-response/m-p/119185#M3354</link>
      <description>&lt;P&gt;I will pass your request along; however, there is nothing I can do to escalate the issue. I can only make the request.&amp;nbsp; Cheers, Lou.&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 13:41:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/why-catalog-api-does-not-include-the-catalog-id-in-the-response/m-p/119185#M3354</guid>
      <dc:creator>Louis_Frolio</dc:creator>
      <dc:date>2025-05-14T13:41:04Z</dc:date>
    </item>
  </channel>
</rss>

