DROP APPLICATION

Removes an application from the system in the Native Apps Framework.

See also:

ALTER APPLICATION, CREATE APPLICATION, CREATE APPLICATION, SHOW APPLICATIONS

Syntax

DROP APPLICATION [ IF EXISTS ] <name> [ CASCADE ]
Copy

Required Parameters

name

Specifies the identifier for the application to drop. If the identifier contains spaces, special characters, or mixed-case characters, the entire string must be enclosed in double quotes. Identifiers enclosed in double quotes are also case-sensitive.

Optional Parameters

CASCADE

Drops the database and all objects in the database, including tables with primary/unique keys that are referenced by foreign keys in other tables.

If CASCADE is not specified, this command returns an error if the application owns objects outside of itself.

If CASCADE is specified all objects owned by the application are dropped, even if those objects contain other objects owned by the consumer. For example, if the consumer transfers ownership of a schema or table to an account role, but leaves the parent database owned by the application, running this command with CASCADE also drops those objects.

To retain objects owned by the application, use the GRANT OWNERSHIP command to transfer ownership of those objects, then run this command without CASCADE.

Usage Notes

  • This command can be run by the application owner or a user with the MANAGE GRANTS privilege on the application.

  • All application roles are dropped when the application is dropped. Any access granted by those roles on objects in the consumer account are lost.

Examples

DROP APPLICATION hello_snowflake_app;
Copy
+-------------------------------------------+
| status                                    |
|-------------------------------------------|
| hello_snowflake_app successfully dropped. |
+-------------------------------------------+