Skip to main content

reference_table_rows

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

Overview

Namereference_table_rows
TypeResource
Iddatadog.integrations.reference_table_rows

Fields

The following fields are returned by SELECT queries:

Some or all requested rows were found.

NameDatatypeDescription
idstringRow identifier, corresponding to the primary key value.
attributesobjectColumn values for this row in the reference table.
typestringRow resource type. (row) (default: row, example: row)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_rows_by_idselectid, row_idGet reference table rows by their primary key values.
list_reference_table_rowsselectidpage[limit], page[continuation_token]List all rows in a reference table using cursor-based pagination. Pass the page[continuation_token] from the previous response to fetch the next page on the same consistent snapshot. Returns 400 for tables with more than 10,000,000 rows.
delete_rowsdeleteidDelete multiple rows from a Reference Table by their primary key values.
batch_rows_queryexecBatch query reference table rows by their primary key values. Returns only found rows in the included array.
upsert_rowsexecid, dataCreate or update rows in a Reference Table by their primary key values. If a row with the specified primary key exists, it is updated; otherwise, a new row is created.

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
idstringUnique identifier of the reference table to upsert rows into
row_idarrayList of row IDs (primary key values) to retrieve from the reference table. (example: [row1, row2])
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.
page[continuation_token]stringOpaque cursor from the previous response's next link. Pass this to retrieve the next page on the same consistent snapshot. (example: eyJzaWQiOjEyMzQ1LCJwayI6ImV4YW1wbGVfcGsifQ==)
page[limit]integer (int64)Number of rows to return per page. Defaults to 100, maximum is 1000. (example: 100)

SELECT examples

Get reference table rows by their primary key values.

SELECT
id,
attributes,
type
FROM datadog.integrations.reference_table_rows
WHERE id = '{{ id }}' -- required
AND row_id = '{{ row_id }}' -- required
;

DELETE examples

Delete multiple rows from a Reference Table by their primary key values.

DELETE FROM datadog.integrations.reference_table_rows
WHERE id = '{{ id }}' --required
;

Lifecycle Methods

EXEC variables use wire (API) names.

Batch query reference table rows by their primary key values. Returns only found rows in the included array.

EXEC datadog.integrations.reference_table_rows.batch_rows_query
@@json=
'{
"data": "{{ data }}"
}'
;