Building a Data Stack Live with AI AgentsLivestream August 18

Skip to main content

MD_UPDATE_DIVE_METADATA

Updates the title, description, or both of an existing Dive. Metadata updates do not create a new version — current_version is unchanged. To publish new component code, use MD_UPDATE_DIVE_CONTENT.

Syntax

SELECT * FROM MD_UPDATE_DIVE_METADATA(
id := '<dive_id>',
title := '<updated_title>',
description := '<updated_description>'
);

Parameters

ParameterTypeRequiredDescription
idUUIDYesIdentifier of the Dive to update.
titleVARCHARNoNew Dive title. Omit to leave unchanged.
descriptionVARCHARNoNew Dive description. Omit to leave unchanged.

Return columns

Returns the updated Dive summary:

ColumnTypeDescription
idUUIDThe Dive identifier.
titleVARCHARThe current title.
descriptionVARCHARThe current description, or NULL.
owner_idUUIDIdentifier of the owning user.
current_versionINTEGERLatest version number (unchanged by this call).
created_atTIMESTAMP WITH TIME ZONEOriginal creation timestamp.
updated_atTIMESTAMP WITH TIME ZONEMost recent update timestamp.
owner_nameVARCHARUsername of the owner.

Examples

Rename a Dive:

SELECT id, title, current_version
FROM MD_UPDATE_DIVE_METADATA(
id := '<dive_id>',
title := 'Q1 revenue dashboard'
);

Update only the description:

SELECT id, description
FROM MD_UPDATE_DIVE_METADATA(
id := '<dive_id>',
description := 'Revenue trends filtered to Q1'
);