Data Warehouse

Tutorial Videos

API

Storage and Compute

Data Sources

CDC Setup

Transform

KPI

Models
Segments

Dashboard

Drill Down

Explores

Machine Learning

Sharing

Scheduling

Notifications

View Activity

Admin

Launch On Cloud

FAQs

FAQ's

Security

Feedback

Option to take feedback from UI

Release Notes

Release Notes

User Permissions & Restrictions

Models

Segments

Sprinkle has multi-level accessibility of data. Few of which only the admin can access, few of which the analyst can make use of but not the developers. These restrictions and permissions can be set basically for five roles, Admin, Analyst, Report Viewer, Developer, and API Access Grp.

These are the default Groups created in Sprinkle. However, the Groups can be created and permissions can be modified as per the user’s preferences. Each Group has its own permissions and restrictions, in this case, the Admin group is explained.

alt_text

On clicking the Admin group, it takes the user to a page where they will be able to add or edit Roles, Members, and User Attributes.


Roles:

In the Roles section, clicking on the Admin takes the user to Permissions, Folders, and Allow Restricted Tables page.

alt_text

Not every user will be allowed to access all the tabs, say, Dashboards, Segments, Explores, Jobs, Notebooks, and Admin. A certain group of users can only access specific permissions which also include viewing and editing of the tabs. By default Sprinkle allots certain permissions for each role, it is listed below.

RolesPermissionsAdminThe Admin has complete access to the tool and has no restrictions.AnalystAnalysts have Dashboard, Segments, Explores view, and edit permissions.Report ViewerThese users will be only allowed to view reports.DeveloperDevelopers have every permission except the Administrative operations.API Access GroupUsers can view Explores, Segments, Project, Cube functionalities.

In this way, the Admin can create their own Roles and Groups.



Permissions:

The below image consists of all the permissions that the Admin role handles.

alt_text

The user can add or remove permissions by clicking on the “Add” icon on the top right or by deleting it in the action. A new permission “DATASOURCE_VIEW” has been created for the Admin role.

alt_text



Viewers:

Sprinkle has introduced a new type of user called viewer users. These users can have only the permissions to see the final outputs. The user can have view permissions to all the resources like DASHBOARD_VIEW, SEGMENT_VIEW, CUBE_VIEW, EXPLORE_VIEW, PROJECT_VIEW, SEARCH. Resources like Explore, segment and dashboard will be visible to the user. USER_KEYS_CREATE is available for the user to programmatically access resources.

While inviting a user to the Sprinkle platform the admin can invite the user as a viewer

alt_text

The users who have joined as a viewer can be changed to standard users and vice versa, after updating their groups and permissions.



Folders:

Next to Permissions, the next dropdown tab is Folders. Folders can also be referred to as Spaces, these spaces may be user-specific, all folders or shared folder for a certain group of users. Restricting reports for a group of users can be done using the folders functionality.

Any report a user creates comes under his own folder. However, if the user has access to a particular folder, they can view only those reports which fall under that folder and also reports in their own folder.

By default, all the groups in Sprinkle have access to the “Shared folder” so that any report that falls under Shared Folder can be viewed by everyone in the organization.

Restricting the reports to the third party users can be done by removing the “Shared Folder” access for those users. So that a new role and a group is created for those users who have special permissions without “Shared Folder” access.

alt_text

The folders can be added to the role by clicking on the “Add” icon. A drop-down list appears, from which the folders can be selected.

alt_text

Restricted Tables:

Restricting tables to a particular group of users can be done using this functionality.

Admin -> Roles

Before adding any tables to the “Allow Restricted Tables” tab, it needs to be added to the restricted tables page.

alt_text

Admin -> Restricted Tables

alt_text

On clicking the “New” button, A new restricted table is created.

alt_text

Only after creating this table, the table can be added to the “Allow Restricted Tables” tab in the “Roles” page. Admin -> Roles -> Allow Restricted Tables

These restrictions can be added for any particular role so that any user belonging to that group which comprises that specific role wouldn’t be able to see and query on those tables.

alt_text



Members:

Based on the Group, the users can be added or removed. For different Groups, different set of users can be added, say, Analyst group consist of a different set of users whereas the Developer group consists of a different set of users.

alt_text



User Attributes:

Restricting data from a specific user or a group of users can be done with User Attributes.

alt_text

Before adding any restrictions to the users by mapping some value, the “User Attribute” should be created.

Admin -> User Attributes page

alt_text

For Example, on clicking the “New” button on the top right corner, a new “User Attribute” is created in the name “cityorders”.

alt_text

After creating this user attribute, the segment model should be merged with it. This merging is done mainly to permit the access of certain tables to certain users.

Eg: In this case, the model is “cityorders” i.e. orders from all cities in India. When the admin wants to provide access to a specific user or a group of users only a specific city’s data, this functionality is used.

In order to merge the “User Attribute”, Segments -> Models -> Settings

alt_text

Click on the “Add” button in the User Attributes tab, a pop-up screen will appear. The Attribute name should be selected, i.e. “cityorders” and the restricted column name should be selected, in this case, it’s “BUYER_CITY” Now the model is merged with the user attribute.

alt_text

In the Groups tab under Admin, the user can add the User Attribute that is merged with the model by clicking on the “Add” button in User Attributes. Here “OrdersCity” is selected and a value must be applied for this specific “User Attribute” so that the users who belong to this User Attribute will be able to see only “Bangalore” order data. By changing the value, i.e. changing from Bangalore to Chennai allows the users belonging to that specific “User Attribute” to see only the “Chennai” order data.

alt_text

In the “Users” column, any selected user can be picked, and “User Attribute” can be applied accordingly.

alt_text

In the “User Attribute” column, the name of the “User Attribute” is applied and the city value can also be applied. This way, restriction or permissions on a specific table for a specific user or a set of users can be applied.

alt_text

Admin -> Groups -> Admin

Now the User Attribute “OrdersCity” on the model “Orders” is created and the filter value “Bangalore” is applied.

alt_text

In the user attribute, if the number of users is large in number, they can be uploaded via CSV file in the “User Attribute” page.

alt_text

The CSV file should have two columns, one column being email Id and the other is value.

alt_text

User-defined Variables:

Users can define Variables with some value in the flow settings and that variable can be used in that particular flow. For example, in incremental loading user defines the number of window days. The incremental process is explained below.

Product - variables - I icon: Users can define Variables with some value in the flow settings and that variable can be used in that particular flow.

import requests
from requests.auth import HTTPBasicAuth

auth =  HTTPBasicAuth(<API_KEY>, <API_SECRET>)
response = requests.get("https://<hostname>/api/v0.4/explore/streamresult/<EXPLORE_ID>", auth)

print(response.content)

library('httr')

username = '<API KEY>'
password = '<API SECRET>'

temp = GET("https://<hostname>/api/v0.4/explore/streamresult/<EXPLORE ID>",
           authenticate(username,password, type = "basic"))

temp = content(temp, 'text')
temp = textConnection(temp)
temp = read.csv(temp)

/*Download the Data*/

filename resp temp;
proc http
url="https://<hostname>/api/v0.4/explore/streamresult/<EXPLORE ID>"
   method= "GET"  
   WEBUSERNAME = "<API KEY>"
   WEBPASSWORD = "<API SECRET>"
   out=resp;
run;

/*Import the data in to csv dataset*/
proc import
   file=resp
   out=csvresp
   dbms=csv;
run;

/*Print the data */
PROC PRINT DATA=csvresp;
RUN;

import requests
import json

url='http://hostname/api/v0.4/createCSV'

username='API_KEY'
password='API_SECRET'

files={'file':open('FILE_PATH.csv','rb')}
values={'projectname':PROJECT_NAME','name':'CSV_DATASOURCE_NAME'}

r=requests.post(url, files=files, data=values, auth=(username,password))

res_json=json.loads(r.text)

print(res_json['success'])

import requests
import json

url='http://hostname/api/v0.4/updateCSV'

username='API_KEY'
password='API_SECRET'

files={'file':open('FILE_PATH.csv','rb')}
values={'projectname':PROJECT_NAME','name':'CSV_DATASOURCE_NAME'}

r=requests.post(url, files=files, data=values, auth=(username,password))

res_json=json.loads(r.text)

print(res_json['success'])

import requests

url='https://<hostname>/api/v0.4/explore/streamresult/<EXPLORE ID>'

username='API_KEY'
password='API_SECRET'

r=requests.get(url,auth=(username,password))
print(r)
print(r.text)

import requests

import pandas as pd

import io

url='https://<hostname>/api/v0.4/explore/streamresult/<EXPLORE ID>'

secret='API_SECRET'

r=requests.get(url,headers = {'Authorization': 'SprinkleUserKeys ' +secret } )

df = pd.read_csv(io.StringIO(r.text),sep=',')

import requests

import pandas as pd

import io

url='https://<hostname>/api/v0.4/segment/streamresult/<SEGMENT ID>'

secret='API_SECRET'

r=requests.get(url,headers = {'Authorization': 'SprinkleUserKeys ' +secret } )

df = pd.read_csv(io.StringIO(r.text),sep=',')

import requests

import json

url='http://hostname/api/v.o4/createCSV'

files={'file':open('path/file.csv’')}

values={'projectname':PROJECT_NAME,'name':'csv_datasource_name/table_name'}

secret='API_SECRET'

r=requests.post(url, files=files, data=values, headers = {'Authorization': 'SprinkleUserKeys ' +secret } )

res_json=json.loads(r.text)

import requests

import json

url='http://hostname/api/v.o4/updateCSV'

files={'file':open('path/file.csv’')}

values={'projectname':PROJECT_NAME,'name':'csv_datasource_name/table_name'}

secret='API_SECRET'

r=requests.post(url, files=files, data=values,headers = {'Authorization': 'SprinkleUserKeys ' +secret } )

res_json=json.loads(r.text)