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:ย 

Way to enforce partition column in where clause

NehaR
New Contributor II

Hi All,

I want to know if is it possible to enforce that all queries must include a partition filter if the delta table is a partition table in databricks?

I tried the below option and set the required property but it doesn't work and I can still query test_table without passing the partition clause in the where condition.

ALTER TABLE test_table SET TBLPROPERTIES ('partitioned'='true', 'partitioned.query.required'='true');

Please let me know if it is doable in delta table.

 

3 REPLIES 3

Alberto_Umana
Databricks Employee
Databricks Employee

Hi @NehaR,

Currently, Databricks does not support enforcing a requirement that all queries on a partitioned Delta table must include a partition filter. I see that there is a feature request internally to consider its implementation.

NehaR
New Contributor II

Any idea by When it will be available? Its a great feature to have to enforce use of partition columns for large tables.

Alberto_Umana
Databricks Employee
Databricks Employee

At the moment there is not ETA, but will keep you posted!

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