DESCRIBE SHARE
The DESCRIBE SHARE
statement is used to get details about a specific share.
info
The creator of the share object can execute this statement by passing the share name. The receiver of the share object can execute this statement by passing the share link.
Syntax
DESCRIBE SHARE [<share name> | <share URL>];
Example
Let's use the sample_data
database which is auto attached to MotherDuck users to illustrate the command
DESCRIBE SHARE 'md:_share/sample_data/23b0d623-1361-421d-ae77-62d701d471e6';
It returns a table with the following columns:
column_name | column_type | description |
---|---|---|
name | VARCHAR | Name of the share |
url | VARCHAR | URL of the share |
source_db_name | VARCHAR | Name of the database shared |
source_db_uuid | UUID | uid of the database shared |
access | VARCHAR | Whether anyone (referred to as UNRESTRICTED) or only organization members (referred to as ORGANIZATION) can attach to the share by its share_url |
visibility | VARCHAR | Whether the share is DISCOVERABLE or HIDDEN |
update | VARCHAR | The share’s update mode (MANUAL vs. AUTOMATIC) |
created_ts | TIMESTAMP WITH TIME ZONE | The share’s creation time |
You can be specific about what which columns you want to return by using the table function :
SELECT name, url, source_db_name FROM md_describe_database_share('md:_share/sample_data/23b0d623-1361-421d-ae77-62d701d471e6');