Skip to content

Consolidate DDSQL references #28821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
May 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ content/en/code_analysis/ @Datadog/static-analysis @Data
content/en/quality_gates/ @Datadog/ci-app-backend @Datadog/documentation

# DDSQL Editor References
content/en/ddsql_editor/reference/*.md @Datadog/xpq @Datadog/documentation
content/en/ddsql_reference/*.md @Datadog/xpq @Datadog/documentation

# Data Streams Monitoring
content/en/data_streams/*.md @Datadog/data-streams-monitoring @Datadog/documentation
Expand Down
54 changes: 10 additions & 44 deletions config/_default/menus/main.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1147,12 +1147,18 @@ menu:
identifier: mobile_intune
parent: mobile
weight: 2
- name: DDSQL Reference
url: ddsql_reference/
pre: ddsql
identifier: ddsql_reference
parent: essentials_heading
weight: 110000
- name: CoScreen
url: coscreen/
pre: coscreen
identifier: coscreen
parent: essentials_heading
weight: 110000
weight: 120000
- name: Troubleshooting
url: coscreen/troubleshooting
identifier: coscreen_troubleshooting
Expand All @@ -1163,7 +1169,7 @@ menu:
pre: coscreen
identifier: coterm
parent: essentials_heading
weight: 120000
weight: 130000
- name: Install
url: coterm/install
identifier: coterm_install
Expand Down Expand Up @@ -1574,41 +1580,6 @@ menu:
parent: ddsql_editor
identifier: ddsql_editor_getting_started
weight: 1
- name: Statements
url: ddsql_editor/reference/statements
parent: ddsql_editor
identifier: ddsql_editor_statements
weight: 2
- name: Expressions and Operators
url: ddsql_editor/reference/expressions_and_operators
parent: ddsql_editor
identifier: ddsql_editor_expressions_and_operators
weight: 3
- name: Data Types
url: ddsql_editor/reference/data_types
parent: ddsql_editor
identifier: ddsql_editor_data_types
weight: 4
- name: Functions
url: ddsql_editor/reference/functions
parent: ddsql_editor
identifier: ddsql_editor_functions
weight: 5
- name: Querying Tags
url: ddsql_editor/reference/tags
parent: ddsql_editor
identifier: ddsql_editor_tags
weight: 6
- name: Querying Reference Tables
url: ddsql_editor/reference_tables
parent: ddsql_editor
identifier: ddsql_editor_reference_tables
weight: 7
- name: Guides
url: ddsql_editor/guide
parent: ddsql_editor
identifier: ddsql_editor_guide
weight: 10
- name: Reference Tables
url: reference_tables/
pre: inventories
Expand Down Expand Up @@ -5972,21 +5943,16 @@ menu:
parent: log_management
identifier: logs_workspaces
weight: 6
- name: SQL Reference
url: logs/workspaces/sql_reference/
parent: logs_workspaces
identifier: logs_workspaces_sql_reference
weight: 601
- name: Use Cases
url: logs/workspaces/use_cases/
parent: logs_workspaces
identifier: logs_workspaces_use_cases
weight: 602
weight: 601
- name: Time Selection
url: logs/workspaces/time_selection/
parent: logs_workspaces
identifier: logs_workspaces_time_selection
weight: 603
weight: 602
- name: Error Tracking
url: logs/error_tracking/
parent: log_management
Expand Down
2 changes: 2 additions & 0 deletions config/_default/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ code_language_ids:
ibm: "IBM HTTP Server"
gcp-service-extensions: "GCP Service Extensions"
apigateway: "Amazon API Gateway"
ddsql_preview: "DDSQL (Preview)"
ddsql_default: "DDSQL"
branch: ""

signupclass: sign-up-trigger
Expand Down
21 changes: 8 additions & 13 deletions content/en/ddsql_editor/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
title: DDSQL Editor
aliases:
- /dashboards/ddsql_editor/
- /ddsql_editor/reference/
further_reading:
- link: "/ddsql_editor/reference"
tag: "Documentation"
text: "References for DDSQL Queries"
- link: "/ddsql_editor/guide/ddsql_use_cases"
tag: "Guide"
text: "Common queries and use cases"
- link: "/ddsql_reference/ddsql_preview"
tag: "Documentation"
text: "DDSQL Reference (Preview)"
---


Expand All @@ -33,21 +32,17 @@ Type your question into the search box, and Datadog builds the SQL query for you

DDSQL is a query language for Datadog data. It implements several standard SQL operations, such as `SELECT`, and allows queries against unstructured data, such as [tags][2]. Get exactly the data you want by writing your own `SELECT` statement. Query tags as if they are standard table columns.

<div class="alert alert-warning">
There are two different <strong>variants</strong> of DDSQL. See the syntax documented in <a href="/ddsql_reference/">DDSQL Reference</a>.
</div>

{{< code-block lang="sql" >}}
SELECT instance_type, count(instance_type)
FROM aws_ec2_instance
WHERE env = 'staging' -- env is a tag, not a column
GROUP BY instance_type
{{< /code-block >}}

{{< whatsnext desc="For more information on DDSQL queries, see the DDSQL References:" >}}
{{< nextlink href="ddsql_editor/reference/functions" >}}Functions{{< /nextlink >}}
{{< nextlink href="ddsql_editor/reference/data_types" >}}Data Types{{< /nextlink >}}
{{< nextlink href="ddsql_editor/reference/expressions_and_operators" >}}Expressions and Operators{{< /nextlink >}}
{{< nextlink href="ddsql_editor/reference/statements" >}}Statements{{< /nextlink >}}
{{< nextlink href="ddsql_editor/reference/tags" >}}Tags{{< /nextlink >}}
{{< /whatsnext >}}

### Explore your infrastructure data

View and filter the list of tables and fields in the schema side panel:
Expand Down Expand Up @@ -77,7 +72,7 @@ To access the DDSQL Editor app, users need the `ddsql_editor_read` permission. T
{{< partial name="whats-next/whats-next.html" >}}

[1]: https://app.datadoghq.com/ddsql/editor
[2]: /dashboards/ddsql_editor/reference/tags
[2]: /ddsql_reference/ddsql_preview/tags
[3]: /account_management/rbac/
[4]: /bits_ai
[5]: /help/
2 changes: 1 addition & 1 deletion content/en/ddsql_editor/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ If you forget to save a useful query before navigating away from it, you can sti

[1]: https://app.datadoghq.com/ddsql/editor
[2]: /ddsql_editor/#use-sql-syntax-ddsql
[3]: /ddsql_editor/reference/tags
[3]: /ddsql_reference/ddsql_preview/tags
14 changes: 0 additions & 14 deletions content/en/ddsql_editor/guide/_index.md

This file was deleted.

23 changes: 23 additions & 0 deletions content/en/ddsql_reference/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: DDSQL Reference
type: multi-code-lang
further_reading:
- link: "/ddsql_editor"
tag: "Documentation"
text: "Learn more about the DDSQL Editor"
---

## Supported DDSQL Syntax

DDSQL is a query language for Datadog data. It implements several standard SQL operations, such as `SELECT`, and allows queries against unstructured data, such as [tags][1]. You can perform actions like getting exactly the data you want by writing your own `SELECT` statement, or querying tags as if they are standard table columns.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice description


{{< whatsnext desc="Syntax references:" >}}
{{< nextlink href="/ddsql_reference/ddsql_default" >}}DDSQL{{< /nextlink >}}
{{< nextlink href="/ddsql_reference/ddsql_preview" >}}DDSQL (Preview){{< /nextlink >}}
{{< /whatsnext >}}

## Further reading

{{< partial name="whats-next/whats-next.html" >}}

[1]: /ddsql_reference/ddsql_preview/tags
Loading
Loading