This tutorial is part of the First Steps series. Complete Normalize with Rosetta Stone before starting.
Prerequisites
- A Narrative I/O account
- At least one normalized dataset
What you’ll learn
- How to access the query editor
- How to write a basic NQL query
- How to preview results with EXPLAIN
- How to run a query and interpret results
Steps
1
Open the query editor
From your Narrative I/O dashboard, navigate to the Query section in the left sidebar. This opens the NQL query editor where you can write and execute queries.The query editor has three main areas:
- Editor pane: Where you write your NQL queries
- Schema browser: Shows available datasets and their columns
- Results pane: Displays query output after execution
2
Find your dataset ID
Before writing a query, you need your dataset’s ID. In the schema browser, expand My Datasets to see your datasets. Each dataset shows its name and numeric ID.Note the dataset ID—you’ll use it in your query. For this tutorial, we’ll use
"123" as an example. Replace it with your actual dataset ID.3
Write a SELECT query
In the editor pane, write a simple query to select data from your dataset:This query:
- Selects all columns (
*) - From your dataset (
company_data."123") - Limits results to 10 rows
"123" with your actual dataset ID.4
Preview with EXPLAIN
Before running the query, preview what data matches your criteria using Click Run or press
EXPLAIN:Cmd+Enter (Mac) / Ctrl+Enter (Windows).The results pane shows:- Estimated row count: How many rows match your query
- Estimated cost: The data cost based on your pricing
- Schema: The columns that will be returned
EXPLAIN doesn’t execute the query or incur costs—it only forecasts the results.5
Run the query
Remove the Click Run or press
EXPLAIN keyword and run your query:Cmd+Enter / Ctrl+Enter.The results pane now shows your actual data in a table format. You can:- Scroll through rows and columns
- Sort by clicking column headers
- Resize columns as needed
6
Refine your query
Now try a more specific query. Select specific columns and add a filter:This query:
- Selects specific columns instead of all
- Uses fully qualified column names (recommended practice)
- Filters to records from the last 30 days
- Returns up to 100 rows
7
Export your results
To save your query results:
- Run your query to populate the results pane
- Click the Export button above the results
- Choose your export format (CSV, JSON, or Parquet)
- Download the file to your local machine
Understanding the query structure
Let’s break down the query you wrote:| Clause | Purpose |
|---|---|
SELECT | Specifies which columns to include in results |
FROM | Identifies the dataset(s) to query |
WHERE | Filters rows based on conditions |
LIMIT | Restricts the number of rows returned |
Tips for getting started
Use EXPLAIN first
Always preview queries withEXPLAIN before running them, especially for large datasets. This helps you understand data availability and estimate costs.
Start with LIMIT
AddLIMIT to your queries while exploring data. This prevents accidentally querying millions of rows.
Use fully qualified column names
When you start joining datasets, fully qualified names prevent ambiguity:Filter by price
Control costs by filtering on_price_cpm_usd:

