cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
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.

 

2 REPLIES 2

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.

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