Ontology SQL support is in the beta phase of development and may not be available on your enrollment. Functionality may change during active development. Contact Palantir Support to request enabling Ontology SQL.
Use the Analyze using SQL feature to view a quick analysis of object types. This feature consists of a SQL "scratchpad", where you can run read-only SQL queries. Similarly to Dataset Preview, it supports the following features:
JOIN
queriesSupport for many-to-many link types in analyze using SQL is under development and not yet available.
Follow the steps below to use analyze using SQL:
You can search for any object type in your query by typing its name. An autocomplete window will appear, allowing you to quickly select and autofill the full RID of the object type.
Alternatively, you can use the object type's API name with the following syntax:
Copied!1
`ontologyApiName`.`objectTypeApiName`
Analyze using SQL works by querying the backing datasource or the materialization of an Ontology entity. Note the following requirements:
The code editor will display a warning if you attempt to query Ontology inputs that do not meet these requirements.
Queries cannot mix tabular sources such as datasets, tables, or restricted views and Ontology inputs within the same query.
For objects with edits enabled, analyze using SQL will query the entity’s materialization. This means that recent changes such as edits or actions performed on objects may take up to 30 seconds to appear in the query results. The code editor displays a reminder about this data freshness window above the output table.
The SQL engine supports the Spark SQL dialect. In Spark SQL, identifiers such as table names should be quoted using backticks ( ` ) rather than single or double quotes.
The example below demonstrates this syntax:
Copied!1
SELECT column_name FROM \`ri.ontology.main.object-type...\`;
For more information on the Spark SQL dialect and its syntax, refer to the official Spark SQL documentation ↗.