<?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 how to access the catalog and schema from my program in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-access-the-catalog-and-schema-from-my-program/m-p/155840#M54322</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I am using the SDP editor. I have set the catalog and schema in setting. how to access those variables values in my program. I am doing as follows:&amp;nbsp; catalog = spark.conf.get("catalog") and it is similar for schema. When I try to use those variables, I find error as "dc is not set".&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In general how to access the variables in settings.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Subhas&lt;/P&gt;</description>
    <pubDate>Wed, 29 Apr 2026 23:38:14 GMT</pubDate>
    <dc:creator>Subhas1729</dc:creator>
    <dc:date>2026-04-29T23:38:14Z</dc:date>
    <item>
      <title>how to access the catalog and schema from my program</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-access-the-catalog-and-schema-from-my-program/m-p/155840#M54322</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;I am using the SDP editor. I have set the catalog and schema in setting. how to access those variables values in my program. I am doing as follows:&amp;nbsp; catalog = spark.conf.get("catalog") and it is similar for schema. When I try to use those variables, I find error as "dc is not set".&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In general how to access the variables in settings.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Subhas&lt;/P&gt;</description>
      <pubDate>Wed, 29 Apr 2026 23:38:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-access-the-catalog-and-schema-from-my-program/m-p/155840#M54322</guid>
      <dc:creator>Subhas1729</dc:creator>
      <dc:date>2026-04-29T23:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to access the catalog and schema from my program</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-access-the-catalog-and-schema-from-my-program/m-p/155854#M54324</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/228702"&gt;@Subhas1729&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Default location for data assets&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;section of the pipeline configuration UI sets the default catalog and schema for a pipeline. This default catalog and schema are used for all dataset definitions and table reads, unless overridden within the query. So if you don't specify it in your code it will still work.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="szymon_dybczak_0-1777530934234.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/26532iCCFAC85484B8C51C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="szymon_dybczak_0-1777530934234.png" alt="szymon_dybczak_0-1777530934234.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you just want to know what catalog/schema is currently active in your session, query it directly:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;current_catalog = spark.sql("SELECT current_catalog()").collect()[0][0]
current_schema  = spark.sql("SELECT current_schema()").collect()[0][0]&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;The approach you used would work if you set pipeline configrations. Then you can refer for key/value pairs defined there using following code:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;spark.conf.get("your_key")&lt;/LI-CODE&gt;&lt;P&gt;So in your case you can set catalog and schema config and read it with above code.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="szymon_dybczak_2-1777531054424.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/26534iC7CC082C7C07F491/image-size/medium?v=v2&amp;amp;px=400" role="button" title="szymon_dybczak_2-1777531054424.png" alt="szymon_dybczak_2-1777531054424.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If the answer was helpful, please consider marking it as solution&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2026 06:40:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-access-the-catalog-and-schema-from-my-program/m-p/155854#M54324</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2026-04-30T06:40:25Z</dc:date>
    </item>
  </channel>
</rss>

