Home / Companies / Trigger.dev / Blog / Post Details
Content Deep Dive

How we give every user SQL access to a shared ClickHouse cluster

Blog post from Trigger.dev

Post Details
Company
Date Published
Author
Matt Aitken
Word Count
3,360
Company Posts That Month
3
Language
English
Hacker News Points
-
Post removed?
No
Summary

TRQL (Trigger Query Language) is a domain-specific language developed to enable users to write secure, tenant-isolated SQL queries on a shared multi-tenant analytical database without risking data exposure or system stability. Designed as a SQL-style language, TRQL compiles to ClickHouse queries and handles security, abstraction, and translation, making it more than just a SQL passthrough. Its design allows for tenant isolation by automatically injecting necessary filters and hiding internal database details from users, and it provides features like virtual columns, automatic time-bucketing, and value transforms. TRQL is parsed using ANTLR, which enforces a strict grammar that omits potentially dangerous commands, ensuring security by construction rather than validation. The language is compatible with ClickHouse's analytical capabilities, offering custom functions and schema-defined transformations that simplify query writing. Using a dual-parser architecture, the TRQL editor combines fast syntax highlighting with comprehensive schema-aware validation, enhancing the user experience with features like schema-powered autocomplete. By enforcing limits on concurrency, row counts, and query resources, TRQL maintains system performance and security, forming the backbone for Trigger.dev's observability tools and analytics dashboards.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
AI Agents 1 7,403 1,426 278 +69%
Observability 1 4,660 984 209 +14%
OpenTelemetry 1 944 170 56 +40%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.