motherduck-share-data
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseShare Data with MotherDuck
使用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.
当你需要无需拷贝数据即可分发MotherDuck数据库时,请使用此技能。共享是只读的零拷贝数据库克隆,应视为显式的资源调配操作。
Source Of Truth
权威来源
- Prefer the current MotherDuck sharing docs and SQL reference first.
- If the MotherDuck MCP feature is available, use it before falling back to public docs.
ask_docs_question - Keep the sharing model aligned with the documented behavior:
- zero-copy and metadata-only
- database-granularity sharing
- read-only recipients
- owner-controlled update mode
- 优先参考最新的MotherDuck共享文档和SQL参考手册。
- 如果MotherDuck MCP的功能可用,请先使用该功能,再 fallback 到公开文档。
ask_docs_question - 保持共享模型与文档记录的行为一致:
- 零拷贝且仅涉及元数据
- 数据库粒度的共享
- 只读接收方
- 所有者控制的更新模式
Prerequisites
前提条件
- MotherDuck connection established via
motherduck-connect - Source database identified via
motherduck-explore - Share SQL validated via
motherduck-query
- 已通过建立MotherDuck连接
motherduck-connect - 已通过确定源数据库
motherduck-explore - 已通过验证共享SQL
motherduck-query
Default Posture
默认配置
- Default internal sharing to ,
ACCESS ORGANIZATION, andVISIBILITY DISCOVERABLE.UPDATE AUTOMATIC - Use when the recipient needs a stable snapshot or versioned delivery.
UPDATE MANUAL - Use or
ACCESS RESTRICTEDwhen distribution should stay tightly controlled.VISIBILITY HIDDEN - Confirm whether the recipient is an internal user, another organization, or public before choosing access and visibility.
- For write-heavy publishers, verify the MotherDuck-supported DuckDB client version before relying on upstream checkpoint or concurrent-write improvements during share-update workflows.
- Never treat a share as row-level security. Shares operate at database granularity.
- 内部共享默认设置为、
ACCESS ORGANIZATION和VISIBILITY DISCOVERABLE。UPDATE AUTOMATIC - 当接收方需要稳定快照或版本化交付时,使用。
UPDATE MANUAL - 当分发需要严格控制时,使用或
ACCESS RESTRICTED。VISIBILITY HIDDEN - 在选择访问权限和可见性之前,确认接收方是内部用户、其他组织还是公开用户。
- 对于写入频繁的发布者,在依赖共享更新工作流中的上游检查点或并发写入改进之前,请验证MotherDuck支持的DuckDB客户端版本。
- 切勿将共享视为行级安全控制。共享以数据库为粒度运作。
Workflow
工作流程
- Identify the exact database to publish and who should consume it.
- Decide sensitivity, discoverability, and freshness requirements before writing SQL.
- Create the share with explicit access, visibility, and update settings.
- If access is restricted, grant readers explicitly. If the share is hidden or link-based, distribute the share URL directly.
- Have recipients the shared database and query it read-only.
ATTACH - If the share uses , the owner runs
UPDATE MANUALand consumers runUPDATE SHAREwhen a new snapshot is ready.REFRESH DATABASE
- 确定要发布的具体数据库以及目标使用者。
- 在编写SQL之前,确定数据敏感度、可发现性和新鲜度要求。
- 创建具有明确访问权限、可见性和更新设置的共享。
- 如果访问权限受限,需显式授予读者权限。如果共享是隐藏的或基于链接的,请直接分发共享URL。
- 让接收方共享数据库并以只读方式查询。
ATTACH - 如果共享使用,当新快照准备就绪时,所有者运行
UPDATE MANUAL,消费者运行UPDATE SHARE。REFRESH DATABASE
Open Next
后续参考
- for the full SQL playbook, access/update decision matrix, consumer workflow, and common failure modes
references/SHARE_PLAYBOOK.md
- :包含完整的SQL操作手册、访问/更新决策矩阵、消费者工作流以及常见故障模式
references/SHARE_PLAYBOOK.md
Related Skills
相关技能
- for MotherDuck authentication and connection setup
motherduck-connect - for discovering databases, tables, columns, and existing shares
motherduck-explore - for validating share SQL and downstream queries
motherduck-query - for DuckDB SQL syntax and lookup support
motherduck-duckdb-sql
- :用于MotherDuck身份验证和连接设置
motherduck-connect - :用于发现数据库、表、列和现有共享
motherduck-explore - :用于验证共享SQL和下游查询
motherduck-query - :用于DuckDB SQL语法和查询支持
motherduck-duckdb-sql