<?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: How to Connect Databricks to Snowflake &amp;amp; Query Live Data? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-connect-databricks-to-snowflake-amp-query-live-data/m-p/175652#M57035</link>
    <description>&lt;P data-pm-slice="1 1 []"&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/177179"&gt;@Raj_DB&lt;/a&gt;&amp;nbsp;, in &lt;A href="https://docs.databricks.com/aws/en/query-federation/snowflake-pem" target="_blank"&gt;query federation&lt;/A&gt;, "JDBC pushes the Unity Catalog query down to the external database", so each notebook query reads Snowflake's current data. To set up &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/22314"&gt;@saurabh18cs&lt;/a&gt;&amp;nbsp;saurabh18cs's &lt;CODE&gt;snowflake_catalog&lt;/CODE&gt; example with PEM private key auth:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;Generate an &lt;A href="https://docs.databricks.com/aws/en/query-federation/snowflake-pem#limitations" target="_blank"&gt;unencrypted private key&lt;/A&gt; with &lt;CODE&gt;-nocrypt&lt;/CODE&gt; and &lt;A href="https://docs.snowflake.com/en/user-guide/key-pair-auth#register-a-named-key-pair-recommended" target="_blank"&gt;register the public key&lt;/A&gt; on the Snowflake user:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-bash"&gt; openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 -nocrypt
 openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Store the user name and private key (&lt;A href="https://docs.databricks.com/aws/en/query-federation/snowflake-pem#format-the-pem-private-key" target="_blank"&gt;on one line, without header or footer lines&lt;/A&gt;) in a &lt;A href="https://docs.databricks.com/aws/en/security/secrets/" target="_blank"&gt;secret scope&lt;/A&gt;, then &lt;A href="https://docs.databricks.com/aws/en/query-federation/snowflake-pem#create-a-connection" target="_blank"&gt;create the connection&lt;/A&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-sql"&gt; CREATE CONNECTION snowflake_conn TYPE snowflake
 OPTIONS (
   host '&amp;lt;account-identifier&amp;gt;.snowflakecomputing.com',
   port '443',
   sfWarehouse '&amp;lt;warehouse&amp;gt;',
   user secret('&amp;lt;scope&amp;gt;', '&amp;lt;user-secret-name&amp;gt;'),
   pem_private_key secret('&amp;lt;scope&amp;gt;', '&amp;lt;pem-secret-name&amp;gt;')
 );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;A href="https://docs.databricks.com/aws/en/query-federation/database-federation#create-a-foreign-catalog" target="_blank"&gt;Create the foreign catalog&lt;/A&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-sql"&gt; CREATE FOREIGN CATALOG snowflake_catalog USING CONNECTION snowflake_conn
 OPTIONS (database '&amp;lt;snowflake_database&amp;gt;');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Nov 2026 04:25:57 GMT</pubDate>
    <dc:creator>AbhilashNagilla</dc:creator>
    <dc:date>2026-11-05T04:25:57Z</dc:date>
    <item>
      <title>How to Connect Databricks to Snowflake &amp; Query Live Data?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-connect-databricks-to-snowflake-amp-query-live-data/m-p/175542#M57018</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am looking for a method to connect Databricks to Snowflake so I can query and transform the data directly in a notebook.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I specifically want to avoid methods that just perform a one-time copy of the tables into Databricks,&lt;/SPAN&gt;&lt;SPAN&gt; as I need the data in my notebook to reflect the latest refreshed data in Snowflake.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can anyone suggest the best architectural approach for this?&lt;/SPAN&gt;&lt;SPAN&gt; If you have any sample code on how to establish the connection and query the live data,&lt;/SPAN&gt;&lt;SPAN&gt; that would be greatly appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2026 11:33:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-connect-databricks-to-snowflake-amp-query-live-data/m-p/175542#M57018</guid>
      <dc:creator>Raj_DB</dc:creator>
      <dc:date>2026-11-04T11:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to Connect Databricks to Snowflake &amp; Query Live Data?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-connect-databricks-to-snowflake-amp-query-live-data/m-p/175556#M57019</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/177179"&gt;@Raj_DB&lt;/a&gt;&amp;nbsp;&amp;nbsp;I would treat this as a more of federated-query problem statement than ingestion.1) lakehouse federation (catalog federtation):&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-gb/azure/databricks/query-federation/" rel="noopener" target="_blank"&gt;https://learn.microsoft.com/en-gb/azure/databricks/query-federation/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;you can expose the external source through Unity Catalog and query it with normal Databricks SQL.&lt;DIV&gt;This is preferable in an enterprise Unity Catalog environment because connection/governance can be managed centrally instead of every notebook carrying its own Snowflake connection configuration.&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;df = spark.sql("""&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SELECT *&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM snowflake_catalog.sales.orders&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WHERE order_date &amp;gt;= current_date() - INTERVAL 7 DAYS&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;""")&lt;/SPAN&gt;&lt;DIV&gt;&amp;nbsp;&lt;DIV&gt;&lt;SPAN&gt;display(df)&lt;/SPAN&gt;&lt;DIV&gt;&amp;nbsp;&lt;DIV&gt;&lt;SPAN&gt;2) snowflake spark connectior (legacy query federation )&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;A href="https://docs.databricks.com/aws/en/archive/connectors/snowflake" rel="noopener" target="_blank"&gt;https://docs.databricks.com/aws/en/archive/connectors/snowflake&lt;/A&gt;&lt;/SPAN&gt;&lt;DIV&gt;&amp;nbsp;&lt;DIV&gt;&lt;DIV&gt;If federation isn't available/suitable in your environment, the Snowflake Spark connector is the more traditional approach.&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;sfOptions = {&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "sfUrl": "&amp;lt;account&amp;gt;.snowflakecomputing.com",&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "sfUser": "...",&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "sfDatabase": "MY_DB",&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "sfSchema": "MY_SCHEMA",&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "sfWarehouse": "MY_WH"&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;DIV&gt;&amp;nbsp;&lt;DIV&gt;&lt;SPAN&gt;df = (&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; spark.read&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .format("snowflake")&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .options(**sfOptions)&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .option("dbtable", "CUSTOMERS")&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .load()&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2026 12:11:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-connect-databricks-to-snowflake-amp-query-live-data/m-p/175556#M57019</guid>
      <dc:creator>saurabh18cs</dc:creator>
      <dc:date>2026-11-04T12:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to Connect Databricks to Snowflake &amp; Query Live Data?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-connect-databricks-to-snowflake-amp-query-live-data/m-p/175567#M57022</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/177179"&gt;@Raj_DB&lt;/a&gt;, Databricks has native Lakeflow connector to connect with Snowflake and ingest data. But it is not a recommended solution if your requirement is to only read data and not have it physically ingested in a catalog. If data is read-only then consider using Federation.&lt;/P&gt;&lt;P&gt;Source that can reply you decide -&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Read and write data from Snowflake, archived and Experimental (the page with the disclaimer): &lt;A href="https://docs.databricks.com/aws/en/archive/connectors/snowflake" rel="nofollow noopener noreferrer" target="_blank"&gt;https://docs.databricks.com/aws/en/archive/connectors/snowflake&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;What is Lakehouse Federation? &lt;A href="https://docs.databricks.com/aws/en/query-federation/" rel="nofollow noopener noreferrer" target="_blank"&gt;https://docs.databricks.com/aws/en/query-federation/&lt;/A&gt; . What is query federation? &lt;A href="https://docs.databricks.com/aws/en/query-federation/database-federation" rel="nofollow noopener noreferrer" target="_blank"&gt;https://docs.databricks.com/aws/en/query-federation/database-federation&lt;/A&gt; . Run federated queries on Snowflake: &lt;A href="https://docs.databricks.com/aws/en/query-federation/snowflake" rel="nofollow noopener noreferrer" target="_blank"&gt;https://docs.databricks.com/aws/en/query-federation/snowflake&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;What is Lakeflow Connect? (Federation versus Lakeflow decision rule): &lt;A href="https://docs.databricks.com/aws/en/ingestion/overview" rel="nofollow noopener noreferrer" target="_blank"&gt;https://docs.databricks.com/aws/en/ingestion/overview&lt;/A&gt; . Managed connectors in Lakeflow Connect: &lt;A href="https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/" rel="nofollow noopener noreferrer" target="_blank"&gt;https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Query-based connectors overview: &lt;A href="https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/query-based-overview" rel="nofollow noopener noreferrer" target="_blank"&gt;https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/query-based-overview&lt;/A&gt; . Create a query-based ingestion pipeline: &lt;A href="https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/query-based-pipeline" rel="nofollow noopener noreferrer" target="_blank"&gt;https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/query-based-pipeline&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Configuring Snowflake for Spark in Databricks (Snowflake docs): &lt;A href="https://docs.snowflake.com/en/user-guide/spark-connector-databricks" rel="nofollow noopener noreferrer" target="_blank"&gt;https://docs.snowflake.com/en/user-guide/spark-connector-databricks&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 04 Nov 2026 14:02:59 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-connect-databricks-to-snowflake-amp-query-live-data/m-p/175567#M57022</guid>
      <dc:creator>Harshad_B</dc:creator>
      <dc:date>2026-11-04T14:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to Connect Databricks to Snowflake &amp; Query Live Data?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-connect-databricks-to-snowflake-amp-query-live-data/m-p/175652#M57035</link>
      <description>&lt;P data-pm-slice="1 1 []"&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/177179"&gt;@Raj_DB&lt;/a&gt;&amp;nbsp;, in &lt;A href="https://docs.databricks.com/aws/en/query-federation/snowflake-pem" target="_blank"&gt;query federation&lt;/A&gt;, "JDBC pushes the Unity Catalog query down to the external database", so each notebook query reads Snowflake's current data. To set up &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/22314"&gt;@saurabh18cs&lt;/a&gt;&amp;nbsp;saurabh18cs's &lt;CODE&gt;snowflake_catalog&lt;/CODE&gt; example with PEM private key auth:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;P&gt;Generate an &lt;A href="https://docs.databricks.com/aws/en/query-federation/snowflake-pem#limitations" target="_blank"&gt;unencrypted private key&lt;/A&gt; with &lt;CODE&gt;-nocrypt&lt;/CODE&gt; and &lt;A href="https://docs.snowflake.com/en/user-guide/key-pair-auth#register-a-named-key-pair-recommended" target="_blank"&gt;register the public key&lt;/A&gt; on the Snowflake user:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-bash"&gt; openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 -nocrypt
 openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;Store the user name and private key (&lt;A href="https://docs.databricks.com/aws/en/query-federation/snowflake-pem#format-the-pem-private-key" target="_blank"&gt;on one line, without header or footer lines&lt;/A&gt;) in a &lt;A href="https://docs.databricks.com/aws/en/security/secrets/" target="_blank"&gt;secret scope&lt;/A&gt;, then &lt;A href="https://docs.databricks.com/aws/en/query-federation/snowflake-pem#create-a-connection" target="_blank"&gt;create the connection&lt;/A&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-sql"&gt; CREATE CONNECTION snowflake_conn TYPE snowflake
 OPTIONS (
   host '&amp;lt;account-identifier&amp;gt;.snowflakecomputing.com',
   port '443',
   sfWarehouse '&amp;lt;warehouse&amp;gt;',
   user secret('&amp;lt;scope&amp;gt;', '&amp;lt;user-secret-name&amp;gt;'),
   pem_private_key secret('&amp;lt;scope&amp;gt;', '&amp;lt;pem-secret-name&amp;gt;')
 );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;
&lt;P&gt;&lt;A href="https://docs.databricks.com/aws/en/query-federation/database-federation#create-a-foreign-catalog" target="_blank"&gt;Create the foreign catalog&lt;/A&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-sql"&gt; CREATE FOREIGN CATALOG snowflake_catalog USING CONNECTION snowflake_conn
 OPTIONS (database '&amp;lt;snowflake_database&amp;gt;');&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2026 04:25:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-connect-databricks-to-snowflake-amp-query-live-data/m-p/175652#M57035</guid>
      <dc:creator>AbhilashNagilla</dc:creator>
      <dc:date>2026-11-05T04:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to Connect Databricks to Snowflake &amp; Query Live Data?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-connect-databricks-to-snowflake-amp-query-live-data/m-p/175657#M57036</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/177179"&gt;@Raj_DB&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can use the below code snippet&lt;/P&gt;&lt;P&gt;from pyspark.sql import SparkSession&lt;BR /&gt;import pandas as pd&lt;/P&gt;&lt;P&gt;def read_from_snowflake_ELC(query):&lt;BR /&gt;# Initialize Spark session&lt;BR /&gt;spark = SparkSession.builder \&lt;BR /&gt;.appName("SnowflakeQueryExample") \&lt;BR /&gt;.getOrCreate()&lt;/P&gt;&lt;P&gt;# Snowflake connection options&lt;BR /&gt;options = {&lt;BR /&gt;"sfURL": "XXXXX", # Replace with your Snowflake account URL&lt;BR /&gt;"sfUser": "XXXXX", #your snowflake user account&lt;BR /&gt;"sfPassword": "XXXXX", #your snowflake password&lt;BR /&gt;"sfDatabase": "DAAS", #your snowflake database&lt;BR /&gt;"sfSchema": "XXXXX", #your snowflake schema&lt;BR /&gt;"sfWarehouse": "XXXXX", #your snowflake warehouse&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;# Execute the query and load the result into a Spark DataFrame&lt;BR /&gt;snowflake_table = (spark.read&lt;BR /&gt;.format("snowflake")&lt;BR /&gt;.options(**options)&lt;BR /&gt;.option("query", query)&lt;BR /&gt;.load()&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;# Convert Spark DataFrame to Pandas DataFrame&lt;BR /&gt;&lt;BR /&gt;return snowflake_table&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;query = (f''' select * from dbo.table_A ''')&lt;/P&gt;&lt;P&gt;reading data into a dataframe:-&lt;BR /&gt;df = read_from_snowflake(query)&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2026 06:16:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-connect-databricks-to-snowflake-amp-query-live-data/m-p/175657#M57036</guid>
      <dc:creator>Aravind_Reddy</dc:creator>
      <dc:date>2026-11-05T06:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to Connect Databricks to Snowflake &amp; Query Live Data?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-connect-databricks-to-snowflake-amp-query-live-data/m-p/175747#M57048</link>
      <description>&lt;P&gt;HI, &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/177179"&gt;@Raj_DB&lt;/a&gt;,&amp;nbsp;Lakehouse Federation with a Snowflake connection and a foreign catalog fits this requirement.&lt;/P&gt;&lt;P&gt;After configuring those objects, you can query from a notebook:&lt;/P&gt;&lt;P&gt;df = spark.sql("""&lt;BR /&gt;SELECT *&lt;BR /&gt;FROM snowflake_catalog.sales.orders&lt;BR /&gt;WHERE order_date &amp;gt;= current_date() - INTERVAL 7 DAYS&lt;BR /&gt;""")&lt;BR /&gt;display(df)&lt;/P&gt;&lt;P&gt;Replace the catalog, schema, and table names with your own.&lt;/P&gt;&lt;P&gt;For query federation, the query is pushed to Snowflake rather than reading a previously copied Delta table. However, an already displayed notebook result will not refresh automatically: rerun the query to retrieve updated data.&lt;/P&gt;&lt;P&gt;Check network access, Unity Catalog permissions, and supported compute before setting up the connection.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.databricks.com/aws/en/query-federation/snowflake" target="_blank"&gt;https://docs.databricks.com/aws/en/query-federation/snowflake&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2026 03:58:38 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-connect-databricks-to-snowflake-amp-query-live-data/m-p/175747#M57048</guid>
      <dc:creator>Jen_Evangelista</dc:creator>
      <dc:date>2026-11-06T03:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to Connect Databricks to Snowflake &amp; Query Live Data?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-connect-databricks-to-snowflake-amp-query-live-data/m-p/175759#M57053</link>
      <description>&lt;P&gt;Lakehouse Federation is the right way to query live Snowflake data directly from a notebook. Every query runs live against Snowflake with no data copy and hence the results are fresh. More details &lt;A href="https://docs.databricks.com/aws/en/query-federation/snowflake#query-federation" target="_self"&gt;here&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CREATE CONNECTION conn_snow TYPE snowflake
OPTIONS (
  host 'snow.snowflakecomputing.com',
  port '443',
  sfWarehouse 'snowwh',
  user secret('secretscope', 'key'),
  password secret('secretscope', 'key')
);

CREATE FOREIGN CATALOG snowflake_catalog
USING CONNECTION conn_snow
OPTIONS (database 'snowdb');&lt;/LI-CODE&gt;&lt;P&gt;You can query the tables using below in notebook&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SELECT * FROM snowflake_catalog.schema.table&lt;/LI-CODE&gt;&lt;P&gt;You may use catalog federation if the snowflake data is stored as Apache Iceberg tables. When the tables are managed as Apache Iceberg, Databricks can read directly from cloud storage using external locations and authorized paths. It bypasses snowflake compute and is faster than JDBC. It will not work for normal Snowflake tables. More details &lt;A href="https://docs.databricks.com/aws/en/query-federation/snowflake-catalog-federation" target="_self"&gt;here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can avoid the old Snowflake Spark connectors. Also avoid manual JDBC connections as it bypasses Unity Catalog governance&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2026 07:40:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-connect-databricks-to-snowflake-amp-query-live-data/m-p/175759#M57053</guid>
      <dc:creator>balajij8</dc:creator>
      <dc:date>2026-11-06T07:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to Connect Databricks to Snowflake &amp; Query Live Data?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-connect-databricks-to-snowflake-amp-query-live-data/m-p/175790#M57062</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/177179"&gt;@Raj_DB&lt;/a&gt;, I took a look at both internal and external documentation and here is what I found.&lt;/P&gt;
&lt;P&gt;The thread already has the right answer: Lakehouse Federation. &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/22314"&gt;@saurabh18cs&lt;/a&gt;, &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/201049"&gt;@Harshad_B&lt;/a&gt;, &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/230476"&gt;@AbhilashNagilla&lt;/a&gt;, &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/192529"&gt;@Aravind_Reddy&lt;/a&gt;, &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/266991"&gt;@Jen_Evangelista&lt;/a&gt; and &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/210897"&gt;@balajij8&lt;/a&gt; all pointed there, so I'll confirm it and fill in a few gaps.&lt;/P&gt;
&lt;P&gt;Why they are right.&lt;/P&gt;
&lt;P&gt;You create a Unity Catalog connection to Snowflake and a foreign catalog that mirrors your Snowflake database. Nothing is copied. Each query is pushed down to Snowflake over JDBC and runs against whatever is in the table at that moment, and Databricks doesn't use its result or disk cache for federated queries, so there's no stale layer in between.&lt;/P&gt;
&lt;P&gt;Jen's point still stands: a displayed cell output is static, so rerun it for fresh data. The DataFrame itself isn't a snapshot either. Spark is lazy, so every action (&lt;CODE&gt;display()&lt;/CODE&gt;, &lt;CODE&gt;count()&lt;/CODE&gt;, &lt;CODE&gt;write&lt;/CODE&gt;) hits Snowflake again. If you need one consistent copy for the rest of a run, cache it or write it to Delta first.&lt;/P&gt;
&lt;P&gt;Setup (Abhilash and balajij8 already posted the DDL)&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Pick an auth method: Snowflake OAuth, Entra ID, Okta, OAuth access token, PEM private key, or basic auth. PEM key-pair is a good default for notebook and pipeline use. Keep credentials in a secret scope.&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;CREATE CONNECTION ... TYPE snowflake&lt;/CODE&gt; with host, port 443, warehouse, user and credential.&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;CREATE FOREIGN CATALOG snowflake_catalog USING CONNECTION snowflake_conn OPTIONS (database '&amp;lt;db&amp;gt;');&lt;/CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Grant &lt;CODE&gt;USE CATALOG&lt;/CODE&gt;, &lt;CODE&gt;USE SCHEMA&lt;/CODE&gt; and &lt;CODE&gt;SELECT&lt;/CODE&gt; in Unity Catalog. On the Snowflake side the role needs USAGE on the database and schema plus SELECT on the tables. Missing Snowflake grants are the usual reason a foreign catalog shows up empty.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Compute: DBR 13.3 LTS or above in standard or dedicated access mode, or a pro/serverless SQL warehouse, with network access to Snowflake.&lt;/P&gt;
&lt;P&gt;Notebook side&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-python"&gt;df = spark.sql("""
    SELECT region, SUM(amount) AS total
    FROM snowflake_catalog.sales.orders
    WHERE order_date &amp;gt;= current_date() - INTERVAL 7 DAYS
    GROUP BY region
""")
display(df)   # this is when Snowflake actually gets hit

# optional: land a snapshot in Delta for the rest of the notebook
df.write.mode("overwrite").saveAsTable("my_catalog.scratch.weekly_orders")
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Things that cause "challenges"&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Filters, projections, joins, aggregates, sorting, LIMIT/OFFSET and some window functions push down to Snowflake. Anything else is finished in Databricks after the rows cross the wire. Filter and aggregate early, and use &lt;CODE&gt;EXPLAIN FORMATTED&lt;/CODE&gt; or the query profile to see the SQL Snowflake actually received.&lt;/LI&gt;
&lt;LI&gt;Each foreign table scan returns to one executor over a single stream, so pulling a whole large table and filtering in Databricks can OOM that executor.&lt;/LI&gt;
&lt;LI&gt;Every query wakes your Snowflake warehouse, so you pay Snowflake credits plus Databricks compute. Fine for interactive work; size the warehouse and its auto-suspend accordingly.&lt;/LI&gt;
&lt;LI&gt;Foreign catalogs are read-only. Results get written to Delta on the Databricks side.&lt;/LI&gt;
&lt;LI&gt;Table and schema names are lowercased in Unity Catalog.&lt;/LI&gt;
&lt;LI&gt;A table with a column type Unity Catalog doesn't support (Snowflake &lt;CODE&gt;VECTOR&lt;/CODE&gt;, for example) can't be queried at all. Create a Snowflake view that excludes the column and query that.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Regarding other approaches&lt;/P&gt;
&lt;P&gt;balajij8's Iceberg point: catalog federation only applies to Snowflake Managed Iceberg tables, but you don't have to choose. Configure the foreign catalog with authorized paths and a storage location and Databricks reads Iceberg tables straight from cloud storage, then falls back to JDBC for standard tables and views. That needs DBR 16.4 LTS or above, or a SQL warehouse on 2025.16 or above.&lt;/P&gt;
&lt;P&gt;Aravind's Spark connector snippet works, and the connector still ships in Databricks Runtime, but Databricks moved its page to the archive and marked it experimental and untested, with Lakehouse Federation recommended instead. It's also outside Unity Catalog governance. Where it still earns a spot is writing back to Snowflake, since federation is read-only. If you use it, drop the &lt;CODE&gt;SparkSession.builder&lt;/CODE&gt; block (the &lt;CODE&gt;spark&lt;/CODE&gt; session already exists in a notebook) and read &lt;CODE&gt;sfPassword&lt;/CODE&gt; from &lt;CODE&gt;dbutils.secrets&lt;/CODE&gt;.&lt;/P&gt;
&lt;P&gt;Harshad's Lakeflow Connect pointer: if "live" ever turns into "refreshed on a schedule," a materialized view over the foreign table or a Lakeflow Connect query-based ingestion pipeline through the same foreign catalog both reuse the connection you've already built.&lt;/P&gt;
&lt;P&gt;Takeaway: set up the connection and foreign catalog once, query it like any other Unity Catalog table, and know that every action re-reads Snowflake. That's exactly the behavior you asked for.&lt;/P&gt;
&lt;P&gt;References:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://docs.databricks.com/aws/en/query-federation/snowflake" target="_blank"&gt;https://docs.databricks.com/aws/en/query-federation/snowflake&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.databricks.com/aws/en/query-federation/snowflake-pem" target="_blank"&gt;https://docs.databricks.com/aws/en/query-federation/snowflake-pem&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.databricks.com/aws/en/query-federation/snowflake-basic-auth" target="_blank"&gt;https://docs.databricks.com/aws/en/query-federation/snowflake-basic-auth&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.databricks.com/aws/en/query-federation/database-federation" target="_blank"&gt;https://docs.databricks.com/aws/en/query-federation/database-federation&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.databricks.com/aws/en/query-federation/snowflake-catalog-federation" target="_blank"&gt;https://docs.databricks.com/aws/en/query-federation/snowflake-catalog-federation&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.databricks.com/aws/en/security/secrets/" target="_blank"&gt;https://docs.databricks.com/aws/en/security/secrets/&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/query-based-overview" target="_blank"&gt;https://docs.databricks.com/aws/en/ingestion/lakeflow-connect/query-based-overview&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://docs.databricks.com/aws/en/archive/connectors/snowflake" target="_blank"&gt;https://docs.databricks.com/aws/en/archive/connectors/snowflake&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Regards, Louis.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2026 14:19:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-connect-databricks-to-snowflake-amp-query-live-data/m-p/175790#M57062</guid>
      <dc:creator>Louis_Frolio</dc:creator>
      <dc:date>2026-11-06T14:19:53Z</dc:date>
    </item>
  </channel>
</rss>

