Knowledge Base

Creating an Access Rule with NQL in Data Studio

Creating an Access Rule with NQL

In Narrative's Data Studio, Access Rules let you control who can access specific subsets of your datasets, how they can use the data, and the licensing and pricing for data access. This guide will show you how to create an access rule using NQL (Narrative Query Language).

Demo

Prerequisites

  • Familiarity with Data Studio.
  • At least one dataset loaded into your Narrative account.

Steps to Create an Access Rule with NQL

  1. Navigate to Data Studio
    • In the Narrative platform, go to Data Studio.
    • Select the Query tab to start building a query.
  2. Add a Data Source
    • In the Query Builder section, click + Add under Sources.
    • Choose your data source. For NQL, select the NQL option to define a custom query.
  3. Define Your Query
    • Use NQL to specify the subset of data you want to include in the access rule.
    • Refer to the Data Studio Introduction for guidance on writing NQL queries.
  4. Set Output Fields
    • Under Output, click + Add to specify which fields from the dataset should be accessible.
    • Select the fields you want included in the output of your access rule.
  5. Apply Filters (Optional)
    • Click + Add under Filters to narrow down your dataset based on specific criteria (e.g., country, age).
    • This step is optional, but it allows you to control which data is accessible based on certain parameters.
  6. Define Limits (Optional)
    • Click + Add under Limit to set restrictions on the number of rows returned in the query output.
  7. Validate
    • Ensure all fields are valid, then click Validate to check for any issues.
  8. Configure Access Rule Details
    • In the top right, click Create access rule.
    • Complete the following fields in the access rule configuration panel:
      • Unique Name: Enter a unique name for the access rule. This field cannot be edited after the rule is activated.
      • Description: Provide a description of the data and purpose of the access rule.
      • Tags: Add tags to categorize the rule.
      • Price (CPM): Set a price per thousand rows (if applicable).
      • Collaborators: Specify whether certain collaborators can access this rule.
      • Image URL: Optionally, add an image URL for visual identification.
  9. Save
    • Once validated, click Save to activate the access rule.
  10. Review Your Access Rules
  • To view or edit active access rules, navigate to My Data > Access Rules.

Overview of Access Rules

Access Rules are central to controlling and managing data access within Narrative’s platform. They function similarly to database "views" by allowing you to create specific data subsets with governed access and usage rights.

Key Components of an Access Rule

  1. Query: Defines the subset of data accessible by the rule. This subset acts as a new dataset, accessible by collaborators without creating a physical copy.
  2. Policy: Outlines guidelines for data usage, including access permissions, allowed operations, and output rules.
  3. Governance: Sets licensing and pricing for data access, ensuring compliance with terms and conditions.

Output Options

The output of an access rule is a view on top of at least one dataset from your company's account, configured to be accessed only by authorized entities as per the rule's setup.


For more details on Data Studio and creating NQL queries, refer to the Data Studio Introduction.

< Back
Rosetta

Hi! I’m Rosetta, your big data assistant. Ask me anything! If you want to talk to one of our wonderful human team members, let me know! I can schedule a call for you.