DROP EXTERNAL CONSUMER

Removes an external consumer from the account. Dropping an external consumer immediately revokes access for any listings that were shared with that consumer.

See also:

CREATE EXTERNAL CONSUMER , ALTER EXTERNAL CONSUMER , SHOW EXTERNAL CONSUMERS , DESCRIBE EXTERNAL CONSUMER

Syntax

DROP EXTERNAL CONSUMER [ IF EXISTS ] <name>

Parameters

IF EXISTS

Drops the external consumer only if one with the specified name exists. If no external consumer with that name exists, the command does nothing and completes successfully instead of returning an error.

name

Specifies the identifier for the external consumer to drop.

Access control requirements

A role used to execute this operation must have the following privileges at a minimum:

PrivilegeObjectNotes
OWNERSHIPExternal ConsumerRequired to drop the external consumer.

For instructions on creating a custom role with a specified set of privileges, see Creating custom roles.

For general information about roles and privilege grants for performing SQL actions on securable objects, see Overview of Access Control.

Usage notes

  • Dropping an external consumer revokes access to all listings shared with that consumer. The listings themselves are not affected.
  • All Programmatic Access Tokens associated with the external consumer are invalidated when the consumer is dropped.
  • Dropped external consumers cannot be recovered.
  • When the IF EXISTS clause is specified and the target object doesn’t exist, the command completes successfully without returning an error.

Examples

Drop an external consumer:

DROP EXTERNAL CONSUMER acme_consumer;

Drop an external consumer if it exists:

DROP EXTERNAL CONSUMER IF EXISTS acme_consumer;