Periscope Data Documentation

Connecting to Periscope

First Time Connecting

Connection Definitions

Common Connection Errors

Private Network SSH Tunnels



Getting Started

Keyboard Shortcuts

Charts & Dashboards

Chart Overview

Chart Options

Dashboard Overview

Refresh Mechanics

Organizing Charts

Organizing Dashboards

Table-like Charts

Table Overview

Cohort Grids

Pivot Tables

Graph-like Charts

Overview & General Settings

Chart Types and Settings

Mixing Chart Types

Map Charts

Map Chart Overview


Clusters and Bubbles

Satellite Maps


Other Charts & Customizations

Pie Charts

Image Charts

Chart Annotations

Site Administration

Adding Users

Removing Users

User Types

User Groups

Two-Factor Authentication

Managing User Permissions

Dashboard Permissions

Site Preferences

Query Management

Color Themes

Dashboard Refresh Management

Usage Data

Periscope Cache

Caching Strategies

Querying the Periscope Cache

Cross-Database Joins

CSV Upload

Materializing Views

SQL Formatters

Using SQL Formatters

Composing SQL Formatters

Dollars and Percentages

Time Zone Formatters

Date Aggregation

Date Parts

Basic Filters

Custom Filters

Date Range Filters

Aggregation Filter

Adding, Moving, and Hiding Filters

Advanced Filters

Default Filters


Parent-Child Filters

Matching Filter Values

Time Zone Conversions

Direct Replacement

User Friendly Names


SQL Views

Joining to Views

More SQL Tools

SQL Snippets

Parameterized SQL Snippets

SQL Alerts

Automatic Joins

Version History

Sharing and Embedding

Sharing Dashboards Externally

Email Reports

Easy Embedding

Embed API

Embed API Options

CSV Download

Public CSV URL

Slack API

Slack Linking Reports

Data Management

Adding and Deleting Datasource

Spaces: Data-Level Permissions

Improving Query Throughput

Revoking Table Permissions

Salesforce Datasource

Schema Browser

SSO Integrations




Google Apps

Parameterized SQL Snippets

Parameterized snippets allow you to pass values directly into your snippets. They also help to make your queries more dynamic, and provide a way to imitate passing variables into a function.

Defining a Parameterized Snippet

Let's start by creating a snippet for calculating percentage change. Specify the parameters used in the name of the snippet. Rounded parentheses are used to indicate the start and end of the parameter list and commas to separate the passed in paramaters. For this example, the name of the column of the current value as well as the column with the previous value are being passed in.

Now that the parameters have been defined in the name, they can be used in the snippet code by wrapping them in square brackets:

Writing Queries with Parameterized Snippets

To use a snippet in a query, call its name with square parentheses, and pass in actual columns or values as the parameters:

The generated code and how the snippet and parameters get substitued can be seen by clicking on our SQL tab.

Parameters with Commas

If parameters have commas, wrap them in double quotes "," to make sure they are passed in correctly.