Skip to main content
Removes a location object from your Firebolt account. Be cautious when dropping a location that is referenced by external tables, as it may impact dependent objects. For a comprehensive guide to LOCATION objects, see LOCATION objects.

Syntax

Parameters

Examples

Drop a location The following code example removes a LOCATION object from your Firebolt account:
Drop IF EXISTS The following code example removes a LOCATION object from your Firebolt account if it exists:
Drop with FORCE Option If you attempt to drop a location that is referenced by an external table, the drop operation fails by default. You can do either of the following:
  1. Safe Approach: Drop all dependent external tables before dropping the location.
  2. Force Approach: Use the WITH FORCE option to drop the location immediately regardless of dependencies.
If you choose WITH FORCE, the following apply:
  • The location is deleted regardless of existing dependencies.
  • All external tables that reference the removed location become invalid.
  • Queries on any invalid tables will result in an error.
  • You must manually clean up the invalid external tables after using WITH FORCE.
The following code example deletes a LOCATION object from your Firebolt account without considering its dependencies:

Error handling

The following table lists the types of errors that may occur during location removal:

Best Practices

When dropping a location, consider the following:
  1. Before Dropping
    • Use IF EXISTS to handle non-existent locations gracefully.
    • Ensure no active queries are using the location.
    • Check for dependent external tables.
To identify external tables that depend on this location, execute the following query.
  1. Using WITH FORCE
    • Use only when necessary.
    • Clean up invalid external tables immediately.
    • Document the reason for using this option.
  2. After Dropping
    • Verify all dependent objects are handled.
    • Update any scripts or documentation referencing the location.

Notes

  • All identifiers are case-insensitive unless enclosed in double-quotes
  • For more information about object identifiers, see Object identifiers