Sharing data with your organization
MotherDuck makes it easy for you to share data with all members of your Organization and making that data easily discoverable and queryable. This is a common use case for small, highly collaborative data teams.
- Data provider creates an Organization scoped, Discoverable share.
- Data consumers easily find the share and attach it.
- Data provider periodically updates the share to push new data to data consumers.
1. Creating organization-scoped, discoverable shares
To share a database with your Organization, create a share. No actual data is copied and no additional costs are incurred in this process.
- UI
- SQL
Click on the "trident" next to the database you'd like to share. Select "share". Then:
- Optionally, choose a share name. Default will be the database name.
- Choose whether the share should only be accessible by users in your Organization, or anyone with the share link.
- Choose whether the share should be automatically updated or not. Default is
MANUAL
use birds;
CREATE SHARE; -- Shorthand syntax. Share name is optional. By default, shares are Organization-scoped and Discoverable.
CREATE SHARE birds FROM birds
(ACCESS ORGANIZATION , VISIBILITY DISCOVERABLE); -- This query is identical to the previous one yet optionally more verbose.
2. Finding and consuming shares
The data consumer in your Organization can use the UI to find the share, attach it, and start querying it!
- UI
- Select the share you want under "Shared with me"
- Click "attach" and optionally name the resulting database.
- You can now query the resulting database.
The ability to list and discover Discoverable shares in SQL is coming shortly.
3. Updating shared data
If the database being shared has changed, in order for the changes to propagate to the data consumer, the data provider needs to update the share.
UPDATE SHARE birds;
Learn more about UPDATE SHARE.
We are working on auto-updating shares.