---
schema_version: "1"
id: 4c0a6b62e9432a5af09696e980e486253dcbebf7e642195f8017f7dc29493af8
title: Design the Dataflow to Load the Data
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_rolehierarchy_designdataflow.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_security_rowlevel_example_rolehierarchy_designdataflow.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 8f11ac29f9549cb6d1d0a1a08fc1ab65c06f52bae82a7fe6d81958a058b81079
description: Now it’s time to figure out how the dataflow will extract the data and load it into a dataset. You start by creating this high-level design for the dataflow.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# Design the Dataflow to Load the Data

Now it’s time to figure out how the dataflow will extract the data and load it into a dataset. You start by creating this high-level design for the dataflow.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in Salesforce Classic and Lightning Experience.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available with CRM Analytics, which is available for an extra cost in <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions. Also available in <strong>Developer</strong> Edition.</td></tr></tbody></table>

![The Opportunity and User objects load data into the OppRoles dataset.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_security_opproles_dataflow_design.png)

The dataflow will extract data from the Opportunity and User objects, join the data, and then load it into the OppRoles dataset.

Now let’s implement that design in JSON, which is the format of the dataflow definition file. A dataflow definition file contains transformations that extract, transform, and load data into a dataset.

Based on the design, you create the JSON shown below.

```
{    
   "Extract_Opportunity": {        
      "action": "sfdcDigest",        
      "parameters": {            
      "object": "Opportunity",            
      "fields": [                
         { "name": "Id" },                
         { "name": "Name" },                
         { "name": "Amount" },                
         { "name": "StageName" },                
         { "name": "AccountId" },                
         { "name": "OwnerId" }            
        ]        
      }    
   },    
   "Extract_User": {          
      "action": "sfdcDigest",          
      "parameters": {              
      "object": "User",              
      "fields": [                  
         { "name": "Id" },                  
         { "name": "Username" },                  
         { "name": "LastName" },                  
         { "name": "FirstName" },                  
         { "name": "Name" },                  
         { "name": "CompanyName" },                  
         { "name": "Division" },                  
         { "name": "Department" },                  
         { "name": "Title" },                  
         { "name": "Alias" },                  
         { "name": "CommunityNickname" },                  
         { "name": "UserType" },                  
         { "name": "UserRoleId" }                  
         ]          
      }    
   },    
   "Augment_Opportunity_User": {        
      "action": "augment",        
      "parameters": {            
         "left": "Extract_Opportunity",            
         "left_key": [            
            "OwnerId"            
         ],            
         "right": "Extract_User",            
         "relationship": "Owner",            
         "right_select": [                
            "Name"            
         ],            
         "right_key": [                
            "Id"            
         ]        
      }    
   },         
   "Register": {        
      "action": "sfdcRegister",        
      "parameters": {            
         "alias": "OppRoles",            
         "name": "OppRoles",            
         "source": "Augment_Opportunity_User",            
         "rowLevelSecurityFilter": ""        
      }    
   }
}
```

If you were to run this dataflow, CRM Analytics would generate a dataset with no row-level security. As a result, any user that has access to the dataset would be able to view all opportunities. For example, as shown below, Bill would be able to view all opportunities, including those owned by his manager Keith.

![Bill can see all opportunities, including those owned by his manager.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_opportunities_bill_nopredicate_opproles.png)

You need to apply row-level security to restrict access to records in this dataset.