Managing shares
Getting details about a share
You can learn more about a specific share that you’ve created by using DESCRIBE SHARE
command. For example:
- SQL
- UI
DESCRIBE SHARE "duckshare";
In the UI you can roll over a share to see a tooltip that tells you the share owner, when it was last updated, and access scope.
Listing Shares
You can list the shares you have created via the LIST SHARES
statement. For example:
- SQL
- UI
LIST SHARES;
- You can see shares that you've created under "Shares I've created".
- You can find Discoverable Organization shares that members of your Organization created under "Shared with me".
Deleting a share
Shares can be deleted with the DROP SHARE
or DROP SHARE IF EXISTS
method. For example:
Users who have ATTACH
-ed it will lose access.
- SQL
- UI
DROP SHARE "share1";
- Roll over the share you'd like to delete.
- Click on the "trident" on the right side.
- Select "Drop".
- Confirm.
Updating a share
Sharing a database creates a point-in-time snapshot of the database at the time it is shared.
To publish changes, you need to explicitly run UPDATE SHARE <share name>
.
When updating a SHARE
with the same database, the URL does not change.
- SQL
UPDATE SHARE <share name>;
In the following example database ‘mydb’ was previously shared by creating a share ‘myshare’, and the database ‘mydb’ has been updated since. Owner of the database would like their colleagues to receive the new version of this database:
- SQL
# 'myshare' was previously created on the database 'mydb'
UPDATE SHARE "myshare";
If you lost your database share url, you can use the LIST SHARES
command to list all your share or DESCRIBE SHARE <share name>
to get specific details about a given share name.
Editing/Altering a share
You can change the configuration of shares you've created in the UI. SQL operation ALTER SHARE
is in the works.
- UI
- Roll over the share you'd like to edit.
- Click on the "trident" on the right side.
- Select "Alter".
- Change the share configuration as you see fit.
- Confirm "Alter share".