Introduction to Parameters

Parameters can be used to create global constants and to create parameterized dynamic datasets.

A parameter can be used with a $ sign, like $status in this parameterized filtered metric:

orders.count FILTER (WHERE orders.status = $status)

Parameters are defined either per workspace, or per dynamic dataset. The definition includes parameter name and default value.

Parameterized Dynamic Datasets

Dynamic datasets can include calculations with parameters.

The value of the parameter when in a user query is by this order:

  1. Value set in real-time by user with a SET command.
  2. Default value set in the dynamic dataset
  3. Default value set in the workspace

A dynamic dataset parameter default value can override a workspace parameter of the same name.

Deploying to VIEWs

When a dynamic dataset is deployed as a Snowflake VIEW, parameters can be set using the Snowflake SET statement:

-- run in Snowflake, on a view that uses the $status parameter

SET status='O';
SELECT * FROM [Honeydew Dataset Deployed View];

Deploying to TABLEs

When a dynamic dataset is deployed as a Snowflake TABLE (regular or dynamic) the default values of parameters are used, as set in the dynamic dataset configuration.

Deploying to a live JDBC interface

Default dynamic dataset value is used.

Coming soon to JDBC inteface: the SET command to override default value in a live query.