swap-databases
Installation
SKILL.md
Database Swap
Three workflow modes:
- Mode A (Name Swap): Renames two databases by swapping their names with object sync and grant mirroring.
- Mode B (Read-Only Dependency Redirect): For read-only/shared databases that cannot be renamed. Finds all objects across the account that depend on the first database and recreates them to reference the second database instead.
- Mode C (Zerocopy Swap — Datashare to CLD): For swapping an imported datashare database with a catalog-linked database (CLD) using Snowflake's built-in system function.
Intent Detection
Ask user which mode applies:
| Signal | Mode |
|---|---|
| User says "swap", "rename", "exchange", databases are writable | Mode A |
| User says "read-only", "shared", "imported", "redirect", "replace", databases cannot be renamed | Mode B |
| User says "datashare", "catalog linked database", "CLD", "zerocopy", or one DB is an imported share and the other is a CLD | Mode C |