Skip to main content

EXTERNAL_LOCATIONS

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime 10.4 LTS and above

INFORMATION_SCHEMA.EXTERNAL_LOCATIONS describes external locations.

Information is displayed only for external locations the user has permission to interact with.

This is an extension to the SQL Standard Information Schema.

Definition

The EXTERNAL_LOCATIONS relation contains the following columns:

NameData typeNullableDescription
EXTERNAL_LOCATION_NAMESTRINGNoName of the external location.
EXTERNAL_LOCATION_OWNERSTRINGNoOwner of the external location.
URLSTRINGNoPath URL of the external location.
STORAGE_CREDENTIAL_IDSTRINGNoID of the storage credential to access URL.
STORAGE_CREDENTIAL_NAMESTRINGNoName of the storage credential to access URL.
READ_ONLYSTRINGNoWhether the external location is read-only.
COMMENTSTRINGYesAn optional comment that describes the external location.
CREATEDTIMESTAMPNoTimestamp when the external location was created.
CREATED_BYSTRINGNoPrincipal who created the external location.
LAST_ALTEREDTIMESTAMPNoTimestamp when the external location was last altered in any way.
LAST_ALTERED_BYSTRINGNoPrincipal who last altered the external location.

Constraints

The following constraints apply to the EXTERNAL_LOCATIONS relation:

ClassNameColumn ListDescription
Primary keyEXTERNAL_LOCATIONS_PKEXTERNAL_LOCATION_NAMEUnique identifier for the external location.
Foreign keyEXTERNAL_LOCATIONS_CREDS_FKSTORAGE_CREDENTIAL_ID, STORAGE_CREDENTIAL_NAMEReferences STORAGE_CREDENTIALS

Examples

SQL
> SELECT external_location_owner
FROM information_schema.external_locations