---
schema_version: "1"
id: 6e88220da366564b0d41b23427e226fcacac85ac2ff934df69274e601cfea03a
title: Row-Level Security Example based on Record Ownership
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_security_rowlevel_example_recordownership.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_security_rowlevel_example_recordownership.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 6d29f6e897bd50abe4ce9874ea0681ff5466994037fae39b0d92b020122abc66
description: Let’s look at an example where you create a dataset based on a CSV file and then implement row-level security based on record ownership. In this example, you will create a dataset that contains sales targets for account owners. To restrict access on each record in the dataset, you will create a security policy where each user can view only sales targets for accounts that they own. This process requires multiple steps that are described in the sections that follow.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# Row-Level Security Example based on Record Ownership

Let’s look at an example where you create a dataset based on a CSV file and then implement row-level security based on record ownership. In this example, you will create a dataset that contains sales targets for account owners. To restrict access on each record in the dataset, you will create a security policy where each user can view only sales targets for accounts that they own. This process requires multiple steps that are described in the sections that follow.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/images/icon_note.png)

Note Although this example is about applying a predicate to a dataset created from a CSV file, this procedure can also be applied to a dataset that is created from Salesforce data.

1. **[Determine Which Data to Include in the Dataset](https://help.salesforce.com/s/articleView?id=analytics.bi_security_rowlevel_example_recordownership_determinedata.htm&release=264.0.0&type=5)**  
    First, determine what data you want to include in the dataset. For this example, you will create a Targets dataset that contains all sales targets.
2. **[Determine Row-Level Security for Dataset](https://help.salesforce.com/s/articleView?id=analytics.bi_security_rowlevel_example_recordownership_determine_rls.htm&release=264.0.0&type=5)**  
    Now it’s time to think about row-level security. How will you restrict access to each record in this dataset?
3. **[Add the Predicate to the Metadata File](https://help.salesforce.com/s/articleView?id=analytics.bi_security_rowlevel_example_recordownership_addpredicate.htm&release=264.0.0&type=5)**  
    For a dataset created from a CSV file, you can specify the predicate in the metadata file associated with the CSV file or when you edit the dataset.
4. **[Create the Dataset](https://help.salesforce.com/s/articleView?id=analytics.bi_security_rowlevel_example_recordownership_createdataset.htm&release=264.0.0&type=5)**  
    Now that you updated the metadata file with the predicate, you can create the dataset.
5. **[Test Row-Level Security for the Dataset](https://help.salesforce.com/s/articleView?id=analytics.bi_security_rowlevel_example_recordownership_testpredicate.htm&release=264.0.0&type=5)**  
    You must verify that the predicate is applied properly and that each user can see their own sales targets.