Skip to main content

dataset_records

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

Overview

Namedataset_records
TypeResource
Iddatadog.llm_observability.dataset_records

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringUnique identifier of the record. (example: rec-7c3f5a1b-9e2d-4f8a-b1c6-3d7e9f0a2b4c)
dataset_idstringIdentifier of the dataset this record belongs to. (example: 9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d)
created_atstring (date-time)Timestamp when the record was created. (example: 2024-01-15T10:30:00Z)
expected_outputobject (double)Represents any valid JSON value.
inputobject (double)Represents any valid JSON value.
metadataobjectArbitrary metadata associated with the record.
updated_atstring (date-time)Timestamp when the record was last updated. (example: 2024-01-15T10:30:00Z)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_llmobs_dataset_recordsselectproject_id, dataset_idfilter[version], page[cursor], page[limit]List all records in an Agent Observability dataset, sorted by creation date, newest first.
create_llmobs_dataset_recordsinsertproject_id, dataset_id, dataAppend one or more records to an Agent Observability dataset.
update_llmobs_dataset_recordsupdateproject_id, dataset_id, dataUpdate one or more existing records in an Agent Observability dataset.
delete_llmobs_dataset_recordsexecproject_id, dataset_id, dataDelete one or more records from an Agent Observability dataset.

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[version]integer (int64)Retrieve records from a specific dataset version. Defaults to the current version.
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 records in an Agent Observability dataset, sorted by creation date, newest first.

SELECT
id,
dataset_id,
created_at,
expected_output,
input,
metadata,
updated_at
FROM datadog.llm_observability.dataset_records
WHERE project_id = '{{ project_id }}' -- required
AND dataset_id = '{{ dataset_id }}' -- required
AND filter[version] = '{{ filter[version] }}'
AND page[cursor] = '{{ page[cursor] }}'
AND page[limit] = '{{ page[limit] }}'
;

INSERT examples

Append one or more records to an Agent Observability dataset.

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

UPDATE examples

Update one or more existing records in an Agent Observability dataset.

UPDATE datadog.llm_observability.dataset_records
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 records from an Agent Observability dataset.

EXEC datadog.llm_observability.dataset_records.delete_llmobs_dataset_records
@project_id='{{ project_id }}' --required,
@dataset_id='{{ dataset_id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;