
Motherduck Share Data
- 254 installs
- 53 repo stars
- Updated July 31, 2026
- motherduckdb/agent-skills
Share MotherDuck databases, snapshots, or query results securely with teammates, clients, or partners using governed access and collaboration workflows.
About
Helps agents configure MotherDuck data sharing for secure collaboration, including access controls, shareable snapshots or databases, and ongoing lifecycle management as datasets and audiences grow.
- governed sharing
- team access
- snapshot links
- audit visibility
Motherduck Share Data by the numbers
- 254 all-time installs (skills.sh)
- +16 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #197 of 911 Databases skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/motherduckdb/agent-skills --skill motherduck-share-dataAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 254 |
|---|---|
| repo stars | ★ 53 |
| Last updated | July 31, 2026 |
| Repository | motherduckdb/agent-skills ↗ |
What it does
Share MotherDuck databases, snapshots, or query results securely with teammates, clients, or partners using governed access and collaboration workflows.
Files
Share Data with MotherDuck
Use this skill when you need to distribute a MotherDuck database without copying data. Shares are read-only, zero-copy database clones and should be treated as explicit provisioning operations.
Source Of Truth
- Prefer the current MotherDuck sharing docs and SQL reference first.
- If the MotherDuck MCP
ask_docs_questionfeature is available, use it before falling back to public docs. - Keep the sharing model aligned with the documented behavior:
- zero-copy and metadata-only
- database-granularity sharing
- read-only recipients
- owner-controlled update mode
Prerequisites
- MotherDuck connection established via
motherduck-connect - Source database identified via
motherduck-explore - Share SQL validated via
motherduck-query
Default Posture
- Default internal sharing to
ACCESS ORGANIZATION,VISIBILITY DISCOVERABLE, andUPDATE AUTOMATIC. - Use
UPDATE MANUALwhen the recipient needs a stable snapshot or versioned delivery. - Use
ACCESS RESTRICTEDorVISIBILITY HIDDENwhen distribution should stay tightly controlled. - Confirm whether the recipient is an internal user, another organization, or public before choosing access and visibility.
- For write-heavy publishers, verify the DuckDB client version is one MotherDuck supports before relying on checkpoint or concurrent-write behavior during share-update workflows.
- Never treat a share as row-level security. Shares operate at database granularity.
Workflow
1. Identify the exact database to publish and who should consume it. 2. Decide sensitivity, discoverability, and freshness requirements before writing SQL. 3. Create the share with explicit access, visibility, and update settings. 4. If access is restricted, grant readers explicitly. If the share is hidden or link-based, distribute the share URL directly. 5. Have recipients ATTACH the shared database and query it read-only. 6. If the share uses UPDATE MANUAL, the owner runs UPDATE SHARE and consumers run REFRESH DATABASE when a new snapshot is ready.
Open Next
- Read
references/SHARE_PLAYBOOK.mdfor the full SQL playbook, access/update decision matrix, consumer workflow, and common failure modes.
Related Skills
motherduck-connectfor MotherDuck authentication and connection setupmotherduck-explorefor discovering databases, tables, columns, and existing sharesmotherduck-queryfor validating share SQL and downstream queriesmotherduck-duckdb-sqlfor DuckDB SQL syntax and lookup support
Share Playbook
Reference for creating, operating, and consuming MotherDuck shares safely.
Contents
| Section | Covers |
|---|---|
| What Shares Are | Read-only, zero-copy, database-granularity semantics |
| SQL-First Posture | Shares as explicit, auditable SQL operations |
| Default Workflow | Owner-to-consumer sequence |
| SQL Workflow Template | Copyable end-to-end owner and consumer SQL |
| Create a Share | CREATE SHARE options |
| Access Levels | ORGANIZATION vs RESTRICTED vs UNRESTRICTED |
| Visibility Options | DISCOVERABLE vs HIDDEN |
| Update Modes | MANUAL vs AUTOMATIC |
| Common Share Patterns | Internal, named-recipient, link-based external |
| Operating Shares | List, refresh, grant/revoke, drop |
| Consuming Shares | Attach, refresh, query shared data |
| Discovering and Exploring Shares | Find shares and inspect attached schemas |
| Use Cases | Distribution patterns by scenario |
| Key Rules | Sharing defaults in one list |
| Common Mistakes | Frequent share failures and fixes |
What Shares Are
A share is a read-only reference to a MotherDuck database. When you create a share, MotherDuck records share metadata pointing at the source database. No bytes are copied. Recipients attach the share and query it as a read-only clone in their own workspace.
Key properties:
- Read-only: recipients can
SELECT, but neverINSERT,UPDATE, orDELETE - Zero-copy: no data duplication; the share itself incurs no additional storage cost
- Database-granularity: shares are created from databases, not arbitrary subsets of tables
- Owner-controlled updates: use
UPDATE MANUALfor explicit snapshots orUPDATE AUTOMATICfor periodic propagation - Access-controlled: restrict who can attach the share by organization, ACL, or share URL pattern
SQL-First Posture
- Keep share creation and maintenance as explicit SQL, even when the caller is an application or provisioning tool.
- Make access, visibility, and update mode explicit in every
CREATE SHARE. - Treat share operations as auditable database changes, not as hidden driver logic.
- Use SQL to verify the share state after every create, update, grant, revoke, or attach step.
Default Workflow
1. Choose the source database to share. 2. Decide access level, visibility, and freshness requirements. 3. Create the share with explicit options. 4. Distribute the share URL if the share is hidden or external. 5. Have recipients attach and query the data. 6. For manual shares, run UPDATE SHARE on the owner side and REFRESH DATABASE on the consumer side.
SQL Workflow Template
Use this sequence as the default shape:
-- owner side
CREATE SHARE IF NOT EXISTS partner_share FROM analytics (
ACCESS RESTRICTED,
VISIBILITY HIDDEN,
UPDATE MANUAL
);
GRANT READ ON SHARE partner_share TO duck1, duck2;
LIST SHARES;
FROM MD_INFORMATION_SCHEMA.OWNED_SHARES;
-- later, when publishing a new manual snapshot
UPDATE SHARE partner_share;
-- consumer side
ATTACH '<share_url>' AS partner_data;
REFRESH DATABASE partner_data;
SELECT * FROM "partner_data"."main"."customers" LIMIT 10;Create a Share
CREATE SHARE IF NOT EXISTS my_data_share FROM my_database (
ACCESS ORGANIZATION,
VISIBILITY DISCOVERABLE,
UPDATE AUTOMATIC
);This creates a share named my_data_share from my_database that anyone in your organization can discover and attach, and that updates automatically — the default posture for internal sharing. Always state access, visibility, and update mode explicitly.
Access Levels
Choose the access level that matches your distribution model. Default to the most restrictive level that meets your needs.
| Level | Who Can Access | Use Case |
|---|---|---|
| ORGANIZATION | Anyone in your MotherDuck organization | Internal team sharing |
| RESTRICTED | Specific users you grant access to | Named-recipient sharing and internal ACLs |
| UNRESTRICTED | Anyone with the share URL | Public datasets |
Use ORGANIZATION for internal sharing. It requires no per-user grants and automatically covers new team members.
Use RESTRICTED for named users when you need an ACL instead of broad organization access. Grant access with GRANT READ ON SHARE ... TO ....
Use UNRESTRICTED only for truly public or deliberate link-based distribution. Never use it for sensitive, proprietary, or PII-containing data.
Visibility Options
Visibility controls whether the share is easy for users to find. Access level still controls who can read it.
| Visibility | Behavior |
|---|---|
| DISCOVERABLE | Appears in the UI and other discovery surfaces for users who have access |
| HIDDEN | Only accessible via direct URL |
Use DISCOVERABLE by default. It reduces "I didn't know that data existed" problems.
Use HIDDEN when the share contains sensitive data or when you want to control distribution strictly through direct URL sharing.
Update Modes
Update mode determines whether the share reflects a frozen snapshot or always-current data.
| Mode | Behavior |
|---|---|
| MANUAL | Share reflects the last explicit published snapshot; run UPDATE SHARE to refresh |
| AUTOMATIC | Share updates automatically after source database changes propagate |
Use MANUAL for point-in-time snapshots, versioned data products, and reproducible analysis.
Use AUTOMATIC for always-current data. Treat it as periodic propagation rather than instant synchronization.
Common Share Patterns
Internal Team Share
CREATE SHARE IF NOT EXISTS analytics_share FROM analytics_db (
ACCESS ORGANIZATION,
VISIBILITY DISCOVERABLE,
UPDATE AUTOMATIC
);Named-Recipient Share
CREATE SHARE IF NOT EXISTS partner_results FROM partner_deliverables (
ACCESS RESTRICTED,
VISIBILITY HIDDEN,
UPDATE MANUAL
);Grant access explicitly:
GRANT READ ON SHARE partner_results TO duck1, duck2;Link-Based External Share
CREATE SHARE IF NOT EXISTS partner_benchmark FROM benchmark_data (
ACCESS UNRESTRICTED,
VISIBILITY HIDDEN,
UPDATE MANUAL
);Operating Shares
List All Shares You Own
LIST SHARES;FROM MD_INFORMATION_SCHEMA.OWNED_SHARES;LIST SHARES lists shares created by the current user. For shares from other users, use MD_INFORMATION_SCHEMA.SHARED_WITH_ME (see Consuming Shares).
Manually Refresh a Share
Use this when the share has UPDATE MANUAL and the source data has changed.
UPDATE SHARE my_data_share;After refreshing, tell recipients to run REFRESH DATABASE on their attached clone if they need the new snapshot immediately.
Modify Recipient Access
For restricted shares, grant or revoke access explicitly:
GRANT READ ON SHARE my_data_share TO user_1, user_2;
REVOKE READ ON SHARE my_data_share FROM user_3;Delete a Share
Remove a share permanently. Recipients lose access immediately.
DROP SHARE my_data_share;Dropping a share does not affect the source database. It only removes the share reference.
Consuming Shares
Attach a Shared Database
ATTACH '<share_url>' AS partner_data;Replace <share_url> with the URL provided by the share owner. Choose a meaningful alias that describes the data.
Refresh to Get Latest Updates
When the share owner updates a manual share, refresh to pull the latest snapshot:
REFRESH DATABASE partner_data;Query Shared Data
Once attached, query shared tables like any other database. Use fully qualified names.
SELECT * FROM "partner_data"."main"."customers" LIMIT 10;SELECT
c.customer_id,
c.name,
o.order_total
FROM "partner_data"."main"."customers" c
JOIN "my_db"."main"."orders" o ON c.customer_id = o.customer_id;See What Is Shared With You
FROM MD_INFORMATION_SCHEMA.SHARED_WITH_ME;This returns share names, URLs, owners, and metadata. Use the URL to attach shares you have not yet attached.
Discovering and Exploring Shares
Find Shares by URL
FROM MD_INFORMATION_SCHEMA.SHARED_WITH_ME
WHERE url = '<share_url>';Explore a Shared Database After Attaching
Once a share is attached, explore it like any other database:
SELECT database_name, schema_name, table_name, comment
FROM duckdb_tables()
WHERE database_name = 'partner_data';SELECT column_name, data_type, comment
FROM duckdb_columns()
WHERE database_name = 'partner_data'
AND table_name = 'customers';SUMMARIZE "partner_data"."main"."customers";Use Cases
- Cross-team analytics: share curated datasets between data engineering, analytics, and product teams. Use
ORGANIZATIONaccess withAUTOMATICupdates so everyone sees current data. - Partner data exchange: share results with named users via
RESTRICTEDaccess andGRANT READ ON SHARE, or use a hidden URL when distribution is link-based. UseMANUALupdates to control exactly what version partners see. - Public datasets: make open data available to anyone with
UNRESTRICTEDaccess. Treat link distribution deliberately and do not use it for sensitive datasets. - Data products: build curated, versioned datasets for consumption. Use
MANUALupdates to create explicit versions and refresh on a defined cadence. - Reproducible analysis: share a frozen snapshot of the data used in a specific analysis. Use
MANUALupdates andHIDDENvisibility.
Key Rules
- Shares are read-only.
- Zero-copy means no storage duplication for the share itself.
- Use
MANUALupdate mode for snapshots andAUTOMATICfor always-current delivery. - Use
ORGANIZATIONfor internal sharing unless there is a clear reason not to. - Use
RESTRICTEDfor named recipients and ACL-style control. - Use
DISCOVERABLEby default andHIDDENwhen distribution should stay controlled. - Notify recipients after
UPDATE SHAREon manual shares because they may needREFRESH DATABASE. - Use fully qualified table names when querying shared databases.
- Use shares for governed distribution, not writable collaboration.
Common Mistakes
Expecting Recipients to Write to Shared Databases
Shares are read-only. If a recipient needs to modify or extend shared data, they should copy it into their own database first:
CREATE TABLE "my_db"."main"."local_copy" AS
SELECT * FROM "partner_data"."main"."customers";Using Unrestricted Access for Sensitive Data
UNRESTRICTED means anyone with the URL can access the data. Never use this for proprietary, internal, or PII-containing datasets.
Treating Shares Like Row-Level Security
Shares operate at database level. If you need per-customer or per-user isolation, publish separate databases or move to customer-facing analytics patterns with stronger structural isolation.
Forgetting to Update a Manual Share
With MANUAL update mode, recipients see stale data until you explicitly refresh:
UPDATE SHARE my_data_share;Forgetting to Refresh on the Consumer Side
Even after the owner updates the share, recipients must refresh their attached copy:
REFRESH DATABASE partner_data;Dropping a Share Without Notifying Recipients
When you drop a share, recipients lose access immediately. Communicate a deprecation window before removing a share that other people rely on.
Not Exploring Shared Data Before Querying
Always inspect the shared schema before writing downstream queries:
SELECT table_name
FROM duckdb_tables()
WHERE database_name = 'partner_data';SELECT column_name, data_type
FROM duckdb_columns()
WHERE database_name = 'partner_data'
AND table_name = 'customers';