Skip to main content

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 :

┌──────────────────────┬──────────────────────┬───────────────┬────────────────────────────────┬──────────────────────────────────────┐
│ share_name │ share_link │ database_name │ database_id │ snapshot_id │
│ varchar │ varchar │ varchar │ uuid │ uuid │
├──────────────────────┼──────────────────────┼───────────────┼────────────────────────────────┼──────────────────────────────────────┤
│ currency_rate_202306 │ md:_share/my_db/18… │ my_db │ 4945bc55-3a7c-42cf-b40b-941d… │ 57ee90e1-c78a-4453-82c4-68f11536c5ff │
└──────────────────────┴──────────────────────┴───────────────┴────────────────────────────────┴──────────────────────────────────────┘
column_namecolumn_typedescription
share_nameVARCHARName of the share
share_linkVARCHARURL of the share
database_nameVARCHARName of the database shared
database_idUUIDuid of the database
snapshot_idUUIDuid of the snapshot

You can be specific about what which columns you want to return by using the table function :

SELECT share_name, share_link, database_name, snapshot_id FROM md_describe_database_share('md:_share/sample_data/23b0d623-1361-421d-ae77-62d701d471e6');