SQL console

SQL console provides a contextual interface for writing and executing SQL queries inside various Foundry applications. For information on the dedicated SQL application, see SQL Studio.

Accessing SQL console

You can access SQL console in the bottom panel of supported applications. The starter query is prepopulated based on your currently selected resource.

Supported modes and applications

SQL console is available in the following modes and applications:

ModeCompute engineAvailable in
Data mode:
Query structured tabular data
Furnace
Legacy Spark engine
Dataset Preview
Data Lineage
Ontology Manager
Object mode [Beta]:
Query ontology object types
Ontology SQLOntology Manager

Using SQL console

The SQL console interface includes the following controls:

SQL console open in Dataset Preview, with the run button, results panel, full-screen expand button, and worksheet selector visible.

  1. SQL console: Open the SQL console panel.
  2. Run: Execute the current query.
  3. Results panel: Displays the output of the executed query.
  4. Full-screen expand: Expand the SQL console into full-screen view or the dedicated SQL Studio application.
  5. Worksheet selector: Switch between the scratchpad and saved SQL worksheets.

Core functionality

SQL console provides the following core functionality:

  • Query tabular data (SELECT).
  • Query ontology object types in Ontology Manager (Beta).
  • Autocomplete dataset schema and column names.
  • Search for other datasets within backticks () to perform efficient JOIN` queries.
  • Use editor-friendly features such as keyboard shortcuts to run a highlighted query.
  • Output a preview table for results of the executed SQL query.
  • Resize columns and the bottom panel to fit your preferences.
  • Optionally expand the SQL console to full-screen view.
  • Save SQL worksheet resources.
  • Create tables (CREATE TABLE).
  • Modify Iceberg tables (INSERT INTO, UPDATE, DELETE).

SQL Studio application and full-screen view

If SQL Studio is enabled for your enrollment, you can launch the dedicated SQL application in a new tab.

If SQL Studio is disabled, you can select the expand option to open the contextual SQL console in a full-screen view.

SQL worksheets

You can work in Scratchpad mode for temporary, session-only queries, or save your work as a SQL worksheet. SQL worksheets can be saved as a private resource accessible only from SQL console, or saved in a project to be shared with other users in that project.

Object mode [Beta]

To access SQL console in object mode, navigate to an object type in Ontology Manager. When viewing an object type, you can find the option to open SQL console in the bottom toolbar.

An example highlighting how to open SQL console in Ontology Manager.

Similar to data mode, after opening SQL console, you can create and run queries. Note that SQL console in object mode will use a tabular format for outputs.

When accessing the SQL console in Ontology Manager, you can select between object mode and data mode. The object type's backing and materialized dataset is suggested in the dropdown menu.

Object Mode Data Mode SQL console.

You can write any supported SQL query following the supported Spark SQL dialect. In Spark SQL, identifiers such as table names should be quoted using backticks ( ` ) rather than single or double quotes. You can also leverage auto-complete features, such as searching for dataset names or column names using backticks.

SQL console roles and permissions

In order to use SQL console in data mode, you must have access to at least one of the following roles:

RolePermissions
Preview datasets using SQLAllows previewing data using SQL, with a limit of 1000 rows.
Query datasets using SQLAllows querying data using SQL, without a limit.

If your organization has set up custom roles or download controls, Query datasets using SQL may have been restricted. Enable Preview datasets using SQL to allow previewing data while restricting full table downloads.