Skip to main content

datasets

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

Overview​

Namedatasets
TypeResource
Iddatadog.llm_observability.datasets

Fields​

The following fields are returned by SELECT queries:

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

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_llmobs_datasetsselectproject_idfilter[name], filter[id], page[cursor], page[limit]List all Agent Observability datasets for a project, sorted by creation date, newest first.
create_llmobs_datasetinsertproject_id, dataCreate a new Agent Observability dataset within the specified project.
update_llmobs_datasetupdateproject_id, dataset_id, dataPartially update an existing Agent Observability dataset within the specified project.
delete_llmobs_datasetsexecproject_id, dataDelete one or more Agent Observability datasets within the specified project.
batch_update_llmobs_datasetexecproject_id, dataset_id, dataInsert, update, and delete records in a single dataset operation. By default, a new dataset version is created when the batch is applied.
clone_llmobs_datasetexecproject_id, dataset_id, dataClone a dataset, copying its current records into a new dataset within the same project.
restore_llmobs_dataset_versionexecproject_id, dataset_id, dataRestore a dataset to a previous version. The dataset's current version is bumped, and its records are replaced with the records from the specified prior version.

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.
filter[id]stringFilter datasets by dataset ID.
filter[name]stringFilter datasets by name.
page[cursor]stringUse the Pagination cursor to retrieve the next page of results.
page[limit]integer (int64)Maximum number of results to return per page.

SELECT examples​

List all Agent Observability datasets for a project, sorted by creation date, newest first.

SELECT
id,
attributes,
type
FROM datadog.llm_observability.datasets
WHERE project_id = '{{ project_id }}' -- required
AND filter[name] = '{{ filter[name] }}'
AND filter[id] = '{{ filter[id] }}'
AND page[cursor] = '{{ page[cursor] }}'
AND page[limit] = '{{ page[limit] }}'
;

INSERT examples​

Create a new Agent Observability dataset within the specified project.

INSERT INTO datadog.llm_observability.datasets (
data,
project_id
)
SELECT
'{{ data }}' /* required */,
'{{ project_id }}'
RETURNING
data
;

UPDATE examples​

Partially update an existing Agent Observability dataset within the specified project.

UPDATE datadog.llm_observability.datasets
SET
data = '{{ data }}'
WHERE
project_id = '{{ project_id }}' --required
AND dataset_id = '{{ dataset_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;

Lifecycle Methods​

EXEC variables use wire (API) names.

Delete one or more Agent Observability datasets within the specified project.

EXEC datadog.llm_observability.datasets.delete_llmobs_datasets
@project_id='{{ project_id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;