Use SQL Parameters to fetch specific data from your data warehouse
SQL Parameters let you expose a UI to your users that affects the SQL query run against your data warehouse, while keeping maps fast with in-browser aggregations.
The problem
Honeycomb Maps loads your data once and runs aggregations in the browser, so maps stay fast and scale to thousands of simultaneous users.
But a single saved query often pulls far more data than any one user needs. This slows the initial load and strains the warehouse.
The solution
SQL Parameters are placeholders you drop into a data source query and then expose to users as interface components. Data teams keep control over the SQL that hits the warehouse, while users specify exactly the data they need.
Filtering is pushed down into the warehouse, so each map loads only the relevant rows. This unlocks fast visualizations on larger, more complex datasets.
Push filtering into the warehouse
A first cut of filtering happens at the data source, so you only pull the rows a user actually cares about, like a city, a market, or a time range, instead of the entire dataset.
Creators keep control, users get flexibility
Data teams own the SQL that hits the warehouse while map viewers (who may not write SQL) change exactly the values they need through a simple UI.
Stay fast and scalable
Smaller, targeted queries mean faster initial loads and lower warehouse costs, while in-browser aggregation keeps interactions snappy with no network round-trips.
How SQL Parameters work
Example SQL with Parameters
select *
from operations.public.fact_deliveries
where market = {{ market_parameter }}
[[ and delivered_at >= {{ start_date }} ]];Curly brackets {{ }} mark a parameter. Square brackets [[ ]] wrap a clause that is omitted entirely when its parameter is null.