Skip to main content

dataset_draft_states

Creates, updates, deletes, gets or lists a dataset_draft_states resource.

Overview

Namedataset_draft_states
TypeResource
Iddatadog.llm_observability.dataset_draft_states

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringUnique identifier of the dataset draft state. Matches the dataset ID. (example: 9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d)
attributesobjectAttributes of an Agent Observability dataset draft state.
typestringResource type of an Agent Observability dataset draft state. (draft_state_data) (example: draft_state_data)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_llmobs_dataset_draft_stateselectproject_id, dataset_idRetrieve the draft state of a dataset, including whether it is currently locked for editing and which user holds the lock.
lock_llmobs_dataset_draft_stateexecproject_id, dataset_idAcquire the draft lock on a dataset for the calling user. The lock prevents other users from concurrently editing the dataset draft.
unlock_llmobs_dataset_draft_stateexecproject_id, dataset_idRelease the draft lock on a dataset held by the calling user, allowing other users to edit the dataset draft.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
dataset_idstringThe ID of the Agent Observability dataset. (example: 9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d)
project_idstringThe ID of the Agent Observability project. (example: a33671aa-24fd-4dcd-9b33-a8ec7dde7751)
sitestringThe Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both.

SELECT examples

Retrieve the draft state of a dataset, including whether it is currently locked for editing and which user holds the lock.

SELECT
id,
attributes,
type
FROM datadog.llm_observability.dataset_draft_states
WHERE project_id = '{{ project_id }}' -- required
AND dataset_id = '{{ dataset_id }}' -- required
;

Lifecycle Methods

EXEC variables use wire (API) names.

Acquire the draft lock on a dataset for the calling user. The lock prevents other users from concurrently editing the dataset draft.

EXEC datadog.llm_observability.dataset_draft_states.lock_llmobs_dataset_draft_state
@project_id='{{ project_id }}' --required,
@dataset_id='{{ dataset_id }}' --required
;