Getting error :USER_DEFINED_FUNCTIONS.CORRELATED_REFERENCES_IN_SQL_UDF_CALLS_IN_DML_COMMANDS_NOT_IMP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2024 03:25 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2024 11:02 AM
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.

