Building a Data Stack Live with AI AgentsLivestream August 18

Skip to main content

MD_GET_GUIDE

Preview
This feature is in preview and is subject to change.

Read a Guide's full markdown content by ID, optionally at a specific historical version.

Syntax

SELECT * FROM MD_GET_GUIDE(id = '<guide_uuid>');

-- Read a specific version
SELECT * FROM MD_GET_GUIDE(id = '<guide_uuid>', version = 2);

Parameters

ParameterTypeRequiredDescription
idUUIDYesThe guide's UUID, as returned by MD_LIST_GUIDES or MD_CREATE_GUIDE.
versionUINTEGERNoHistorical version number to read. Defaults to the current version.

Return columns

ColumnTypeDescription
idUUIDUnique identifier of the guide
topicVARCHARGrouping label (NULL for guides without a topic)
titleVARCHARGuide title
descriptionVARCHAROne-line summary
owner_idUUIDUUID of the guide owner
owner_nameVARCHARName of the guide owner
accessVARCHAR'user' (private) or 'organization' (org-wide)
current_versionUINTEGERLatest version number
created_atTIMESTAMP WITH TIME ZONEWhen the guide was created
updated_atTIMESTAMP WITH TIME ZONEWhen the guide was last updated
versionUINTEGERThe version being read
version_change_commentVARCHARNote for this version
version_external_idVARCHARCaller-provided version ID
version_created_atTIMESTAMP WITH TIME ZONEWhen this version was created
referencesSTRUCT[]Structured references attached to this version. Guide, Dive, and Flight references resolve to guide_id, dive_id, and flight_id UUIDs.
contentVARCHARFull markdown content

Examples

Read the current version of a guide:

SELECT topic, title, content
FROM MD_GET_GUIDE(id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890');

Read version 2 of a guide:

SELECT version, version_change_comment, content
FROM MD_GET_GUIDE(
id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
version = 2
);