Empowering Data Teams: Smarter AI WorkflowsLive demo with Hex + MotherDuck on Nov 13

Skip to main content

OWNED_SHARES view

The MD_INFORMATION_SCHEMA.OWNED_SHARES view provides information about shares created by the current user.

note

Shares are region-scoped based on your Organization's cloud region. MotherDuck Organizations are currently scoped to a single cloud region that must be chosen at Org creation when signing up.

Schema

Querying the MD_INFORMATION_SCHEMA.OWNED_SHARES view will return query results that contain one row for each share created by the current user.

The MD_INFORMATION_SCHEMA.OWNED_SHARES view has the following schema:

Column NameData TypeValue
NAMESTRINGThe name of the share
URLSTRINGThe share_url which can be used to attach the share
SOURCE_DB_NAMESTRINGThe name of the database where this share was created from
SOURCE_DB_UUIDUUIDUUID of the database where this share was created from
ACCESSSTRINGWhether anyone (referred to as UNRESTRICTED) or only organization members (referred to as ORGANIZATION) can attach to the share by its share_url
GRANTSSTRUCT(username VARCHAR, access VARCHAR)[]A list of all grants that are active for the share
VISIBILITYSTRINGWhether the share is DISCOVERABLE or HIDDEN
UPDATESTRINGThe share’s update mode (MANUAL vs. AUTOMATIC)
CREATED_TSTIMESTAMPThe share’s creation time

Example usage

from MD_INFORMATION_SCHEMA.OWNED_SHARES;

select name, url, created_ts from MD_INFORMATION_SCHEMA.OWNED_SHARES;
nameurlsource_db_name
my_sharemd:_share/my_share/2ef6b580-2445-4f4f-bce8-c13a85812464db1