Skip to main content

Using Parameterized Views in ClickHouse

Parameterized views can be handy to slice and dice data on the fly based on some parameters that can be fed at query execution time. See this basic example:
  1. create a table
  1. insert some sample random data
  1. create the parameterized view:
  1. query the parameterized view by feeding the expected parameters in your FROM clause:
For more info, please refer to https://clickhouse.com/docs/sql-reference/statements/create/view#parameterized-view
Last modified on July 3, 2026