Switch the SQL Mode¶
A workspace runs in one of two SQL modes. Source SQL runs on the datastore itself, in its own SQL dialect. Spark SQL runs in Qualytics over the datastore's tables as Qualytics sees them, including computed tables and computed fields.
Related
- Concept: SQL Modes for what each mode can read and when to pick it, and Query Editor for the SQL badge.
- Run a Query once the mode is set.
Step 1: Open the workspace from the Workspaces panel.
Step 2: Click the SQL badge next to Run . It names where the SQL runs and its dialect, for example Snowflake • SQL in Source SQL or Qualytics • Spark SQL in Spark SQL.
Step 3: In the menu, click the mode to switch to:
- Qualytics • Spark SQL (
Runs in Qualytics, reads computed tables and fields too) for Spark SQL. - The datastore's engine with SQL, for example Snowflake • SQL (
Runs on the datastore), for Source SQL.
The badge changes to the mode you picked, and the hint under the editor changes with it.
Step 4: Adjust the SQL to the mode if needed, then click Run . In Spark SQL, name the datastore's tables and file patterns by name alone, and wrap a file path in backticks.
Computed tables switch for you
When the SQL names a computed table or computed file, a notice under the editor says that only Qualytics reads it. Click Run in Qualytics in the notice to switch the workspace to Spark SQL.
File datastores
A file datastore runs Spark SQL only, so its badge shows Qualytics • Spark SQL with no menu. When the editor card is narrow, the badge shows the logo without the names.