Query Parameters

Specify a placeholder in the query editor by typing {{ <placeholder text> }}.

Alter the value of the placeholder in the query panel to change your query without editing any SQL code.

Creating a placeholder parameter "x" then altering the parameter in the query panel.

By default, a query parameter requires the user to input text. This text will be passed through to the data connector, which will run the SQL code with the input.

Query Parameters: Dropdown

Instead of allowing users to enter any text for a query parameter, you can create a dropdown list for users to select from. Click Settings ⚙ above the query parameter, then select Dropdown.

Dropdown menus help users select parameters from columns they would otherwise not know to type. For example, while your dataset can contain foot traffic for a franchise located and grouped by several cities, a user may not know each city name offhand. A dropdown menu could contain a list of all cities, providing full visibility to the dataset.

Swapping out neighborhood polygons with the dropdown menu.

Static Dropdown

This option can be useful for limiting user input. For example, if you only want users to see data from several days of the week (e.g. the first Monday of every month), your dropdown menu could contain just those dates rather than forcing the user to manually enter the date each time.

Dynamic Dropdown

Use the dynamic dropdown feature to select a specific column to use as a source for unique values. Studio will we store the result of the of the select distinct query, loading it on each subsequent dataset load. This option streamlines populating a dropdown list for a query parameter

Implementing dynamic dropdown query parameters to a NYC block map.

Edit Query Parameters in Studio

You can also edit query parameters within Studio. After creating parameters, follow these steps to edit them within Studio:

1. Navigate to the dataset in Studio then click Show SQL query parameters.

2. Enter new values for the query parameters, then click Update.

The map will be updated with data derived from your new query.

Covid-19 data for a state and date specified via query parameters.Covid-19 data for a state and date specified via query parameters.

Covid-19 data for a state and date specified via query parameters.

Sign In