ddsql_queries
Creates, updates, deletes, gets or lists a ddsql_queries resource.
Overview
| Name | ddsql_queries |
| Type | Resource |
| Id | datadog.metrics.ddsql_queries |
Fields
The following fields are returned by SELECT queries:
SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
execute_ddsql_tabular_query | exec | data | Submit a DDSQL statement and return either a running state with an opaque query_id<br />for the client to poll, or a completed state with the column-major result set inlined<br />when the query finishes quickly enough to be served synchronously. | |
fetch_ddsql_tabular_query | exec | data | Poll a previously submitted DDSQL query for results. Pass the opaque query_id returned<br />by a prior ExecuteDdsqlTabularQuery (or by a prior FetchDdsqlTabularQuery that<br />returned state: running) and the server returns either a running state to poll again<br />or a completed state with the column-major result set inlined. |
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 |
|---|---|---|
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. |
Lifecycle Methods
EXEC variables use wire (API) names.
- execute_ddsql_tabular_query
- fetch_ddsql_tabular_query
Submit a DDSQL statement and return either a running state with an opaque query_id<br />for the client to poll, or a completed state with the column-major result set inlined<br />when the query finishes quickly enough to be served synchronously.
EXEC datadog.metrics.ddsql_queries.execute_ddsql_tabular_query
@@json=
'{
"data": "{{ data }}"
}'
;
Poll a previously submitted DDSQL query for results. Pass the opaque query_id returned<br />by a prior ExecuteDdsqlTabularQuery (or by a prior FetchDdsqlTabularQuery that<br />returned state: running) and the server returns either a running state to poll again<br />or a completed state with the column-major result set inlined.
EXEC datadog.metrics.ddsql_queries.fetch_ddsql_tabular_query
@@json=
'{
"data": "{{ data }}"
}'
;