Synonyms

Oracle AI Data Platform supports private and public synonyms imported from external catalogs backed by Oracle Autonomous AI Database.

A synonym is an alias for another schema object. Oracle AI Data Platform supports public and private synonyms from external catalog sources. Synonyms are typically used to simplify object references or provide a stable, business-friendly name. Access to the underlying object still depends on the applicable source and AI Data Platform permissions. For more information about synonyms, see Oracle AI Database Concepts.

You can use the synonym to reference the underlying table or view without needing the three-part name for that table or view.

Private synonyms

Private synonyms belong to a specific schema. They are displayed in that schema’s Synonyms folder and are referenced as <catalog_name>.<schema_name>.<private_synonym_name>.

Public synonyms

Public synonyms are defined at the source database level rather than being owned by a specific schema. In AI Data Platform, they are displayed under the Default (Public synonyms) schema. Access to the underlying object remains subject to applicable permissions. Public synonyms are referenced with three-part names that always include the default schema and can be called from notebooks and agents with this format: <catalog>.default.<public_synonym_name>

Synonym-backed objects are queried in AI Data Platform through SQL and notebooks using the appropriate catalog naming pattern for the synonym type.

Private Synonym Querying

Private synonyms are queried using their three-part catalog naming.

Private Synonym SQL Example
SELECT *
FROM <catalog_name>.<schema_name>.<synonym_name>
Private Synonym PySpark Example
df = spark.read.table("<catalog_name>.<schema_name>.<synonym_name>")
df.show()

Public Synonym Querying

Public synonyms belong to the default schema in a catalog, so they are queried with the three-part catalog naming pattern including default as the schema.

Public Synonym SQL Example
SELECT *
FROM <catalog_name>.default.<public_synonym_name>
Public Synonym PySpark Example
df = spark.read.table("<catalog_name>.default.<public_synonym_name>")
df.show()

View Synonym Details

You can view the details for the underlying data of a synonym or the details for the synonym object itself.

  1. On the home page, click Master Catalog.
  2. Navigate to the synonym in your catalog.
  3. To view the columns exposed through the synonym, select the Columns tab.
  4. To view details for the synonym object, select the Details tab.