<?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: Catalog name's in DTAP scenario in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/catalog-name-s-in-dtap-scenario/m-p/39013#M26846</link>
    <description>&lt;P&gt;you could also store the environment name in a config file f.e. in the databricks filestore.&lt;/P&gt;&lt;P&gt;These config files can also be managed by ci/cd.&lt;BR /&gt;tbh my preferred way of working lately.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Aug 2023 11:31:33 GMT</pubDate>
    <dc:creator>-werners-</dc:creator>
    <dc:date>2023-08-03T11:31:33Z</dc:date>
    <item>
      <title>Catalog name's in DTAP scenario</title>
      <link>https://community.databricks.com/t5/data-engineering/catalog-name-s-in-dtap-scenario/m-p/38998#M26838</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm currently in the process of migrating to Unity Catalog. I have several Azure Databricks Workspaces, one for each phase of the development phase (development, test, acceptance, and production).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In accordance with the best practices (&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/best-practices#--organize-your-data" target="_blank"&gt;https://learn.microsoft.com/en-us/azure/databricks/data-governance/unity-catalog/best-practices#--organize-your-data&lt;/A&gt;) I've created a separate catalog for each workspace/environment.&lt;/P&gt;&lt;P&gt;This works great but it poses a challenge to my SQL notebooks that reference this catalog. Since my catalog name on development is different from test, acceptance, and production and I'm using CI/CD to deploy my notebooks I need a way to dynamically change the catalog that is being referenced in my SQL notebooks.&lt;/P&gt;&lt;P&gt;So far I've come up with the following two options:&lt;/P&gt;&lt;P&gt;1. Create a widget in my SQL notebooks that accept a catalog name and use a python cell to change to the right catalog by using spark.sql("use catalog xxxx")&lt;/P&gt;&lt;P&gt;2. Set the default catalog for each workspace to the corresponding catalog by using the Databricks rest API (&lt;A href="https://docs.databricks.com/api/azure/workspace/metastores/updateassignment" target="_blank"&gt;Update an assignment | Metastores API | REST API reference | Azure Databricks&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;Although these are both valid options in my opinion I'm wondering if I'm overlooking something or if there might be a better way to approach this. Any suggestions that you might have are very welcome.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 08:15:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/catalog-name-s-in-dtap-scenario/m-p/38998#M26838</guid>
      <dc:creator>ThomasVanBilsen</dc:creator>
      <dc:date>2023-08-03T08:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Catalog name's in DTAP scenario</title>
      <link>https://community.databricks.com/t5/data-engineering/catalog-name-s-in-dtap-scenario/m-p/39013#M26846</link>
      <description>&lt;P&gt;you could also store the environment name in a config file f.e. in the databricks filestore.&lt;/P&gt;&lt;P&gt;These config files can also be managed by ci/cd.&lt;BR /&gt;tbh my preferred way of working lately.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 11:31:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/catalog-name-s-in-dtap-scenario/m-p/39013#M26846</guid>
      <dc:creator>-werners-</dc:creator>
      <dc:date>2023-08-03T11:31:33Z</dc:date>
    </item>
  </channel>
</rss>

