forked from ClickHouse/clickhouse-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move the PRQL docs to a better place
- Loading branch information
1 parent
3e9d835
commit 36a21af
Showing
3 changed files
with
30 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
slug: /en/guides/developer/alternative-query-languages | ||
sidebar_label: Alternative Query Languages | ||
title: Alternative Query Languages | ||
description: Use alternative query languages in ClickHouse | ||
--- | ||
|
||
You can use other query languages to query data in ClickHouse using the `dialect` setting. The currently supported dialects are: | ||
- `clickhouse`: The default [ClickHouse SQL dialect](../../sql-reference/syntax.md) | ||
- `prql`: [Pipelined Relational Query Language](https://prql-lang.org/) | ||
|
||
You can execute queries using the PRQL language after setting the dialect to `prql`: | ||
```sql | ||
SET dialect = 'prql' | ||
``` | ||
|
||
Then you can use every PRQL feature that the included PRQL compiler supports: | ||
|
||
```prql | ||
from trips | ||
aggregate [ | ||
ct = count | ||
] | ||
``` | ||
|
||
Under the hood ClickHouse will translate the PRQL query into an SQL query and execute it. To switch back to the ClickHouse SQL dialect set the dialect to `clickhouse`: | ||
```sql | ||
SET dialect = 'clickhouse' | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters