# SQL Dialects per Connector

Source: https://userguide.qualytics.io/container/computed-tables/deep-dive/sql-dialects/

The language of a Computed Table's query depends on the kind of datastore it lives in:

- **JDBC connectors**: the query runs on the parent datastore's connection, in the source's own dialect. Qualytics does not translate the dialect, so write the SQL the warehouse expects (HiveQL for Hive, T-SQL for SQL Server, and so on).
- **Native connectors**: Qualytics runs the query itself on the data it reads, so it is always written in **Spark SQL**, whatever platform holds the data. See [Native Connectors](https://userguide.qualytics.io/container/computed-tables/deep-dive/sql-dialects/#native-connectors) below.

This page collects the connector-specific quirks worth knowing before you write a Computed Table's SQL.

> **Note: The query runs inside a subquery**
>
> On JDBC connectors, Qualytics embeds your query in a subquery, so it must also be valid there:
>
> - Give each expression without an output name an alias (for example, `SELECT amount * 2 AS doubled_amount`). Ordinary columns and `*` do not need aliases.
> - On SQL Server, an `ORDER BY` in the query also needs `TOP` or `OFFSET ... ROWS` (for example, `ORDER BY score DESC OFFSET 0 ROWS` keeps every row), because SQL Server rejects a bare `ORDER BY` inside a subquery. Other warehouses, such as PostgreSQL, accept it as written.
> - A trailing semicolon is removed for you.

## Fully-Qualified Names

The following connectors reject unqualified table references and require every table to be qualified with its schema:

- **Microsoft SQL Server**: reference tables as `SCHEMA.TABLE`.
- **Oracle**: reference tables as `SCHEMA.TABLE`.
- **Amazon Redshift**: reference tables as `SCHEMA.TABLE`.

The table picker in the Add and Edit modals prefixes the schema for these connectors automatically, so a table name pasted from the picker already includes the schema. Hand-typed references, or references to tables in a non-default schema, still require the explicit `SCHEMA.TABLE` form.

For every other JDBC connector, an unqualified name is usually enough as long as the datastore connection's default schema resolves it. Use **Validate** in the modal to confirm before saving.

## Supported Connectors

Computed Tables run on every JDBC connector and every native connector Qualytics exposes.

### JDBC Connectors

The **Computed Tables?** column is **Yes** for every JDBC connector. The **FQN Required?** column flags the three connectors covered in [Fully-Qualified Names](https://userguide.qualytics.io/container/computed-tables/deep-dive/sql-dialects/#fully-qualified-names) above where the SQL body must use `SCHEMA.TABLE` for every reference. The **Spark SQL?** column shows whether the query is written in Spark SQL. On every JDBC connector it is written in the source's own dialect instead. Databricks is the closest case: Databricks SQL is built on Spark SQL, so most Spark SQL syntax works there, but the query goes to Databricks and follows Databricks SQL, so the column stays **No**.

| No. | Connector | Computed Tables? | FQN Required? | Spark SQL? |
| --- | --- | --- | --- | --- |
| 1. | Redshift [Amazon Redshift](https://userguide.qualytics.io/source-datastore/datastore/jdbc/redshift/redshift-connector/) | Yes | Yes | No |
| 2. | Athena [Athena](https://userguide.qualytics.io/source-datastore/datastore/jdbc/athena/athena-connector/) | Yes | No | No |
| 3. | BigQuery [BigQuery](https://userguide.qualytics.io/source-datastore/datastore/jdbc/bigquery/bigquery-connector/) | Yes | No | No |
| 4. | Databricks [Databricks](https://userguide.qualytics.io/source-datastore/datastore/jdbc/databricks/) | Yes | No | No |
| 5. | DB2 [DB2](https://userguide.qualytics.io/source-datastore/datastore/jdbc/db2/) | Yes | No | No |
| 6. | Dremio [Dremio](https://userguide.qualytics.io/source-datastore/datastore/jdbc/dremio/) | Yes | No | No |
| 7. | Fabric [Fabric Analytics](https://userguide.qualytics.io/source-datastore/datastore/jdbc/fabric-analytics/) | Yes | No | No |
| 8. | Hive [Hive](https://userguide.qualytics.io/source-datastore/datastore/jdbc/hive/) | Yes | No | No |
| 9. | MariaDB [MariaDB](https://userguide.qualytics.io/source-datastore/datastore/jdbc/maria-db/) | Yes | No | No |
| 10. | SQL Server [Microsoft SQL Server](https://userguide.qualytics.io/source-datastore/datastore/jdbc/microsoft-sql-server/) | Yes | Yes | No |
| 11. | MySQL [MySQL](https://userguide.qualytics.io/source-datastore/datastore/jdbc/mysql/) | Yes | No | No |
| 12. | Oracle [Oracle](https://userguide.qualytics.io/source-datastore/datastore/jdbc/oracle/) | Yes | Yes | No |
| 13. | PostgreSQL [PostgreSQL](https://userguide.qualytics.io/source-datastore/datastore/jdbc/postgresql/) | Yes | No | No |
| 14. | Presto [Presto](https://userguide.qualytics.io/source-datastore/datastore/jdbc/presto/) | Yes | No | No |
| 15. | SAP HANA [SAP HANA](https://userguide.qualytics.io/source-datastore/datastore/jdbc/sap-hana/sap-hana-connector/) | Yes | No | No |
| 16. | Snowflake [Snowflake](https://userguide.qualytics.io/source-datastore/datastore/jdbc/snowflake/) | Yes | No | No |
| 17. | Synapse [Synapse](https://userguide.qualytics.io/source-datastore/datastore/jdbc/synapse/) | Yes | No | No |
| 18. | Teradata [Teradata](https://userguide.qualytics.io/source-datastore/datastore/jdbc/teradata/) | Yes | No | No |
| 19. | Timescale [Timescale DB](https://userguide.qualytics.io/source-datastore/datastore/jdbc/timescale-db/) | Yes | No | No |
| 20. | Trino [Trino](https://userguide.qualytics.io/source-datastore/datastore/jdbc/trino/) | Yes | No | No |

### Native Connectors

The same columns apply here. **Computed Tables?** is **Yes** for every native connector. **FQN Required?** is **No**, because an unqualified name resolves against the datastore's own database. **Spark SQL?** is **Yes** for all of them, because Qualytics runs the query itself instead of sending it to the source platform's own query engine.

| No. | Connector | Computed Tables? | FQN Required? | Spark SQL? |
| --- | --- | --- | --- | --- |
| 1. | AWS Glue Native [AWS Glue Native](https://userguide.qualytics.io/source-datastore/datastore/native/glue/deep-dive/introduction/) | Yes | No | Yes |
| 2. | Hive Native [Hive Native](https://userguide.qualytics.io/source-datastore/datastore/native/hive/deep-dive/introduction/) | Yes | No | Yes |
| 3. | MongoDB [MongoDB](https://userguide.qualytics.io/source-datastore/datastore/native/mongodb/deep-dive/introduction/) | Yes | No | Yes |
| 4. | Unity Catalog Native [Unity Catalog Native](https://userguide.qualytics.io/source-datastore/datastore/native/unity-catalog/deep-dive/introduction/) | Yes | No | Yes |

Databricks Native, available on Databricks-based deployments, follows the same rule.

A few things work differently from JDBC connectors:

- **Only read queries are accepted.** The query must start with `SELECT`, `WITH`, `VALUES`, `TABLE`, or `FROM`. Statements that create, change, or remove objects or settings, such as `CREATE`, `DROP`, `SET`, `CACHE TABLE`, or `ADD JAR`, are refused.
- **Table names resolve against the datastore's own database.** An unqualified name such as `orders` points to the database (or schema) set on the datastore, so table names need no prefix.
- **Give each expression an alias.** As on JDBC connectors, an expression without an output name needs one (for example, `SELECT amount * 2 AS doubled_amount`).
- **Platform-specific syntax may not carry over.** Spark SQL is close to HiveQL and Databricks SQL, but functions registered only on your cluster (such as Hive UDFs) and session statements are not available. On Hive Native, write the query in Spark SQL even though the same tables take HiveQL through the [Hive](https://userguide.qualytics.io/source-datastore/datastore/jdbc/hive/) connector.

> **Tip: The editor hint names the connector**
>
> The hint below the query editor names the datastore's connector, for example "Any valid Hive Native query". On native connectors that always means a Spark SQL query.

### DFS Connectors

DFS datastores do not offer Computed Tables, so the **Computed Tables?** column is **No** for every DFS connector. They use [Computed Files](https://userguide.qualytics.io/container/computed-files/deep-dive/how-it-works/) instead, which are written in Spark SQL, so the **Spark SQL?** column is **Yes**. See [Spark SQL Rules](https://userguide.qualytics.io/container/computed-files/deep-dive/how-it-works/#spark-sql-rules) for how a Computed File's clauses are written.

| No. | Connector | Computed Tables? | Spark SQL? |
| --- | --- | --- | --- |
| 1. | Amazon S3 [Amazon S3](https://userguide.qualytics.io/source-datastore/datastore/dfs/amazon-s3/amazon-s3-connector/) | No | Yes |
| 2. | Azure Datalake Storage [Azure Datalake Storage (ABFS)](https://userguide.qualytics.io/source-datastore/datastore/dfs/azure-datalake-storage/azure-datalake-storage-connector/) | No | Yes |
| 3. | Google Cloud Storage [Google Cloud Storage](https://userguide.qualytics.io/source-datastore/datastore/dfs/google-cloud-storage/) | No | Yes |

## Dialect Notes

Each dialect has its own preferred syntax for common patterns. A short cheat sheet of things to remember:

- **Snowflake**: supports `QUALIFY` for window-function filtering; `IFF()` is a common alternative to `CASE WHEN`; identifiers are case-sensitive when wrapped in double quotes.
- **BigQuery**: table references are `project.dataset.table`; use `STRUCT` and `UNNEST` for nested data; prefer `SAFE_CAST` over `CAST` for error-safe conversions. Computed tables are unaffected by [Billing Project ID](https://userguide.qualytics.io/source-datastore/datastore/jdbc/bigquery/bigquery-connector/#computed-tables).
- **SQL Server**: `TOP` instead of `LIMIT`; `+` is the string-concatenation operator; identifiers can be quoted with `[brackets]` or double quotes.
- **Oracle**: no built-in boolean type in `SELECT` output; `NVL` and `NVL2` are Oracle-flavored `COALESCE`; use `ROWNUM` for row-number filtering or a window function for a more portable pattern.
- **PostgreSQL and Redshift**: identifiers are case-insensitive unless wrapped in double quotes; `LIMIT` and `OFFSET` for pagination; Redshift diverges from PostgreSQL for some window-function edge cases.
- **Databricks**: supports standard SQL over Delta and Parquet tables. Watch out for the semantics of `IS NULL` on nested `STRUCT` columns. Databricks SQL is built on Spark SQL, so most Spark SQL syntax also works here, but the query runs on Databricks compute.
- **Athena, Presto, and Trino**: mostly ANSI SQL; use `TRY_CAST` and `TRY` for error-safe conversions; array and map types are first-class.

For dialect-specific reference material, consult the warehouse's own documentation.

*Last updated: November 9, 2026.*
