Do AI Agents Need a Semantic Layer?Livestream August 26

Skip to main content

MD_UPDATE_GUIDE

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

Append a version to an existing Guide, identified by ID. Omit content to update only metadata such as references without changing the text.

Syntax

SELECT * FROM MD_UPDATE_GUIDE(
id = '<guide_uuid>',
content = '# Updated content...',
change_comment = 'Clarify trial subscription exclusion'
);

Parameters

ParameterTypeRequiredDescription
idUUIDYesThe Guide's UUID.
contentVARCHARNoNew full markdown body. Omit to carry the current version's content forward.
change_commentVARCHARNoNote describing this version's change.
external_idVARCHARNoCaller-provided ID for this version (for example a git SHA).
"references"STRUCT[]NoReplaces the Guide's references. Pass an empty list ([]) to clear references; omit to carry them forward. See reference struct.

Return columns

Same as MD_CREATE_GUIDE.

Examples

Update the full content of a Guide:

SELECT id, current_version
FROM MD_UPDATE_GUIDE(
id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
content = '# MRR and ARR Definitions (Updated) ...',
change_comment = 'Add ARR calculation section'
);

Add references without changing content:

SELECT current_version
FROM MD_UPDATE_GUIDE(
id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
"references" = [
{
'type': 'catalog',
'url': 'md:billing',
'schema': 'main',
'table': 'subscriptions'
}
]
);

Clear all references:

SELECT current_version
FROM MD_UPDATE_GUIDE(
id = 'a1b2c3d4-e5f6-7890-abcd-ef1234567890',
"references" = []
);