MD_LIST_DIVES
Public Preview
Dives are currently in public preview and functionality is subject to change.
Lists all Dives in your MotherDuck account. Returns metadata for each Dive without the component content.
Syntax
SELECT * FROM MD_LIST_DIVES();
SELECT * FROM MD_LIST_DIVES("limit" =100, "offset" =0);
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | UINTEGER | No | Maximum number of Dives to return |
offset | UINTEGER | No | Number of Dives to skip |
include_org_shares | BOOLEAN | No | Include Dives shared with your organization. Defaults to false. |
tip
limit and offset are reserved SQL keywords and must be double-quoted when used as named parameters.
Return Columns
| Column | Type | Description |
|---|---|---|
id | UUID | Unique identifier of the Dive |
title | VARCHAR | Dive title |
description | VARCHAR | Dive description |
owner_id | UUID | UUID of the Dive owner |
current_version | INTEGER | Latest version number (1-based) |
created_at | TIMESTAMP WITH TIME ZONE | When the Dive was created |
updated_at | TIMESTAMP WITH TIME ZONE | When the Dive was last updated |
owner_name | VARCHAR | Name of the Dive owner |
Examples
List all Dives:
SELECT * FROM MD_LIST_DIVES();
List the 10 most recently updated Dives:
SELECT id, title, owner_name, updated_at
FROM MD_LIST_DIVES()
ORDER BY updated_at DESC
LIMIT 10;
Paginate through Dives:
SELECT * FROM MD_LIST_DIVES("limit" =20, "offset" =0); -- first page
SELECT * FROM MD_LIST_DIVES("limit" =20, "offset" =20); -- second page
Related
MD_GET_DIVE— Read a Dive including its contentMD_LIST_DIVE_VERSIONS— List version history for a Divelist_divesMCP tool — AI assistant equivalent