Using Pql with Clickhouse

Using pql with clickhouse

Functions that are unknown (i.e. unlisted in the scalar functions docs) are passed through to the resulting SQL query.

Here's a basic example, finding email addresses that match gmail using Clickhouse's match function described here (opens in a new tab)

users
    | project user_email
    | where match(user_email, '@gmail.com')

Which translates successfully to this SQL statement:

WITH "__subquery0" AS (SELECT "user_email" AS "user_email" FROM "users")
SELECT * FROM "__subquery0" WHERE like("user_email", '%@gmail.com')

Functions

Consult the clickhouse documentation for a full list of functions available: