SQL console is in the beta phase of development and not all features may be available on your environment. Functionality may change during active development. Contact Palantir support to request access to Beta features.
SQL console provides an interface for writing and executing SQL queries in Foundry.
You can access SQL console in the bottom panel of supported applications. The starter query is prepopulated based on your currently selected resource.

The SQL console interface includes the following controls:
SQL console is available in the following modes and applications:
| Mode | Compute engine | Available 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 SQL | Ontology Manager |
SQL console provides the following core functionality:
SELECT).) to perform efficient JOIN` queries.Additionally, SQL console provides the following beta functionality, which can be enabled on request:
CREATE TABLE).INSERT INTO, UPDATE, DELETE).You can optionally expand SQL console into a full-screen view by selecting the expand button. This provides a full-screen SQL editor, and includes a catalog browser for the project location from which you launched the console.
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.
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.

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.

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.
In order to use SQL console in data mode, you must have access to at least one of the following roles:
| Role | Permissions |
|---|---|
Preview datasets using SQL | Allows previewing data using SQL, with a limit of 1000 rows. |
Query datasets using SQL | Allows 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.