reference_table_rows
Creates, updates, deletes, gets or lists a reference_table_rows resource.
Overview
| Name | reference_table_rows |
| Type | Resource |
| Id | datadog.integrations.reference_table_rows |
Fields
The following fields are returned by SELECT queries:
- get_rows_by_id
- list_reference_table_rows
Some or all requested rows were found.
| Name | Datatype | Description |
|---|---|---|
id | string | Row identifier, corresponding to the primary key value. |
attributes | object | Column values for this row in the reference table. |
type | string | Row resource type. (row) (default: row, example: row) |
| Name | Datatype | Description |
|---|---|---|
id | string | Row identifier, corresponding to the primary key value. |
attributes | object | Column values for this row in the reference table. |
type | string | Row resource type. (row) (default: row, example: row) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_rows_by_id | select | id, row_id | Get reference table rows by their primary key values. | |
list_reference_table_rows | select | id | page[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_rows | delete | id | Delete multiple rows from a Reference Table by their primary key values. | |
batch_rows_query | exec | Batch query reference table rows by their primary key values. Returns only found rows in the included array. | ||
upsert_rows | exec | id, data | Create 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.
| Name | Datatype | Description |
|---|---|---|
id | string | Unique identifier of the reference table to upsert rows into |
row_id | array | List of row IDs (primary key values) to retrieve from the reference table. (example: [row1, row2]) |
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. |
page[continuation_token] | string | Opaque 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_rows_by_id
- list_reference_table_rows
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
;
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.
SELECT
id,
attributes,
type
FROM datadog.integrations.reference_table_rows
WHERE id = '{{ id }}' -- required
AND page[limit] = '{{ page[limit] }}'
AND page[continuation_token] = '{{ page[continuation_token] }}'
;
DELETE examples
- delete_rows
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_rows_query
- upsert_rows
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 }}"
}'
;
Create 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.
EXEC datadog.integrations.reference_table_rows.upsert_rows
@id='{{ id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;