Skip to content

Compilation & Dialects

When you write a SemQL query, it doesn't run directly on your database. It goes through a compilation step that validates it, resolves your semantic references to physical columns, and translates the result to your database's native SQL dialect.


How SemQL is compiled

When an agent submits a SemQL query, Actian AI Analyst:

  1. Validates the query — checks that all referenced models and fields exist, that the query is read-only, and that the user has permission to access them
  2. Resolves semantic references to physical SQL — organizations becomes your actual table, total_revenue expands to its full aggregation expression, filters expand to their WHERE conditions
  3. Transpiles the result to your database's dialect (Snowflake, BigQuery, etc.)

The compiled SQL is cached per organization, so identical queries skip compilation on subsequent runs. The cache is invalidated whenever the semantic layer changes.


Supported databases

SemQL compiles to all major SQL databases. The same SemQL query works on all of them — no changes needed.

DatabaseNotes
PostgreSQLNative — no transpilation needed
Amazon RedshiftPostgreSQL-compatible
SnowflakeFull support
Google BigQueryFull support
MySQL / MariaDBFull support
Microsoft SQL ServerFull support
Azure SynapseFull support
Microsoft FabricFull support
DatabricksFull support
DuckDB / MotherDuckFull support
Actian Data Platform (Ingres)Full support