dataset_records
Creates, updates, deletes, gets or lists a dataset_records resource.
Overview
| Name | dataset_records |
| Type | Resource |
| Id | datadog.llm_observability.dataset_records |
Fields
The following fields are returned by SELECT queries:
- list_llmobs_dataset_records
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier of the record. (example: rec-7c3f5a1b-9e2d-4f8a-b1c6-3d7e9f0a2b4c) |
dataset_id | string | Identifier of the dataset this record belongs to. (example: 9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d) |
created_at | string (date-time) | Timestamp when the record was created. (example: 2024-01-15T10:30:00Z) |
expected_output | object (double) | Represents any valid JSON value. |
input | object (double) | Represents any valid JSON value. |
metadata | object | Arbitrary metadata associated with the record. |
updated_at | string (date-time) | Timestamp when the record was last updated. (example: 2024-01-15T10:30:00Z) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_llmobs_dataset_records | select | project_id, dataset_id | filter[version], page[cursor], page[limit] | List all records in an Agent Observability dataset, sorted by creation date, newest first. |
create_llmobs_dataset_records | insert | project_id, dataset_id, data | Append one or more records to an Agent Observability dataset. | |
update_llmobs_dataset_records | update | project_id, dataset_id, data | Update one or more existing records in an Agent Observability dataset. | |
delete_llmobs_dataset_records | exec | project_id, dataset_id, data | Delete 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.
| 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[version] | integer (int64) | Retrieve records from a specific dataset version. Defaults to the current version. |
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_dataset_records
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
- create_llmobs_dataset_records
- Manifest
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
;
# Description fields are for documentation purposes
- name: dataset_records
props:
- name: project_id
value: "{{ project_id }}"
description: Required parameter for the dataset_records resource.
- name: dataset_id
value: "{{ dataset_id }}"
description: Required parameter for the dataset_records resource.
- name: data
description: |
Data object for appending records to an Agent Observability dataset.
value:
attributes:
deduplicate: {{ deduplicate }}
records:
- expected_output: "{{ expected_output }}"
input: "{{ input }}"
metadata: "{{ metadata }}"
type: "{{ type }}"
UPDATE examples
- update_llmobs_dataset_records
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_llmobs_dataset_records
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 }}"
}'
;