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

Getting error :USER_DEFINED_FUNCTIONS.CORRELATED_REFERENCES_IN_SQL_UDF_CALLS_IN_DML_COMMANDS_NOT_IMP

Vivek_Singh
New Contributor III

Hello Focus,

need help, implemented Row level security at Unity Catalog, it is working as expected however while deleting the record getting error as enclosed detail 

[USER_DEFINED_FUNCTIONS.CORRELATED_REFERENCES_IN_SQL_UDF_CALLS_IN_DML_COMMANDS_NOT_IMPLEMENTED_YET] User defined function is invalid: This command includes calls to SQL user-defined function row_filter_countryid_source_table which contains subquery expressions with correlated outer references; this feature is is not implemented yet SQLSTATE: 42601

 

1 REPLY 1

VZLA
Databricks Employee
Databricks Employee

The correlated subqueries within SQL User-Defined Functions (UDFs) used for row-level security are currently not supported for DELETE operations in Unity Catalog. You will need to adjust your row_filter_countryid_source_table UDF to avoid correlated subqueries. This may involve refactoring the logic within the UDF or moving the filtering logic into the main query to bypass the limitation.

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