datasets
Creates, updates, deletes, gets or lists a datasets resource.
Overview
| Name | datasets |
| Type | Resource |
| Id | datadog.llm_observability.datasets |
Fields
The following fields are returned by SELECT queries:
- list_llmobs_datasets
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier of the dataset. (example: 9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d) |
attributes | object | Attributes of an Agent Observability dataset. |
type | string | Resource type of an Agent Observability dataset. (datasets) (example: datasets) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_llmobs_datasets | select | project_id | filter[name], filter[id], page[cursor], page[limit] | List all Agent Observability datasets for a project, sorted by creation date, newest first. |
create_llmobs_dataset | insert | project_id, data | Create a new Agent Observability dataset within the specified project. | |
update_llmobs_dataset | update | project_id, dataset_id, data | Partially update an existing Agent Observability dataset within the specified project. | |
delete_llmobs_datasets | exec | project_id, data | Delete one or more Agent Observability datasets within the specified project. | |
batch_update_llmobs_dataset | exec | project_id, dataset_id, data | Insert, update, and delete records in a single dataset operation. By default, a new dataset version is created when the batch is applied. | |
clone_llmobs_dataset | exec | project_id, dataset_id, data | Clone a dataset, copying its current records into a new dataset within the same project. | |
restore_llmobs_dataset_version | exec | project_id, dataset_id, data | Restore 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.
| Name | Datatype | Description |
|---|---|---|
dataset_id | string | The ID of the Agent Observability dataset. (example: 9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d) |
project_id | string | The ID of the Agent Observability project. (example: a33671aa-24fd-4dcd-9b33-a8ec7dde7751) |
site | string | The 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] | string | Filter datasets by dataset ID. |
filter[name] | string | Filter datasets by name. |
page[cursor] | string | Use 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_llmobs_datasets
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_llmobs_dataset
- Manifest
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
;
# Description fields are for documentation purposes
- name: datasets
props:
- name: project_id
value: "{{ project_id }}"
description: Required parameter for the datasets resource.
- name: data
description: |
Data object for creating an Agent Observability dataset.
value:
attributes:
description: "{{ description }}"
metadata: "{{ metadata }}"
name: "{{ name }}"
type: "{{ type }}"
UPDATE examples
- update_llmobs_dataset
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_llmobs_datasets
- batch_update_llmobs_dataset
- clone_llmobs_dataset
- restore_llmobs_dataset_version
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 }}"
}'
;
Insert, update, and delete records in a single dataset operation. By default, a new dataset version is created when the batch is applied.
EXEC datadog.llm_observability.datasets.batch_update_llmobs_dataset
@project_id='{{ project_id }}' --required,
@dataset_id='{{ dataset_id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;
Clone a dataset, copying its current records into a new dataset within the same project.
EXEC datadog.llm_observability.datasets.clone_llmobs_dataset
@project_id='{{ project_id }}' --required,
@dataset_id='{{ dataset_id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;
Restore 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.
EXEC datadog.llm_observability.datasets.restore_llmobs_dataset_version
@project_id='{{ project_id }}' --required,
@dataset_id='{{ dataset_id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;