Which Warehouse Object Implements Row-Level Security in Fabric?
Short answer
D Create a user-defined FUNCTION that returns a predicate evaluated per user, then bind it as the filter predicate of a security policy on the DW1 sales table.
Question
You plan to implement row-level security (RLS).
You need to ensure that the sales representatives can see only their respective data.
Which warehouse object do you require to implement RLS?
Key Takeaways
The question tests knowledge that RLS filtering logic lives in a schemabound inline table-valued FUNCTION used as a filter predicate — the trap is picking SCHEMA because RLS is often loosely described as organizing access.
Row-level security in a Microsoft Fabric warehouse is built from a user-defined function that returns a yes/no predicate for each row, which is then bound to the table through a security policy. This page confirms that the FUNCTION is the required warehouse object, and explains why schemas, constraints, and stored procedures do not provide RLS filtering.
Common mistake: The most common wrong choice is C (SCHEMA), because learners associate row filtering with organizing objects into security schemas; a schema only groups database objects and cannot evaluate USER_NAME() to allow or deny individual rows.
Expert Analysis
Why the Answer Is Correct
A FUNCTION is the required object because RLS in a Fabric warehouse is implemented by creating a user-defined inline table-valued function (for example, Security.tvf_securitypredicate) that returns a row only when USER_NAME matches the row's owner column. That function is then referenced as the FILTER PREDICATE of a CREATE SECURITY POLICY statement applied to the sales table, so each sales representative only sees their own rows. Without the predicate function there is nothing for the security policy to evaluate, making the function the indispensable warehouse object the question asks for. The official Microsoft tutorial for row-level security in the data warehouse follows exactly this sequence: define the function, then define the security policy.
Why the Other Options Are Wrong
A SCHEMA (C) is only a logical container used to organize tables, procedures, and policies; creating a "Security" schema is a supporting step but it performs no row filtering on its own. A CONSTRAINT (B), such as CHECK or FOREIGN KEY, validates or relates data at write time and cannot vary its evaluation per connected user, so it cannot restrict rows by identity. A STORED PROCEDURE (A) can run imperative T-SQL, but RLS filtering must apply transparently to every query against the table, including ad-hoc SELECTs from reporting tools, which only a predicate function bound through a security policy guarantees. Stored procedures and schemas may appear in an RLS script, yet neither is the object that defines the row-access rule.
Community Comment Notes
Every commenter selected D, with Adriel_1996 posting a full script that creates a schema, then a function, then a security policy, illustrating that the function carries the predicate logic. QAZdbarhate12345678 wrote that you "need to use a FUNCTION to define the filtering logic," and prabhjot noted you "create a predicate function which gets evaluated to filter user access to certain rows in a Yes or No manner." Tuki93 linked the Microsoft tutorial on defining security policies, while Mustafa_Shazly observed that a schema is used "to organize database objects only," which is precisely why C fails. The consensus matches the official documentation, so the community majority here is reliable.
Official Reference
This link opens the official vendor documentation in a new tab.
Exam Strategy
On DP-700 RLS questions, remember the two-object pattern: a predicate function defines the rule and a security policy applies it; if only one object is asked for, it is the function. Ignore objects that merely organize or validate data, since they cannot vary results by user identity.
Frequently Asked Questions
Why isn't a SCHEMA enough to implement row-level security in DW1?
How does the RLS function relate to the security policy?
Discussion 9 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 9
-
Adriel_1996 👍 15 Answered D-- Creating schema for Security CREATE SCHEMA Security; GO -- Creating a function for the SalesRep evaluation CREATE FUNCTION Security.tvf_securitypredicate(@UserName AS varchar(50)) RETURNS TABLE WITH SCHEMABINDING AS RETURN SELECT 1 AS tvf_securitypredicate_result WHERE @UserName = USER_NAME() OR USER_NAME() = ' [email protected] '; GO -- Using the function to create a Security Policy CREATE SECURITY POLICY YourSecurityPolicy ADD FILTER PREDICATE Security.tvf_securitypredicate(UserName_column) ON sampleschema.sampletable WITH (STATE = ON); GO
-
QAZdbarhate12345678 👍 15 Answered DTo implement Row-Level Security (RLS) in a Fabric warehouse like DW1, need to use a FUNCTION to define the filtering logic. Specifically, a user-defined function (UDF) is created and associated with the RLS policy to determine which rows each user can access.
-
Tuki93 👍 3 Answered Dhttps://learn.microsoft.com/en-us/fabric/data-warehouse/tutorial-row-level-security#2-define-security-policies
-
Wipag 👍 2 Answered DTo implement Row-Level Security (RLS) in a Microsoft Fabric warehouse (DW1), you need to define a security policy that uses a user-defined function to filter rows based on the current user.
-
prabhjot 👍 2 Answered Dyou create a predicate function which gets evaluated to filter user access to certain rows in a Yes or No manner
Show 4 more comments
-
alqazqzy.asseel 👍 1 Answered DTo implement RLS in warehouse we should first define a FUCNTION with filtering parameters in this case can be for example the user email, then create SECURITY POLICY that define the defined function as FILTER PREDICATE
-
Mustafa_Shazly 👍 1 Answered DD apply security but we used it when applying RLS schema to organize database objects only.
-
Josekonoor 👍 1 Answered Dfor RLS at SQL world, function to be used
-
smanzana 👍 1 Answered DFunción or Security Policy
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.