🗃️ AI
3 items
📄️ ATTACH <database>
A local database can be attached in order to access local data, and a remote MotherDuck database that a user has created and has previously detached may be re-attached. To attach to a MotherDuck database, the md: prefix is used.
📄️ ATTACH <share>
Sharing in MotherDuck is done through shares. Recipient of a share must ATTACH the share, which creates a read-only database. This is a zero-copy, zero-cost, metadata-only operation. Learn more about sharing in MotherDuck.
📄️ COPY FROM DATABASE
The COPY FROM DATABASE statement creates a new database from an existing one. It can be used to:
📄️ CREATE DATABASE
The CREATE DATABASE statement creates a new database in MotherDuck. In addition to creating a database, it can be used to copy entire databases into MotherDuck from your local environment, or to zero-copy clone databases inside of MotherDuck.
📄️ CREATE SECRET
MotherDuck enables you to store your cloud storage credentials for convenience, using the familiar DuckDB CREATE SECRET syntax. See DuckDB CREATE SECRET documentation.
📄️ CREATE SHARE
The CREATE SHARE statement creates a new a share from a database. This command is used to share databases with other users. Learn more about sharing in MotherDuck.
📄️ CREATE SNAPSHOT
CREATE SNAPSHOT OF creates a new read-only snapshot of the specified database for read-scaling ducklings. Only one database can be snapshotted per command.
📄️ DROP SECRET
The DuckDB DROP SECRET statement (see DuckDB DROP SECRET documentation) works in MotherDuck to delete the secret previously created with CREATE SECRET statement.
📄️ DESCRIBE SHARE
The DESCRIBE SHARE statement is used to get details about a specific share.
📄️ DETACH <database>
After a database has been created, it can be detached.
📄️ DETACH <share>
Attached shares are sticky, and will continue to appear in your catalog unless you explicitly detach them with:
📄️ DROP DATABASE
The DROP statement removes a database entry added previously with the CREATE command.
📄️ DROP SHARE
DROP SHARE is used to delete a share by the share creator. Users who have attached the share will lose access.
📄️ GRANT READ ON SHARE
For restricted shares, use the GRANT command to explicitly give users access to the share. After a user has been GRANT-ed access they will still need to run an ATTACH command to be able to run queries against the shared database. Only the owner of the share can use the GRANT command to give access to others.
📄️ LIST SECRETS
Secrets can be listed in the same way as in DuckDB by using the table function duckdb_secrets().
📄️ LIST SHARES
The LIST SHARES statement is used to list all shares that you've created.
📄️ MD_RUN parameter
For certain DuckDB Table Functions, MotherDuck now provides an additional parameter, MD_RUN that gives explicit control over where the query is executed.
📄️ PRINT_MD_TOKEN pragma
You can retrieve your MotherDuck authentication token using the PRINTMDTOKEN pragma.
📄️ REFRESH DATABASE
There are two types of databases that can be refreshed: database shares and databases attached to read-scaling
📄️ REVOKE READ ON SHARE
For restricted shares, use the REVOKE command to explicitly remove share access from users that have an existing GRANT. After running a REVOKE command there may be a delay of a few minutes before access is fully removed if a user is currently querying the share. Only the owner of the share can use the REVOKE command to remove access from others. GRANT and REVOKE do not apply to UNRESTRICTED shares.
📄️ SHOW ALL DATABASES
The SHOW ALL DATABASES statement shows all databases, would it be MotherDuck database, DuckDB database or MotherDuck shares.
📄️ TEMPORARY TABLES
The CREATE TEMPORARY TABLE statement creates a new a temporary from a sql query. This command is used to create a local temporary table. More information can be found in the DuckDB documentation.
📄️ UPDATE SHARE
Shares can either be manually or automatically updated by the share creator. All users of the share will automatically see share updates within 1 minute, containing both DDL (like CREATE TABLE) and DML (inserts, updates, or deletes) changes.
🗃️ Server Connection Management
3 items
🗃️ MD_INFORMATION_SCHEMA
4 items
📄️ Object name resolution
Fully qualfied naming convention