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 III

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 III

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!

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now