Study FAQ
Why can SELECT * behave differently across engines on a OneLake table with column security?
Also asked as 2
- Why does a OneLake CLS-protected SELECT * succeed in Spark but fail through a SQL endpoint?
- How should I troubleshoot cross-engine query differences caused by OneLake column-level security?
Answer
OneLake column-level security can enforce the same permitted data boundary while different engines return different query outcomes. For a table with restricted columns, Microsoft documents that Spark notebooks return only allowed columns for SELECT *, while the SQL analytics endpoint and semantic-model paths return an error when the query requests inaccessible columns.
Do not remove CLS merely to make a broad query succeed. Instead:
- Check the querying identity, its complete role memberships, and the allowed-column list.
- Query an explicit list of allowed columns through the affected engine.
- Attempt to query a restricted column and confirm that no restricted values are returned.
- If even permitted queries fail, check policy syntax, schema changes, table-format support, and unsupported combinations of RLS and CLS roles.
Authorized engines can filter according to the policy. An unauthorized third-party engine cannot safely enforce row or column restrictions and can be blocked from reading the table. Some experiences may reveal a secured column's name; that does not mean its data values are readable.
The expected result must be defined for the engine being tested. A query error and a filtered result can both be legitimate enforcement outcomes.
See Microsoft's documented OneLake enforcement behavior.
Full explanation
DP-600: Securing and Governing Microsoft Fabric Analytics Solutions
Study guide · DP-600
Read the full explanation