Skip to main content

Alternative Query Languages

You can use other query languages to query data in ClickHouse using the dialect setting. After changing dialect, you can run queries in the newly configured dialect.

The currently supported dialects are:

Experimental dialects:

ClickHouse SQL

The default SQL dialect for ClickHouse.

SET dialect = 'clickhouse'

Experimental Dialects

These dialects may not be fully supported or have all of the features of their original specification.

Pipelined Relational Query Language (PRQL)

You can execute queries using the PRQL language after setting the dialect to prql:

SET dialect = 'prql'

Then you can use every PRQL feature that the included compiler supports:

from trips
aggregate {
ct = count this
total_days = sum days
}

Under the hood ClickHouse will translate the PRQL query into an SQL query and execute it.

Kusto Query Language (KQL)

Kusto may not be able to access all functions defined in ClickHouse.

Enable Kusto:

SET dialect = 'kusto'

Example query that selects from system.numbers(10):

numbers(10) | project number
┌─number─┐
0
1
2
3
4
5
6
7
8
9
└────────┘