DROP EXTERNAL LOCATION (Databricks SQL)

Preview

Unity Catalog is in Public Preview. To participate in the preview, contact your Databricks representative.

Drops an external location. An exception is thrown if the location does not exist in the metastore.

Syntax

DROP EXTERNAL LOCATION [ IF EXISTS ] location_name [ FORCE ]

Parameters

  • IF EXISTS

    If specified, no exception is thrown when the location does not exist.

  • location_name

    The name of an existing location in the metastore. If the name does not exist, an exception is thrown unless IF EXISTS has been specified.

  • FORCE

    Optionally force the location to be dropped even if it is used by existing external tables. If FORCE is not specified an error is raised if the location is in use.

Examples

> DROP EXTERNAL LOCATION some_location FORCE;