<?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 Federated query on the source in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/federated-query-on-the-source/m-p/114929#M44989</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I want to be able to run an arbitrary query on the source before its result gets sent to databricks. I want to create something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;create table gold.bigquery&lt;BR /&gt;USING org.apache.spark.sql.jdbc&lt;BR /&gt;options&lt;BR /&gt;( url "jdbc:postgresql://---:---/---",&lt;BR /&gt;driver "org.postgresql.Driver", user "---",&lt;BR /&gt;password "---",&lt;BR /&gt;query "select aa, bb, cc from a join b on a.k = b.k join c on a.k = c.j"&lt;BR /&gt;)&lt;DIV&gt;&lt;P&gt;but of course, I get this error:&lt;/P&gt;&lt;P&gt;[UC_FILE_SCHEME_FOR_TABLE_CREATION_NOT_SUPPORTED] Creating table in Unity Catalog with file scheme jdbc is not supported.&lt;BR /&gt;Instead, please create a federated data source connection using the CREATE CONNECTION command for the same table provider, then create a catalog based on the connection with a CREATE FOREIGN CATALOG command to reference the tables therein.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only workaround that I see is creating a view on the source with that code and that view will be available in the foreign catalog. But the problem is that they won't let me do that.Is there any chance this could be a feature offered by Unity Catalog in the future?&lt;/P&gt;&lt;P&gt;I know that filters and groups are pushed down to the source through the foreign catalog. But the example query that I am showing uses joins which I know are not pushed down. Hence the necessity to create the query in the alternative way.&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 09 Apr 2025 09:11:53 GMT</pubDate>
    <dc:creator>thomas_berry</dc:creator>
    <dc:date>2025-04-09T09:11:53Z</dc:date>
    <item>
      <title>Federated query on the source</title>
      <link>https://community.databricks.com/t5/data-engineering/federated-query-on-the-source/m-p/114929#M44989</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I want to be able to run an arbitrary query on the source before its result gets sent to databricks. I want to create something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;create table gold.bigquery&lt;BR /&gt;USING org.apache.spark.sql.jdbc&lt;BR /&gt;options&lt;BR /&gt;( url "jdbc:postgresql://---:---/---",&lt;BR /&gt;driver "org.postgresql.Driver", user "---",&lt;BR /&gt;password "---",&lt;BR /&gt;query "select aa, bb, cc from a join b on a.k = b.k join c on a.k = c.j"&lt;BR /&gt;)&lt;DIV&gt;&lt;P&gt;but of course, I get this error:&lt;/P&gt;&lt;P&gt;[UC_FILE_SCHEME_FOR_TABLE_CREATION_NOT_SUPPORTED] Creating table in Unity Catalog with file scheme jdbc is not supported.&lt;BR /&gt;Instead, please create a federated data source connection using the CREATE CONNECTION command for the same table provider, then create a catalog based on the connection with a CREATE FOREIGN CATALOG command to reference the tables therein.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only workaround that I see is creating a view on the source with that code and that view will be available in the foreign catalog. But the problem is that they won't let me do that.Is there any chance this could be a feature offered by Unity Catalog in the future?&lt;/P&gt;&lt;P&gt;I know that filters and groups are pushed down to the source through the foreign catalog. But the example query that I am showing uses joins which I know are not pushed down. Hence the necessity to create the query in the alternative way.&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 09 Apr 2025 09:11:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/federated-query-on-the-source/m-p/114929#M44989</guid>
      <dc:creator>thomas_berry</dc:creator>
      <dc:date>2025-04-09T09:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Federated query on the source</title>
      <link>https://community.databricks.com/t5/data-engineering/federated-query-on-the-source/m-p/115452#M45087</link>
      <description>&lt;P&gt;Hi&amp;nbsp;thomas_berry,&lt;/P&gt;&lt;P&gt;How are you doing today?, As per my understanding,&amp;nbsp;&lt;SPAN&gt;You're spot on with your understanding, and you're not alone in running into this limitation. Unity Catalog doesn’t currently support creating tables using a JDBC &lt;/SPAN&gt;&lt;SPAN&gt;query&lt;/SPAN&gt;&lt;SPAN&gt; like in your example, especially with complex joins, because &lt;/SPAN&gt;&lt;SPAN&gt;UC doesn't allow JDBC-based file schemes for table creation&lt;/SPAN&gt;&lt;SPAN&gt;—it expects you to use &lt;/SPAN&gt;&lt;SPAN&gt;foreign catalogs&lt;/SPAN&gt;&lt;SPAN&gt; through &lt;/SPAN&gt;&lt;SPAN&gt;CREATE CONNECTION&lt;/SPAN&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;SPAN&gt;CREATE FOREIGN CATALOG&lt;/SPAN&gt;&lt;SPAN&gt;. And you're right—those only expose existing tables or views in the source, and &lt;/SPAN&gt;&lt;SPAN&gt;joins in custom queries aren’t supported unless pre-defined as views&lt;/SPAN&gt;&lt;SPAN&gt; on the source side. Unfortunately, if you’re not allowed to create views in the source system, that limits your options. For now, the best workaround is to pull the tables individually through the foreign catalog into Databricks and then write the &lt;/SPAN&gt;&lt;SPAN&gt;join logic within Databricks&lt;/SPAN&gt;&lt;SPAN&gt; (even though it won’t be pushed down). It’s not ideal for performance, but it's the safest option when view creation is off the table. Hopefully in the future, Unity Catalog might support more flexible query definitions for federated sources—but for now, we're a bit limited there. Let me know if you want help building a workaround using Databricks-side logic!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Brahma&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Apr 2025 04:13:49 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/federated-query-on-the-source/m-p/115452#M45087</guid>
      <dc:creator>Brahmareddy</dc:creator>
      <dc:date>2025-04-15T04:13:49Z</dc:date>
    </item>
  </channel>
</rss>

