ALTER RECIPIENT

Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime 11.3 LTS and above check marked yes Unity Catalog only

Renames a recipient. Transfers the ownership of a recipient to a new principal.

Syntax

ALTER RECIPIENT recipient_name
  { RENAME TO to_recipient_name |
    [ SET ] OWNER TO principal |
    SET PROPERTIES ( property_key [ = ] property_value [, ...] ) |
    UNSET PROPERTIES ( property_key [, ...] ) }

Parameters

  • recipient_name

    The name of the recipient to be altered.

  • RENAME TO to_recipient_name

    Renames the recipient. The name must be unique among all recipients in the metastore. To run this statement, you must be the owner of the recipient and have CREATE RECIPIENT privilege on the metastore.

  • [ SET ] OWNER TO principal

    Transfers ownership of the recipient to principal. To run this statement, you must be the owner of the recipient.

    Applies to: check marked yes Databricks SQL SQL warehouse version 2022.35 or higher check marked yes Databricks Runtime 11.3 LTS and above

    SET is allowed as an optional keyword.

  • SET PROPERTIES ( property_key [ = ] property_value [, ...] )

    Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime 12.2 LTS and above.

    Sets a custom property on a recipient. To run this statement, you must be the owner of the recipient and have the CREATE RECIPIENT privilege on the metastore.

    Recipient properties can be used to share different table partitions with different recipients using the same share object. See Manage recipient properties and Use recipient properties to do partition filtering.

    property_key
    { identifier [. ...] | string_literal }
    
    property_value
    { string_literal }
    
  • UNSET PROPERTIES ( '<property-key>' )

    Applies to: check marked yes Databricks SQL check marked yes Databricks Runtime 12.2 LTS and above.

    Removes a custom property from a recipient. To run this statement, you must be the owner of the recipient and have the CREATE RECIPIENT privilege on the metastore.

    property_key
    { identifier [. ...] | string_literal }
    

Examples

-- Rename a recipient
> ALTER RECIPIENT `Center for Disease Control` RENAME TO cdc;

-- Change ownership of the recipient
> ALTER RECIPIENT cdc OWNER TO `alf@melmak.et`;

-- Change recipient properties
> ALTER RECIPIENT cdc SET PROPERTIES ( 'country' = 'US' );