diff --git a/config/_default/menus/main.en.yaml b/config/_default/menus/main.en.yaml
index af54d3853bf78..b8fb9709dabc9 100644
--- a/config/_default/menus/main.en.yaml
+++ b/config/_default/menus/main.en.yaml
@@ -1147,7 +1147,7 @@ menu:
pre: cloudcraft
identifier: cloudcraft
parent: essentials_heading
- weight: 270000
+ weight: 130000
- name: Getting Started
url: cloudcraft/getting-started/
identifier: cloudcraft_getting_started
@@ -1318,6 +1318,12 @@ menu:
identifier: cloudcraft_api_users_info
parent: cloudcraft_api_users
weight: 1
+ - name: DDSQL Reference
+ url: ddsql_reference/
+ pre: ddsql
+ identifier: ddsql_reference
+ parent: essentials_heading
+ weight: 140000
- name: Watchdog
url: watchdog/
identifier: watchdog_top_level
@@ -1537,36 +1543,16 @@ 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
+ url: ddsql_editor/tags
parent: ddsql_editor
identifier: ddsql_editor_tags
- weight: 6
+ weight: 2
- name: Querying Reference Tables
url: ddsql_editor/reference_tables
parent: ddsql_editor
identifier: ddsql_editor_reference_tables
- weight: 7
+ weight: 3
- name: Guides
url: ddsql_editor/guide
parent: ddsql_editor
@@ -5875,21 +5861,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
diff --git a/config/_default/params.yaml b/config/_default/params.yaml
index 9d6542e9fe513..0a8c541a45bd2 100644
--- a/config/_default/params.yaml
+++ b/config/_default/params.yaml
@@ -130,6 +130,8 @@ code_language_ids:
apache: "Apache HTTP Server"
ibm: "IBM HTTP Server"
gcp-service-extensions: "GCP Service Extensions"
+ ddsql_editor_syntax: "DDSQL Editor Syntax (Preview)"
+ ddsql_default: "DDSQL"
branch: ""
signupclass: sign-up-trigger
diff --git a/content/en/ddsql_editor/_index.md b/content/en/ddsql_editor/_index.md
index 12125a1942db1..5fdb86591723f 100644
--- a/content/en/ddsql_editor/_index.md
+++ b/content/en/ddsql_editor/_index.md
@@ -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_editor_syntax"
+ tag: "Documentation"
+ text: "DDSQL Editor Syntax (Preview)"
---
@@ -33,6 +32,10 @@ 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.
+
+
{{< code-block lang="sql" >}}
SELECT instance_type, count(instance_type)
FROM aws_ec2_instance
@@ -40,14 +43,6 @@ 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:
@@ -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_editor/tags
[3]: /account_management/rbac/
[4]: /bits_ai
[5]: /help/
diff --git a/content/en/ddsql_editor/getting_started.md b/content/en/ddsql_editor/getting_started.md
index c55e32b38dada..ff1d0f529d268 100644
--- a/content/en/ddsql_editor/getting_started.md
+++ b/content/en/ddsql_editor/getting_started.md
@@ -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_editor/tags
diff --git a/content/en/ddsql_editor/reference_tables.md b/content/en/ddsql_editor/reference_tables.md
index b8ed4d54f62d1..f7edfe446543a 100644
--- a/content/en/ddsql_editor/reference_tables.md
+++ b/content/en/ddsql_editor/reference_tables.md
@@ -4,8 +4,19 @@ further_reading:
- link: "/integrations/guide/reference-tables/"
tag: "Documentation"
text: "Add Custom Metadata with Reference Tables"
+- link: "/ddsql_reference/ddsql_editor_syntax"
+ tag: "Documentation"
+ text: "DDSQL Editor Syntax (Preview)"
---
+{{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}}
+The DDSQL Editor is in Preview.
+{{< /callout >}}
+
+
+
# Overview
Reference Tables allow you to combine metadata with information already in Datadog. These tables store predefined sets of information that can be easily referenced within your queries, reducing complexity and enhancing query performance. With DDSQL you can query and join reference tables with other tables to expand your analytical insights.
diff --git a/content/en/ddsql_editor/reference/tags.md b/content/en/ddsql_editor/tags.md
similarity index 86%
rename from content/en/ddsql_editor/reference/tags.md
rename to content/en/ddsql_editor/tags.md
index ebd8f7a4fc1fc..cc47943b366dd 100644
--- a/content/en/ddsql_editor/reference/tags.md
+++ b/content/en/ddsql_editor/tags.md
@@ -2,12 +2,21 @@
title: Querying Tags in DDSQL
aliases:
- /dashboards/ddsql_editor/reference/tags/
+- /ddsql_editor/reference/tags/
+further_reading:
+- link: "/ddsql_reference/ddsql_editor_syntax"
+ tag: "Documentation"
+ text: "DDSQL Editor Syntax (Preview)"
---
{{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}}
-DDSQL is in Preview.
+The DDSQL Editor is in Preview.
{{< /callout >}}
+
+
Tags are a widespread mechanism to encode metadata about a particular record across several products at Datadog. Tags are key-value pairs for which a key may contain multiple values.
Tags are modeled in DDSQL with the key as a column name, and values in a `group` type, a sorted set of strings with tag-like "= is contains" semantics.
@@ -66,3 +75,7 @@ SELECT #service FROM resources.host
The tag's name in the projection is `#service`, which should be used throughout the query, as `service` refers to the schema column.
For tag references that require quoting, the `#` should appear outside of quotes (for example, `#"availability-zone"`). This is necessary to differentiate between explicit tag references and columns that start with a `#` character.
+
+## Further reading
+
+{{< partial name="whats-next/whats-next.html" >}}
\ No newline at end of file
diff --git a/content/en/ddsql_reference/_index.md b/content/en/ddsql_reference/_index.md
new file mode 100644
index 0000000000000..edc0d7b752de1
--- /dev/null
+++ b/content/en/ddsql_reference/_index.md
@@ -0,0 +1,28 @@
+---
+title: DDSQL Reference
+type: multi-code-lang
+external_redirect: /ddsql_reference/ddsql_default
+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]. Get exactly the data you want by writing your own `SELECT` statement. Query tags as if they are standard table columns.
+
+
+
+{{< whatsnext desc="Syntax references:" >}}
+ {{< nextlink href="/ddsql_reference/ddsql_default" >}}DDSQL{{< /nextlink >}}
+ {{< nextlink href="/ddsql_reference/ddsql_editor_syntax" >}}DDSQL Editor Syntax (Preview){{< /nextlink >}}
+{{< /whatsnext >}}
+
+## Further reading
+
+{{< partial name="whats-next/whats-next.html" >}}
+
+[1]: /ddsql_editor/tags
diff --git a/content/en/logs/workspaces/sql_reference.md b/content/en/ddsql_reference/ddsql_default.md
similarity index 88%
rename from content/en/logs/workspaces/sql_reference.md
rename to content/en/ddsql_reference/ddsql_default.md
index b3bc644f10439..f9a1f80e987dc 100644
--- a/content/en/logs/workspaces/sql_reference.md
+++ b/content/en/ddsql_reference/ddsql_default.md
@@ -1,14 +1,29 @@
---
-title: SQL Reference
+title: DDSQL
+aliases:
+- /logs/workspaces/sql_reference
+code_lang: ddsql_default
+type: multi-code-lang
+code_lang_weight: 1
+products:
+- name: Log Workspaces
+ url: /logs/workspaces/
+ icon: logs
further_reading:
- link: "/logs/workspaces/"
tag: "Documentation"
text: "Learn more about Log Workspaces"
---
+{{< product-availability >}}
+
+
+
## Overview
-SQL in [Analysis cells][1] allows you to analyze and manipulate data within Log Workspaces. This documentation covers the SQL support available in Log Workspaces and includes:
+SQL in [Analysis cells][1] allows you to analyze and manipulate data. This documentation covers the SQL support available and includes:
- [Syntax compatible with PostgreSQL](#syntax)
- [SQL functions](#functions)
- [Window functions](#window-functions)
@@ -217,7 +232,7 @@ SELECT
### `TRIM`
{{< code-block lang="sql" >}}
SELECT
- TRIM(name) AS trimmed_name
+ trim(name) AS trimmed_name
FROM
users
{{< /code-block >}}
@@ -225,7 +240,7 @@ FROM
### `REPLACE`
{{< code-block lang="sql" >}}
SELECT
- REPLACE(description, 'old', 'new') AS updated_description
+ replace(description, 'old', 'new') AS updated_description
FROM
products
{{< /code-block >}}
@@ -233,7 +248,7 @@ FROM
### `SUBSTRING`
{{< code-block lang="sql" >}}
SELECT
- SUBSTRING(title, 1, 10) AS short_title
+ substring(title, 1, 10) AS short_title
FROM
books
{{< /code-block >}}
@@ -270,7 +285,7 @@ Supported extraction units:
{{< code-block lang="sql" >}}
SELECT
- EXTRACT(year FROM purchase_date) AS purchase_year
+ extract(year FROM purchase_date) AS purchase_year
FROM
sales
{{< /code-block >}}
@@ -297,7 +312,7 @@ Supported patterns for date/time formatting:
{{< code-block lang="sql" >}}
SELECT
- TO_TIMESTAMP('25/12/2025 04:23 pm', 'DD/MM/YYYY HH:MI am') AS ts
+ to_timestamp('25/12/2025 04:23 pm', 'DD/MM/YYYY HH:MI am') AS ts
{{< /code-block >}}
### `TO_CHAR`
@@ -322,7 +337,7 @@ Supported patterns for date/time formatting:
{{< code-block lang="sql" >}}
SELECT
- TO_CHAR(order_date, 'MM-DD-YYYY') AS formatted_date
+ to_char(order_date, 'MM-DD-YYYY') AS formatted_date
FROM
orders
{{< /code-block >}}
@@ -342,7 +357,7 @@ Supported truncations:
{{< code-block lang="sql" >}}
SELECT
- DATE_TRUNC('month', event_time) AS month_start
+ date_trunc('month', event_time) AS month_start
FROM
events
{{< /code-block >}}
@@ -354,7 +369,7 @@ SELECT
FROM
emails
WHERE
- REGEXP_LIKE(email_address, '@example\.com$')
+ regexp_like(email_address, '@example\.com$')
{{< /code-block >}}
### `CARDINALITY`
@@ -406,19 +421,19 @@ FROM
## Window functions
-This table provides an overview of the supprted window functions. For comprehensive details and examples, see to the [PostgreSQL documentation][2].
-
-| Function | Return Type | Description |
-|-------------------------------|-------------------|------------------------------------------------------------------------|
-| `over` | N/A | Defines a window for a set of rows for other window functions to operate on. |
-| `partition by` | N/A | Divides the result set into partitions, specifically for applying window functions. |
-| `rank()` | integer | Assigns a rank to each row within a partition, with gaps for ties. |
-| `row_number()` | integer | Assigns a unique sequential number to each row within a partition. |
-| `lead(column n)` | typeof column | Returns the value from the next row in the partition. |
-| `lag(column n)` | typeof column | Returns the value from the previous row in the partition. |
-| `first_value(column n)` | typeof column | Returns the first value in an ordered set of values. |
-| `last_value(column n)` | typeof column | Returns the last value in an ordered set of values. |
-| `nth_value(column n, offset)` | typeof column | Returns the value at the specified offset in an ordered set of values. |
+This table provides an overview of the supprted window functions. For comprehensive details and examples, see the [PostgreSQL documentation][2].
+
+| Function | Return Type | Description |
+|-------------------------|-------------------|------------------------------------------------------------------------|
+| `OVER` | N/A | Defines a window for a set of rows for other window functions to operate on. |
+| `PARTITION BY` | N/A | Divides the result set into partitions, specifically for applying window functions. |
+| `RANK()` | integer | Assigns a rank to each row within a partition, with gaps for ties. |
+| `ROW_NUMBER()` | integer | Assigns a unique sequential number to each row within a partition. |
+| `LEAD(column n)` | typeof column | Returns the value from the next row in the partition. |
+| `LAG(column n)` | typeof column | Returns the value from the previous row in the partition. |
+| `FIRST_VALUE(column n)` | typeof column | Returns the first value in an ordered set of values. |
+| `LAST_VALUE(column n)` | typeof column | Returns the last value in an ordered set of values. |
+| `NTH_VALUE(column n, offset)`| typeof column | Returns the value at the specified offset in an ordered set of values. |
## Further reading
diff --git a/content/en/ddsql_reference/ddsql_editor_syntax.md b/content/en/ddsql_reference/ddsql_editor_syntax.md
new file mode 100644
index 0000000000000..e23dffb1283f6
--- /dev/null
+++ b/content/en/ddsql_reference/ddsql_editor_syntax.md
@@ -0,0 +1,25 @@
+---
+title: DDSQL Editor Syntax (Preview)
+code_lang: ddsql_editor_syntax
+type: multi-code-lang
+code_lang_weight: 2
+further_reading:
+- link: "/ddsql_editor/"
+ tag: "Documentation"
+ text: "Learn more about the DDSQL Editor"
+---
+
+{{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}}
+DDSQL Editor is in Preview.
+{{< /callout >}}
+
+{{< whatsnext desc="For more information on DDSQL queries, see the DDSQL References:" >}}
+ {{< nextlink href="ddsql_reference/ddsql_editor_syntax/functions" >}}Functions{{< /nextlink >}}
+ {{< nextlink href="ddsql_reference/ddsql_editor_syntax/data_types" >}}Data Types{{< /nextlink >}}
+ {{< nextlink href="ddsql_reference/ddsql_editor_syntax/expressions_and_operators" >}}Expressions and Operators{{< /nextlink >}}
+ {{< nextlink href="ddsql_reference/ddsql_editor_syntax/statements" >}}Statements{{< /nextlink >}}
+{{< /whatsnext >}}
+
+## Further reading
+
+{{< partial name="whats-next/whats-next.html" >}}
diff --git a/content/en/ddsql_editor/reference/data_types.md b/content/en/ddsql_reference/ddsql_editor_syntax/data_types.md
similarity index 93%
rename from content/en/ddsql_editor/reference/data_types.md
rename to content/en/ddsql_reference/ddsql_editor_syntax/data_types.md
index 8ad75d6fc120f..4222a4973d393 100644
--- a/content/en/ddsql_editor/reference/data_types.md
+++ b/content/en/ddsql_reference/ddsql_editor_syntax/data_types.md
@@ -1,13 +1,10 @@
---
-title: DDSQL Data Types
+title: DDSQL Editor Data Types (Preview)
aliases:
- /dashboards/ddsql_editor/reference/data_types/
+- /ddsql_editor/reference/data_types/
---
-{{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}}
-DDSQL is in Preview.
-{{< /callout >}}
-
## Data types
DDSQL implements a simplified version of the SQL type system that is mostly descended from PostgreSQL.
diff --git a/content/en/ddsql_editor/reference/expressions_and_operators.md b/content/en/ddsql_reference/ddsql_editor_syntax/expressions_and_operators.md
similarity index 97%
rename from content/en/ddsql_editor/reference/expressions_and_operators.md
rename to content/en/ddsql_reference/ddsql_editor_syntax/expressions_and_operators.md
index 2d5045aaa3d9f..96f3248ccfe4b 100644
--- a/content/en/ddsql_editor/reference/expressions_and_operators.md
+++ b/content/en/ddsql_reference/ddsql_editor_syntax/expressions_and_operators.md
@@ -1,13 +1,10 @@
---
-title: DDSQL Expressions and Operators
+title: DDSQL Editor Expressions and Operators (Preview)
aliases:
- /dashboards/ddsql_editor/reference/expressions_and_operators/
+- /ddsql_editor/reference/expressions_and_operators/
---
-{{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}}
-DDSQL is in Preview.
-{{< /callout >}}
-
*Value expressions* are the general expression language used to produce values for conditions, `SELECT` expressions, filters, and clauses like `WHERE`, `ORDER BY`, and `GROUP BY`. The expression syntax of DDSQL is a superset of SQL expression syntax.
## Arithmetic operators
diff --git a/content/en/ddsql_editor/reference/functions.md b/content/en/ddsql_reference/ddsql_editor_syntax/functions.md
similarity index 98%
rename from content/en/ddsql_editor/reference/functions.md
rename to content/en/ddsql_reference/ddsql_editor_syntax/functions.md
index abcd73995d832..2500c44822d18 100644
--- a/content/en/ddsql_editor/reference/functions.md
+++ b/content/en/ddsql_reference/ddsql_editor_syntax/functions.md
@@ -1,16 +1,13 @@
---
-title: DDSQL Functions
+title: DDSQL Editor Functions (Preview)
aliases:
- /dashboards/ddsql_editor/reference/aggregation_functions
- /dashboards/ddsql_editor/reference/scalar_functions/
- /ddsql_editor/reference/scalar_functions
- /ddsql_editor/reference/aggregation_functions
+- /ddsql_editor/reference/functions
---
-{{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}}
-DDSQL is in Preview.
-{{< /callout >}}
-
## Aggregation functions
Aggregate functions compute a single result from a set of input values, usually used in conjunction with a `GROUP BY` statement.
diff --git a/content/en/ddsql_editor/reference/statements.md b/content/en/ddsql_reference/ddsql_editor_syntax/statements.md
similarity index 98%
rename from content/en/ddsql_editor/reference/statements.md
rename to content/en/ddsql_reference/ddsql_editor_syntax/statements.md
index b02c18368eb7b..2c09219034416 100644
--- a/content/en/ddsql_editor/reference/statements.md
+++ b/content/en/ddsql_reference/ddsql_editor_syntax/statements.md
@@ -1,13 +1,10 @@
---
-title: DDSQL Statements
+title: DDSQL Editor Statements (Preview)
aliases:
- /dashboards/ddsql_editor/reference/statements/
+- /ddsql_editor/reference/statements/
---
-{{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}}
-DDSQL is in Preview.
-{{< /callout >}}
-
## SELECT
`SELECT` retrieves rows from a table or view.
diff --git a/content/en/ddsql_editor/reference/window_functions.md b/content/en/ddsql_reference/ddsql_editor_syntax/window_functions.md
similarity index 94%
rename from content/en/ddsql_editor/reference/window_functions.md
rename to content/en/ddsql_reference/ddsql_editor_syntax/window_functions.md
index 3e2a1616db41f..37a2a11a1578b 100644
--- a/content/en/ddsql_editor/reference/window_functions.md
+++ b/content/en/ddsql_reference/ddsql_editor_syntax/window_functions.md
@@ -1,12 +1,13 @@
---
-title: DDSQL Window Functions
+title: DDSQL Editor Window Functions (Preview)
private: true
aliases:
- /dashboards/ddsql_editor/reference/window_functions/
+- /ddsql_editor/reference/window_functions/
---
{{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}}
-DDSQL is in Preview.
+DDSQL for the DDSQL Editor is in Preview.
{{< /callout >}}
## Overview
diff --git a/content/en/logs/workspaces/_index.md b/content/en/logs/workspaces/_index.md
index bf7e783edf9dd..9acc4d6e579be 100644
--- a/content/en/logs/workspaces/_index.md
+++ b/content/en/logs/workspaces/_index.md
@@ -60,7 +60,7 @@ You can also create Calculated Fields directly within a Workspace to define a co
## Analyze, transform, and visualize your logs
You can add the following cells to:
- Include additional data sources such as reference tables
-- Use SQL to join data
+- Use [DDSQL][5] to join data
- Transform, correlate, and visualize the data
Cells that depend on other cells are automatically updated when one of the cells it depends on is changed.
@@ -256,3 +256,4 @@ Finally, a treemap visualization cell is created with the `transaction_record_wi
[2]: https://app.datadoghq.com/logs
[3]: /logs/log_configuration/parsing/
[4]: /logs/explorer/calculated_fields/
+[5]: /ddsql_reference/
\ No newline at end of file