Subchapter 23.6
references/querying-data/getting-started.mdMarkdown6 KBView on GitHub
Use this first when a Datadog App needs to read, transform, or mutate data and the right backend data access pattern is not yet clear.
Datadog Apps backend functions commonly use two data access paths:
Public docs:
@datadog/action-catalog npm package (opens in a new tab)Use this root file only when the right data access path is not clear. Source-specific details for Action Catalog connections and Datadog App datastores are outside this overview and are routed directly from SKILL.md.
| Question | Next step |
|---|---|
| Is this a read from DDSQL-visible data? | Continue to the DDSQL section below. |
| Is this a mutation or integration workflow? | Continue to the Action Catalog section below. |
DDSQL can read Datadog data exposed through documented datasets and table functions. Check the DDSQL Data Directory and schema tooling before writing queries.
For reads, check DDSQL first. If the data is exposed in the DDSQL Data Directory, through a DDSQL table function, or through a verified app datastore or Reference Table path, DDSQL usually gives the app more control and smaller responses than broad product-specific list actions.
Prefer DDSQL when the app needs:
DDSQL-visible Datadog product datasets include, but are not limited to:
Before writing DDSQL, identify:
reference_tables.<table_name>.If these are unknown, inspect more or ask the user instead of guessing schemas from memory.
Use discovery tooling before writing app code:
DD_API_KEY and DD_APP_KEY. Normal scaffolded local app development uses OAuth by default.Do not rely on guessed table names, guessed columns, or information_schema. Treat a bounded preview query as the final proof that the table path, schema, access, and syntax work in the target org/site.
Backend DDSQL should use fixed SQL templates, allowlisted frontend inputs, clamped limits, escaped literals or supported parameterization, and display-ready response rows. Verify the exact DDSQL execution API or action import against the generated app project’s AGENTS.md and installed packages before writing app code.
Backend functions can call Action Catalog actions through @datadog/action-catalog. The catalog provides reusable, typed actions for Datadog APIs, infrastructure providers, SaaS tools, generic HTTP, and other integrations, so app code does not need to hand-roll API clients for supported workflows.
Use Action Catalog actions for:
Prefer DDSQL for read-heavy paths when the same data is DDSQL-visible and the app needs projection, filtering, joins, aggregation, ordering, or pagination.
For exact Action Catalog imports, file layout, and app-code patterns, rely on the generated app scaffold’s AGENTS.md and installed package APIs. This skill should explain the Datadog product model and decision tree, not own app implementation structure.
ORDER BY, or unbounded limits.