How we give every user SQL access to a shared ClickHouse cluster
Summary
Trigger.dev introduces TRQL, a DSL that compiles to secure, tenant-isolated ClickHouse queries for multi-tenant analytics. The article explains why a DSL is necessary for security boundaries, how tenant isolation is enforced at compile time, and how internal table details are hidden from users. It also covers the compilation pipeline, schema design, virtual columns, time bucketing, and the editor experience, illustrating how automation and governance are embedded in analytics workflows.