Circular reference error when trying to apply row filter function in Databricks SQL analytics

Remove the circular reference in the row filter configuration.

Written by caio.cominato

Last published at: December 12th, 2024

Problem

When attempting to assign a row filter function to a table in Databricks SQL analytics, you receive an error message.

 

ErrorClass=INVALID_PARAMETER_VALUE.UC_DEPENDENCY_DEPTH_LIMIT_EXCEEDED] Table '<some_table>' depth exceeds limit (or has a circular reference). 

 

Cause

The table has a row filter which itself contains a reference to the same table (a circular reference). This configuration is not permitted because it would cause an infinite loop.

 

Solution

  1. Identify and remove the circular reference in the row filter configuration. Ensure that the row filter does not reference the table being used.
  2. Review and update the row filter logic to avoid any self-referencing configurations.
  3. Test the updated row filter configuration to ensure that the query executes successfully without encountering the circular reference error.

 

For further guidance, refer to the Filter sensitive table data using row filters and column masks (AWSAzureGCP) documentation.