CREATE CONTACT¶

Creates a new contact or replaces an existing contact.

See also:

ALTER CONTACT , DROP CONTACT , SHOW CONTACTS

Syntax¶

CREATE [ OR REPLACE ] CONTACT [ IF NOT EXISTS ] <name>
  [ {
    USERS = ( <user-name> [ , <user_name> ... ] )
    | EMAIL_DISTRIBUTION_LIST = '<email>'
    | URL = '<url>'
    } ]
  [ COMMENT = '<string_literal>' ]
Copy

Required parameters¶

name

Specifies the name of the new contact.

In addition, the identifier must start with an alphabetic character and cannot contain spaces or special characters unless the entire identifier string is enclosed in double quotes (for example, "My object"). Identifiers enclosed in double quotes are also case-sensitive.

For more information, see Identifier requirements.

Optional parameters¶

USERS = ( user_name [ , user_name ... ] )

Comma-delimited list of Snowflake users who can be contacted, specified by the name of their user objects.

EMAIL_DISTRIBUTION_LIST = 'email'

A valid email address, which can be a distribution list if you want users to be able to contact more than one individual.

URL = 'url'

A URL that can be used to contact people about an object.

COMMENT

A user-defined string. Specifies a comment for the contact.

Access control requirements¶

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

Privilege

Object

Notes

CREATE CONTACT

Schema

The USAGE privilege on the parent database and schema are required to perform operations on any object in a schema.

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¶

  • Regarding metadata:

    Attention

    Customers should ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered as metadata when using the Snowflake service. For more information, see Metadata fields in Snowflake.

  • CREATE OR REPLACE <object> statements are atomic. That is, when an object is replaced, the old object is deleted and the new object is created in a single transaction.

Examples¶

CREATE CONTACT my_contact
  EMAIL_DISTRIBUTION_LIST = 'comany_support@example.com';
Copy