Filters & Dynamic Bindings
Shield360 makes dashboards interactive by letting you add filters and dynamically bind their values to ClickHouse queries. This enables you to create reusable dashboards that respond to user inputs like time range, environment, region, and more.
What are filters?
Section titled “What are filters?”Filters are interactive controls (e.g. date ranges) placed at the top of a dashboard. You can bind these filters to your widgets so their values get passed into SQL queries in real time.
What are dynamic bindings?
Section titled “What are dynamic bindings?”Shield360 uses mustache-style bindings to inject filter values into your queries.
Format:
Section titled “Format:”{{variable_name}}At runtime, Shield360 replaces each binding with the user-provided filter value.
Common examples:
Section titled “Common examples:”{{filter.timeLimit.start}}and{{filter.timeLimit.end}}- for date range filters
How to add and use filters
Section titled “How to add and use filters”SQL example with mustache bindings
Section titled “SQL example with mustache bindings”SELECT toStartOfHour(event_time) AS time, count() AS valueFROM user_eventsWHERE event_time BETWEEN {{filter.timeLimit.start}} AND {{filter.timeLimit.end}}GROUP BY timeORDER BY timeIn this example:
{{filter.timeLimit.start}}&{{filter.timeLimit.end}}are bound to a date range filter
Supported filter types
Section titled “Supported filter types”- Date Range →
{{filter.timeLimit.start}},{{filter.timeLimit.end}} - (Coming soon): Dynamic filters etc
Best practices
Section titled “Best practices”- Always use meaningful keys like
team_id,env, orregion - Use
coalesce({{param}}, 'default')to provide fallback values in ClickHouse - Test your queries in the SQL editor with example values for clarity
- Avoid hardcoded constraints - use bindings to keep dashboards flexible