cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Query Pushdown in Snowflake

Sam
New Contributor III

Hi,

I am wondering what documentation exists on Query Pushdown in Snowflake.

I noticed that a single function (monitonically_increasing_id()) prevented the entire query being pushed down to Snowflake during an ETL process.

Is Pushdown coming from the Spark JDBC connector OR is this from Databricks itself?

Is it possible to determine whether the query will be pushed down?

1 ACCEPTED SOLUTION

Accepted Solutions

siddhathPanchal
Databricks Employee
Databricks Employee

Hi Sam,

The Spark Connector applies predicate and query pushdown by capturing and analyzing the Spark logical plans for SQL operations. When the data source is Snowflake, the operations are translated into a SQL query and then executed in Snowflake to improve performance.

However, because this translation requires almost a one-to-one translation of Spark SQL operators to Snowflake expressions, not all of Spark SQL operators can be pushed down. When pushdown fails, the connector falls back to a less-optimized execution plan. The unsupported operations are instead performed in Spark.

https://docs.snowflake.com/en/user-guide/spark-connector-use.html#pushdown

View solution in original post

1 REPLY 1

siddhathPanchal
Databricks Employee
Databricks Employee

Hi Sam,

The Spark Connector applies predicate and query pushdown by capturing and analyzing the Spark logical plans for SQL operations. When the data source is Snowflake, the operations are translated into a SQL query and then executed in Snowflake to improve performance.

However, because this translation requires almost a one-to-one translation of Spark SQL operators to Snowflake expressions, not all of Spark SQL operators can be pushed down. When pushdown fails, the connector falls back to a less-optimized execution plan. The unsupported operations are instead performed in Spark.

https://docs.snowflake.com/en/user-guide/spark-connector-use.html#pushdown

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group