From de5506a0bdf033f841ca9c444d1ce7d3a9acbb92 Mon Sep 17 00:00:00 2001 From: Esther Kim Date: Fri, 11 Apr 2025 08:51:23 -0400 Subject: [PATCH 1/6] Move DDSQL syntax guides to Essentials --- config/_default/menus/main.en.yaml | 8 +++++++- content/ddsql/_index.md | 11 +++++++++++ content/ddsql/v0.md | 0 content/ddsql/v1.md | 0 4 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 content/ddsql/_index.md create mode 100644 content/ddsql/v0.md create mode 100644 content/ddsql/v1.md diff --git a/config/_default/menus/main.en.yaml b/config/_default/menus/main.en.yaml index af54d3853bf78..ecc9846e53394 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 + url: ddsql/ + pre: ddsql + identifier: ddsql + parent: essentials_heading + weight: 140000 - name: Watchdog url: watchdog/ identifier: watchdog_top_level diff --git a/content/ddsql/_index.md b/content/ddsql/_index.md new file mode 100644 index 0000000000000..83b3b0b811d6e --- /dev/null +++ b/content/ddsql/_index.md @@ -0,0 +1,11 @@ +--- +title: DDSQL Reference +further_reading: +- link: "logs/processing/pipelines" + tag: "Documentation" + text: "Log processing pipelines" +--- + +{{< whatsnext desc="Overall description goes here:" >}} + {{< nextlink href="link/here" >}}Link desctiption goes here{{< /nextlink >}} +{{< /whatsnext >}} \ No newline at end of file diff --git a/content/ddsql/v0.md b/content/ddsql/v0.md new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/content/ddsql/v1.md b/content/ddsql/v1.md new file mode 100644 index 0000000000000..e69de29bb2d1d From 0d154eeb266cbec3f09a40070da8093b772844c6 Mon Sep 17 00:00:00 2001 From: Esther Kim Date: Mon, 14 Apr 2025 11:51:50 -0400 Subject: [PATCH 2/6] Move workspaces reference to ddsql --- config/_default/menus/main.en.yaml | 24 +------- config/_default/params.yaml | 2 + content/ddsql/_index.md | 11 ---- content/ddsql/v0.md | 0 content/ddsql/v1.md | 0 content/en/ddsql/_index.md | 25 ++++++++ .../ddsql_default.md} | 57 ++++++++++++------- content/en/ddsql/ddsql_editor_syntax.md | 28 +++++++++ .../ddsql_editor_syntax}/data_types.md | 7 ++- .../expressions_and_operators.md | 7 ++- .../ddsql_editor_syntax}/functions.md | 7 ++- .../ddsql_editor_syntax}/statements.md | 7 ++- .../ddsql_editor_syntax}/window_functions.md | 4 +- content/en/ddsql_editor/_index.md | 15 +++-- content/en/ddsql_editor/reference_tables.md | 11 ++++ .../en/ddsql_editor/{reference => }/tags.md | 13 +++++ 16 files changed, 150 insertions(+), 68 deletions(-) delete mode 100644 content/ddsql/_index.md delete mode 100644 content/ddsql/v0.md delete mode 100644 content/ddsql/v1.md create mode 100644 content/en/ddsql/_index.md rename content/en/{logs/workspaces/sql_reference.md => ddsql/ddsql_default.md} (88%) create mode 100644 content/en/ddsql/ddsql_editor_syntax.md rename content/en/{ddsql_editor/reference => ddsql/ddsql_editor_syntax}/data_types.md (84%) rename content/en/{ddsql_editor/reference => ddsql/ddsql_editor_syntax}/expressions_and_operators.md (94%) rename content/en/{ddsql_editor/reference => ddsql/ddsql_editor_syntax}/functions.md (96%) rename content/en/{ddsql_editor/reference => ddsql/ddsql_editor_syntax}/statements.md (95%) rename content/en/{ddsql_editor/reference => ddsql/ddsql_editor_syntax}/window_functions.md (89%) rename content/en/ddsql_editor/{reference => }/tags.md (86%) diff --git a/config/_default/menus/main.en.yaml b/config/_default/menus/main.en.yaml index ecc9846e53394..9dd81f88b887f 100644 --- a/config/_default/menus/main.en.yaml +++ b/config/_default/menus/main.en.yaml @@ -1543,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 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 diff --git a/config/_default/params.yaml b/config/_default/params.yaml index 9d6542e9fe513..2e76be1f462c9 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 for the DDSQL Editor" + ddsql_default: "DDSQL" branch: "" signupclass: sign-up-trigger diff --git a/content/ddsql/_index.md b/content/ddsql/_index.md deleted file mode 100644 index 83b3b0b811d6e..0000000000000 --- a/content/ddsql/_index.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: DDSQL Reference -further_reading: -- link: "logs/processing/pipelines" - tag: "Documentation" - text: "Log processing pipelines" ---- - -{{< whatsnext desc="Overall description goes here:" >}} - {{< nextlink href="link/here" >}}Link desctiption goes here{{< /nextlink >}} -{{< /whatsnext >}} \ No newline at end of file diff --git a/content/ddsql/v0.md b/content/ddsql/v0.md deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/content/ddsql/v1.md b/content/ddsql/v1.md deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/content/en/ddsql/_index.md b/content/en/ddsql/_index.md new file mode 100644 index 0000000000000..730b149aae1cd --- /dev/null +++ b/content/en/ddsql/_index.md @@ -0,0 +1,25 @@ +--- +title: DDSQL +type: multi-code-lang +external_redirect: /ddsql/ddsql_default +further_reading: +- link: "logs/processing/pipelines" + tag: "Documentation" + text: "Log processing pipelines" +--- + +## Supported DDSQL Syntax + +
+ The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context. +
+ +{{< whatsnext desc="Syntax references:" >}} + {{< nextlink href="/ddsql/ddsql_default" >}}DDSQL{{< /nextlink >}} + {{< nextlink href="/ddsql/ddsql_editor_syntax" >}}DDSQL Editor Syntax (Preview){{< /nextlink >}} +{{< /whatsnext >}} + +## Further reading + +{{< partial name="whats-next/whats-next.html" >}} + diff --git a/content/en/logs/workspaces/sql_reference.md b/content/en/ddsql/ddsql_default.md similarity index 88% rename from content/en/logs/workspaces/sql_reference.md rename to content/en/ddsql/ddsql_default.md index b3bc644f10439..8750c9ec5217a 100644 --- a/content/en/logs/workspaces/sql_reference.md +++ b/content/en/ddsql/ddsql_default.md @@ -1,14 +1,27 @@ --- -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 >}} + +
The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. The DDSQL syntax in this documentation may not be applicable to the DDSQL Editor.
+ ## 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) @@ -141,7 +154,7 @@ GROUP BY service_name {{< /code-block >}} ### `CEIL` -{{< code-block lang="sql" >}} +{{< code-block lang="sql" >}} SELECT CEIL(price) AS rounded_price FROM products {{< /code-block >}} @@ -217,7 +230,7 @@ SELECT ### `TRIM` {{< code-block lang="sql" >}} SELECT - TRIM(name) AS trimmed_name + trim(name) AS trimmed_name FROM users {{< /code-block >}} @@ -225,7 +238,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 +246,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 +283,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 +310,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 +335,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 +355,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 +367,7 @@ SELECT FROM emails WHERE - REGEXP_LIKE(email_address, '@example\.com$') + regexp_like(email_address, '@example\.com$') {{< /code-block >}} ### `CARDINALITY` @@ -408,17 +421,17 @@ FROM 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. | +| 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/ddsql_editor_syntax.md b/content/en/ddsql/ddsql_editor_syntax.md new file mode 100644 index 0000000000000..59d2810b30a6b --- /dev/null +++ b/content/en/ddsql/ddsql_editor_syntax.md @@ -0,0 +1,28 @@ +--- +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 >}} + +
The DDSQL Editor supports only the syntax documented on this page. The DDSQL syntax in this documentation may not be applicable to the DDSQL Editor.
+ +{{< whatsnext desc="For more information on DDSQL queries, see the DDSQL References:" >}} + {{< nextlink href="ddsql/ddsql_editor_syntax/functions" >}}Functions{{< /nextlink >}} + {{< nextlink href="ddsql/ddsql_editor_syntax/data_types" >}}Data Types{{< /nextlink >}} + {{< nextlink href="ddsql/ddsql_editor_syntax/expressions_and_operators" >}}Expressions and Operators{{< /nextlink >}} + {{< nextlink href="ddsql/ddsql_editor_syntax/statements" >}}Statements{{< /nextlink >}} + {{< nextlink href="ddsql/ddsql_editor_syntax/tags" >}}Tags{{< /nextlink >}} +{{< /whatsnext >}} + +## Further reading + +{{< partial name="whats-next/whats-next.html" >}} \ No newline at end of file diff --git a/content/en/ddsql_editor/reference/data_types.md b/content/en/ddsql/ddsql_editor_syntax/data_types.md similarity index 84% rename from content/en/ddsql_editor/reference/data_types.md rename to content/en/ddsql/ddsql_editor_syntax/data_types.md index 8ad75d6fc120f..00a4d4034648c 100644 --- a/content/en/ddsql_editor/reference/data_types.md +++ b/content/en/ddsql/ddsql_editor_syntax/data_types.md @@ -1,13 +1,18 @@ --- -title: DDSQL Data Types +title: DDSQL 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 >}} +
+ The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context. +
+ ## 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/ddsql_editor_syntax/expressions_and_operators.md similarity index 94% rename from content/en/ddsql_editor/reference/expressions_and_operators.md rename to content/en/ddsql/ddsql_editor_syntax/expressions_and_operators.md index 2d5045aaa3d9f..de9c95ade6b78 100644 --- a/content/en/ddsql_editor/reference/expressions_and_operators.md +++ b/content/en/ddsql/ddsql_editor_syntax/expressions_and_operators.md @@ -1,13 +1,18 @@ --- -title: DDSQL Expressions and Operators +title: DDSQL 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 >}} +
+ The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context. +
+ *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/ddsql_editor_syntax/functions.md similarity index 96% rename from content/en/ddsql_editor/reference/functions.md rename to content/en/ddsql/ddsql_editor_syntax/functions.md index abcd73995d832..01a8755942dd8 100644 --- a/content/en/ddsql_editor/reference/functions.md +++ b/content/en/ddsql/ddsql_editor_syntax/functions.md @@ -1,16 +1,21 @@ --- -title: DDSQL Functions +title: DDSQL 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 >}} +
+ The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context. +
+ ## 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/ddsql_editor_syntax/statements.md similarity index 95% rename from content/en/ddsql_editor/reference/statements.md rename to content/en/ddsql/ddsql_editor_syntax/statements.md index b02c18368eb7b..08c4f355b1df7 100644 --- a/content/en/ddsql_editor/reference/statements.md +++ b/content/en/ddsql/ddsql_editor_syntax/statements.md @@ -1,13 +1,18 @@ --- -title: DDSQL Statements +title: DDSQL 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 >}} +
+ The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context. +
+ ## SELECT `SELECT` retrieves rows from a table or view. diff --git a/content/en/ddsql_editor/reference/window_functions.md b/content/en/ddsql/ddsql_editor_syntax/window_functions.md similarity index 89% rename from content/en/ddsql_editor/reference/window_functions.md rename to content/en/ddsql/ddsql_editor_syntax/window_functions.md index 3e2a1616db41f..2b5eceb7e72cc 100644 --- a/content/en/ddsql_editor/reference/window_functions.md +++ b/content/en/ddsql/ddsql_editor_syntax/window_functions.md @@ -1,14 +1,16 @@ --- -title: DDSQL Window Functions +title: DDSQL 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. {{< /callout >}} +
This page documents the only DDSQL syntax supported by the DDSQL Editor. Other DDSQL syntax not listed here is not supported and will not work in this context.
## Overview A window function applies an aggregation to some subset of the rows selected by a query. The selected rows are preserved in the query output, rather than being grouped into a single output row as they would be in a non-window aggregation. diff --git a/content/en/ddsql_editor/_index.md b/content/en/ddsql_editor/_index.md index 12125a1942db1..633ad8237ed7a 100644 --- a/content/en/ddsql_editor/_index.md +++ b/content/en/ddsql_editor/_index.md @@ -10,6 +10,9 @@ further_reading: - link: "/ddsql_editor/guide/ddsql_use_cases" tag: "Guide" text: "Common queries and use cases" +- link: "/ddsql/ddsql_editor_syntax" + tag: "Documentation" + text: "DDSQL Editor Syntax (Preview)" --- @@ -33,6 +36,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. +
+ The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context. +
+ {{< code-block lang="sql" >}} SELECT instance_type, count(instance_type) FROM aws_ec2_instance @@ -40,14 +47,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: diff --git a/content/en/ddsql_editor/reference_tables.md b/content/en/ddsql_editor/reference_tables.md index b8ed4d54f62d1..c660a00276895 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/ddsql_editor_syntax" + tag: "Documentation" + text: "DDSQL Editor Syntax (Preview)" --- +{{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}} +DDSQL is in Preview. +{{< /callout >}} + +
+ The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context. +
+ # 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..0a2ab91a97800 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/ddsql_editor_syntax" + tag: "Documentation" + text: "DDSQL Editor Syntax (Preview)" --- {{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}} DDSQL is in Preview. {{< /callout >}} +
+ The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context. +
+ 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 From b4605ee7d3c7552ee8f96c42a313783334772e26 Mon Sep 17 00:00:00 2001 From: Esther Kim Date: Wed, 16 Apr 2025 18:04:33 -0400 Subject: [PATCH 3/6] Add reference to the workspaces index --- config/_default/menus/main.en.yaml | 9 ++------- content/en/logs/workspaces/_index.md | 3 ++- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/config/_default/menus/main.en.yaml b/config/_default/menus/main.en.yaml index 9dd81f88b887f..7bb13a2ec3d6f 100644 --- a/config/_default/menus/main.en.yaml +++ b/config/_default/menus/main.en.yaml @@ -5861,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/content/en/logs/workspaces/_index.md b/content/en/logs/workspaces/_index.md index bf7e783edf9dd..d2084d89a1626 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/ \ No newline at end of file From a2cd50b5e4b34f763d859f3d09bae4c9b5ac009f Mon Sep 17 00:00:00 2001 From: Esther Kim Date: Thu, 17 Apr 2025 09:48:02 -0400 Subject: [PATCH 4/6] Apply suggestions from code review Co-authored-by: Janine Chan <64388808+janine-c@users.noreply.github.com> --- config/_default/menus/main.en.yaml | 2 +- content/en/ddsql/ddsql_default.md | 4 ++-- content/en/ddsql/ddsql_editor_syntax.md | 2 +- content/en/ddsql/ddsql_editor_syntax/data_types.md | 2 +- .../ddsql/ddsql_editor_syntax/expressions_and_operators.md | 2 +- content/en/ddsql/ddsql_editor_syntax/functions.md | 2 +- content/en/ddsql/ddsql_editor_syntax/statements.md | 2 +- content/en/ddsql/ddsql_editor_syntax/window_functions.md | 5 +++-- content/en/ddsql_editor/reference_tables.md | 2 +- content/en/ddsql_editor/tags.md | 2 +- 10 files changed, 13 insertions(+), 12 deletions(-) diff --git a/config/_default/menus/main.en.yaml b/config/_default/menus/main.en.yaml index 7bb13a2ec3d6f..9d5ee2fdad727 100644 --- a/config/_default/menus/main.en.yaml +++ b/config/_default/menus/main.en.yaml @@ -1544,7 +1544,7 @@ menu: identifier: ddsql_editor_getting_started weight: 1 - name: Querying Tags - url: ddsql_editor/reference/tags + url: ddsql_editor/tags parent: ddsql_editor identifier: ddsql_editor_tags weight: 2 diff --git a/content/en/ddsql/ddsql_default.md b/content/en/ddsql/ddsql_default.md index 8750c9ec5217a..214dac15acdc8 100644 --- a/content/en/ddsql/ddsql_default.md +++ b/content/en/ddsql/ddsql_default.md @@ -154,7 +154,7 @@ GROUP BY service_name {{< /code-block >}} ### `CEIL` -{{< code-block lang="sql" >}} +{{< code-block lang="sql" >}} SELECT CEIL(price) AS rounded_price FROM products {{< /code-block >}} @@ -419,7 +419,7 @@ FROM ## Window functions -This table provides an overview of the supprted window functions. For comprehensive details and examples, see to the [PostgreSQL documentation][2]. +This table provides an overview of the supprted window functions. For comprehensive details and examples, see the [PostgreSQL documentation][2]. | Function | Return Type | Description | |-------------------------|-------------------|------------------------------------------------------------------------| diff --git a/content/en/ddsql/ddsql_editor_syntax.md b/content/en/ddsql/ddsql_editor_syntax.md index 59d2810b30a6b..6b1dccee2b807 100644 --- a/content/en/ddsql/ddsql_editor_syntax.md +++ b/content/en/ddsql/ddsql_editor_syntax.md @@ -20,7 +20,7 @@ DDSQL Editor is in Preview. {{< nextlink href="ddsql/ddsql_editor_syntax/data_types" >}}Data Types{{< /nextlink >}} {{< nextlink href="ddsql/ddsql_editor_syntax/expressions_and_operators" >}}Expressions and Operators{{< /nextlink >}} {{< nextlink href="ddsql/ddsql_editor_syntax/statements" >}}Statements{{< /nextlink >}} - {{< nextlink href="ddsql/ddsql_editor_syntax/tags" >}}Tags{{< /nextlink >}} + {{< nextlink href="ddsql/ddsql_editor/tags" >}}Tags{{< /nextlink >}} {{< /whatsnext >}} ## Further reading diff --git a/content/en/ddsql/ddsql_editor_syntax/data_types.md b/content/en/ddsql/ddsql_editor_syntax/data_types.md index 00a4d4034648c..699a7ea998868 100644 --- a/content/en/ddsql/ddsql_editor_syntax/data_types.md +++ b/content/en/ddsql/ddsql_editor_syntax/data_types.md @@ -6,7 +6,7 @@ aliases: --- {{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}} -DDSQL is in Preview. +DDSQL for the DDSQL Editor is in Preview. {{< /callout >}}
diff --git a/content/en/ddsql/ddsql_editor_syntax/expressions_and_operators.md b/content/en/ddsql/ddsql_editor_syntax/expressions_and_operators.md index de9c95ade6b78..edac8ecce2dc5 100644 --- a/content/en/ddsql/ddsql_editor_syntax/expressions_and_operators.md +++ b/content/en/ddsql/ddsql_editor_syntax/expressions_and_operators.md @@ -6,7 +6,7 @@ aliases: --- {{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}} -DDSQL is in Preview. +DDSQL for the DDSQL Editor is in Preview. {{< /callout >}}
diff --git a/content/en/ddsql/ddsql_editor_syntax/functions.md b/content/en/ddsql/ddsql_editor_syntax/functions.md index 01a8755942dd8..cde54006a8876 100644 --- a/content/en/ddsql/ddsql_editor_syntax/functions.md +++ b/content/en/ddsql/ddsql_editor_syntax/functions.md @@ -9,7 +9,7 @@ aliases: --- {{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}} -DDSQL is in Preview. +DDSQL for the DDSQL Editor is in Preview. {{< /callout >}}
diff --git a/content/en/ddsql/ddsql_editor_syntax/statements.md b/content/en/ddsql/ddsql_editor_syntax/statements.md index 08c4f355b1df7..7edfc3599d262 100644 --- a/content/en/ddsql/ddsql_editor_syntax/statements.md +++ b/content/en/ddsql/ddsql_editor_syntax/statements.md @@ -6,7 +6,7 @@ aliases: --- {{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}} -DDSQL is in Preview. +DDSQL for the DDSQL Editor is in Preview. {{< /callout >}}
diff --git a/content/en/ddsql/ddsql_editor_syntax/window_functions.md b/content/en/ddsql/ddsql_editor_syntax/window_functions.md index 2b5eceb7e72cc..471ab28537262 100644 --- a/content/en/ddsql/ddsql_editor_syntax/window_functions.md +++ b/content/en/ddsql/ddsql_editor_syntax/window_functions.md @@ -7,10 +7,11 @@ aliases: --- {{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}} -DDSQL is in Preview. +DDSQL for the DDSQL Editor is in Preview. {{< /callout >}} -
This page documents the only DDSQL syntax supported by the DDSQL Editor. Other DDSQL syntax not listed here is not supported and will not work in this context.
+
The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context.
+ ## Overview A window function applies an aggregation to some subset of the rows selected by a query. The selected rows are preserved in the query output, rather than being grouped into a single output row as they would be in a non-window aggregation. diff --git a/content/en/ddsql_editor/reference_tables.md b/content/en/ddsql_editor/reference_tables.md index c660a00276895..0d92153f912b4 100644 --- a/content/en/ddsql_editor/reference_tables.md +++ b/content/en/ddsql_editor/reference_tables.md @@ -10,7 +10,7 @@ further_reading: --- {{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}} -DDSQL is in Preview. +The DDSQL Editor is in Preview. {{< /callout >}}
diff --git a/content/en/ddsql_editor/tags.md b/content/en/ddsql_editor/tags.md index 0a2ab91a97800..dc9d7ec9dc86d 100644 --- a/content/en/ddsql_editor/tags.md +++ b/content/en/ddsql_editor/tags.md @@ -10,7 +10,7 @@ further_reading: --- {{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}} -DDSQL is in Preview. +The DDSQL Editor is in Preview. {{< /callout >}}
From bfcbb538e4159540c273fc4f2b5b0b5c601f1d1e Mon Sep 17 00:00:00 2001 From: Esther Kim Date: Fri, 18 Apr 2025 10:43:48 -0400 Subject: [PATCH 5/6] Apply code review suggestions - Remove disclaimer from DDSQL Editor Syntax docs - Rephrase disclaimer to be transparent about the two different variants of DDSQL and direct customers to the relevant docs - Rename DDSQL to DDSQL Reference to distinguish between DDSQL Editor - Update URLs for DDSQL Reference - Update tabs to DDSQL Editor Syntax (Preview) and specify DDSQL Editor for all child pages --- config/_default/menus/main.en.yaml | 6 ++-- config/_default/params.yaml | 2 +- content/en/ddsql/_index.md | 25 ----------------- content/en/ddsql/ddsql_editor_syntax.md | 28 ------------------- content/en/ddsql_editor/_index.md | 10 ++----- content/en/ddsql_editor/getting_started.md | 2 +- content/en/ddsql_editor/reference_tables.md | 4 +-- content/en/ddsql_editor/tags.md | 4 +-- content/en/ddsql_reference/_index.md | 28 +++++++++++++++++++ .../ddsql_default.md | 4 ++- .../en/ddsql_reference/ddsql_editor_syntax.md | 25 +++++++++++++++++ .../ddsql_editor_syntax/data_types.md | 10 +------ .../expressions_and_operators.md | 10 +------ .../ddsql_editor_syntax/functions.md | 10 +------ .../ddsql_editor_syntax/statements.md | 10 +------ .../ddsql_editor_syntax/window_functions.md | 4 +-- content/en/logs/workspaces/_index.md | 2 +- 17 files changed, 74 insertions(+), 110 deletions(-) delete mode 100644 content/en/ddsql/_index.md delete mode 100644 content/en/ddsql/ddsql_editor_syntax.md create mode 100644 content/en/ddsql_reference/_index.md rename content/en/{ddsql => ddsql_reference}/ddsql_default.md (98%) create mode 100644 content/en/ddsql_reference/ddsql_editor_syntax.md rename content/en/{ddsql => ddsql_reference}/ddsql_editor_syntax/data_types.md (81%) rename content/en/{ddsql => ddsql_reference}/ddsql_editor_syntax/expressions_and_operators.md (93%) rename content/en/{ddsql => ddsql_reference}/ddsql_editor_syntax/functions.md (95%) rename content/en/{ddsql => ddsql_reference}/ddsql_editor_syntax/statements.md (94%) rename content/en/{ddsql => ddsql_reference}/ddsql_editor_syntax/window_functions.md (88%) diff --git a/config/_default/menus/main.en.yaml b/config/_default/menus/main.en.yaml index 9d5ee2fdad727..b8fb9709dabc9 100644 --- a/config/_default/menus/main.en.yaml +++ b/config/_default/menus/main.en.yaml @@ -1318,10 +1318,10 @@ menu: identifier: cloudcraft_api_users_info parent: cloudcraft_api_users weight: 1 - - name: DDSQL - url: ddsql/ + - name: DDSQL Reference + url: ddsql_reference/ pre: ddsql - identifier: ddsql + identifier: ddsql_reference parent: essentials_heading weight: 140000 - name: Watchdog diff --git a/config/_default/params.yaml b/config/_default/params.yaml index 2e76be1f462c9..0a8c541a45bd2 100644 --- a/config/_default/params.yaml +++ b/config/_default/params.yaml @@ -130,7 +130,7 @@ code_language_ids: apache: "Apache HTTP Server" ibm: "IBM HTTP Server" gcp-service-extensions: "GCP Service Extensions" - ddsql_editor_syntax: "DDSQL for the DDSQL Editor" + ddsql_editor_syntax: "DDSQL Editor Syntax (Preview)" ddsql_default: "DDSQL" branch: "" diff --git a/content/en/ddsql/_index.md b/content/en/ddsql/_index.md deleted file mode 100644 index 730b149aae1cd..0000000000000 --- a/content/en/ddsql/_index.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: DDSQL -type: multi-code-lang -external_redirect: /ddsql/ddsql_default -further_reading: -- link: "logs/processing/pipelines" - tag: "Documentation" - text: "Log processing pipelines" ---- - -## Supported DDSQL Syntax - -
- The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context. -
- -{{< whatsnext desc="Syntax references:" >}} - {{< nextlink href="/ddsql/ddsql_default" >}}DDSQL{{< /nextlink >}} - {{< nextlink href="/ddsql/ddsql_editor_syntax" >}}DDSQL Editor Syntax (Preview){{< /nextlink >}} -{{< /whatsnext >}} - -## Further reading - -{{< partial name="whats-next/whats-next.html" >}} - diff --git a/content/en/ddsql/ddsql_editor_syntax.md b/content/en/ddsql/ddsql_editor_syntax.md deleted file mode 100644 index 6b1dccee2b807..0000000000000 --- a/content/en/ddsql/ddsql_editor_syntax.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -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 >}} - -
The DDSQL Editor supports only the syntax documented on this page. The DDSQL syntax in this documentation may not be applicable to the DDSQL Editor.
- -{{< whatsnext desc="For more information on DDSQL queries, see the DDSQL References:" >}} - {{< nextlink href="ddsql/ddsql_editor_syntax/functions" >}}Functions{{< /nextlink >}} - {{< nextlink href="ddsql/ddsql_editor_syntax/data_types" >}}Data Types{{< /nextlink >}} - {{< nextlink href="ddsql/ddsql_editor_syntax/expressions_and_operators" >}}Expressions and Operators{{< /nextlink >}} - {{< nextlink href="ddsql/ddsql_editor_syntax/statements" >}}Statements{{< /nextlink >}} - {{< nextlink href="ddsql/ddsql_editor/tags" >}}Tags{{< /nextlink >}} -{{< /whatsnext >}} - -## Further reading - -{{< partial name="whats-next/whats-next.html" >}} \ No newline at end of file diff --git a/content/en/ddsql_editor/_index.md b/content/en/ddsql_editor/_index.md index 633ad8237ed7a..7c22bdedce5c5 100644 --- a/content/en/ddsql_editor/_index.md +++ b/content/en/ddsql_editor/_index.md @@ -2,15 +2,11 @@ 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/ddsql_editor_syntax" +- link: "/ddsql_reference/ddsql_editor_syntax" tag: "Documentation" text: "DDSQL Editor Syntax (Preview)" --- @@ -37,7 +33,7 @@ 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.
- The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context. + There are two different variants of DDSQL. For the DDSQL Editor use the syntax documented in the DDSQL Editor syntax documentation.
{{< code-block lang="sql" >}} @@ -76,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 0d92153f912b4..210919ae0fb42 100644 --- a/content/en/ddsql_editor/reference_tables.md +++ b/content/en/ddsql_editor/reference_tables.md @@ -4,7 +4,7 @@ further_reading: - link: "/integrations/guide/reference-tables/" tag: "Documentation" text: "Add Custom Metadata with Reference Tables" -- link: "/ddsql/ddsql_editor_syntax" +- link: "/ddsql_reference/ddsql_editor_syntax" tag: "Documentation" text: "DDSQL Editor Syntax (Preview)" --- @@ -14,7 +14,7 @@ The DDSQL Editor is in Preview. {{< /callout >}}
- The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context. + There are two different variants of DDSQL. For the DDSQL Editor use the syntax documented in the DDSQL Editor syntax documentation.
# Overview diff --git a/content/en/ddsql_editor/tags.md b/content/en/ddsql_editor/tags.md index dc9d7ec9dc86d..22ba5e4f42a7c 100644 --- a/content/en/ddsql_editor/tags.md +++ b/content/en/ddsql_editor/tags.md @@ -4,7 +4,7 @@ aliases: - /dashboards/ddsql_editor/reference/tags/ - /ddsql_editor/reference/tags/ further_reading: -- link: "/ddsql/ddsql_editor_syntax" +- link: "/ddsql_reference/ddsql_editor_syntax" tag: "Documentation" text: "DDSQL Editor Syntax (Preview)" --- @@ -14,7 +14,7 @@ The DDSQL Editor is in Preview. {{< /callout >}}
- The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context. + There are two different variants of DDSQL. For the DDSQL Editor use the syntax documented in the DDSQL Editor syntax documentation.
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. diff --git a/content/en/ddsql_reference/_index.md b/content/en/ddsql_reference/_index.md new file mode 100644 index 0000000000000..4119cdb223cf8 --- /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. + +
+ There are two different variants of DDSQL. For the DDSQL Editor use the syntax documented in the DDSQL Editor syntax documentation. +
+ +{{< 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/ddsql/ddsql_default.md b/content/en/ddsql_reference/ddsql_default.md similarity index 98% rename from content/en/ddsql/ddsql_default.md rename to content/en/ddsql_reference/ddsql_default.md index 214dac15acdc8..8f5030bcfe442 100644 --- a/content/en/ddsql/ddsql_default.md +++ b/content/en/ddsql_reference/ddsql_default.md @@ -17,7 +17,9 @@ further_reading: {{< product-availability >}} -
The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. The DDSQL syntax in this documentation may not be applicable to the DDSQL Editor.
+
+ There are two different variants of DDSQL. For the DDSQL Editor use the syntax documented in the DDSQL Editor syntax documentation. +
## Overview 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/ddsql_editor_syntax/data_types.md b/content/en/ddsql_reference/ddsql_editor_syntax/data_types.md similarity index 81% rename from content/en/ddsql/ddsql_editor_syntax/data_types.md rename to content/en/ddsql_reference/ddsql_editor_syntax/data_types.md index 699a7ea998868..4222a4973d393 100644 --- a/content/en/ddsql/ddsql_editor_syntax/data_types.md +++ b/content/en/ddsql_reference/ddsql_editor_syntax/data_types.md @@ -1,18 +1,10 @@ --- -title: DDSQL Data Types (Preview) +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 for the DDSQL Editor is in Preview. -{{< /callout >}} - -
- The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context. -
- ## Data types DDSQL implements a simplified version of the SQL type system that is mostly descended from PostgreSQL. diff --git a/content/en/ddsql/ddsql_editor_syntax/expressions_and_operators.md b/content/en/ddsql_reference/ddsql_editor_syntax/expressions_and_operators.md similarity index 93% rename from content/en/ddsql/ddsql_editor_syntax/expressions_and_operators.md rename to content/en/ddsql_reference/ddsql_editor_syntax/expressions_and_operators.md index edac8ecce2dc5..96f3248ccfe4b 100644 --- a/content/en/ddsql/ddsql_editor_syntax/expressions_and_operators.md +++ b/content/en/ddsql_reference/ddsql_editor_syntax/expressions_and_operators.md @@ -1,18 +1,10 @@ --- -title: DDSQL Expressions and Operators (Preview) +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 for the DDSQL Editor is in Preview. -{{< /callout >}} - -
- The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context. -
- *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/ddsql_editor_syntax/functions.md b/content/en/ddsql_reference/ddsql_editor_syntax/functions.md similarity index 95% rename from content/en/ddsql/ddsql_editor_syntax/functions.md rename to content/en/ddsql_reference/ddsql_editor_syntax/functions.md index cde54006a8876..2500c44822d18 100644 --- a/content/en/ddsql/ddsql_editor_syntax/functions.md +++ b/content/en/ddsql_reference/ddsql_editor_syntax/functions.md @@ -1,5 +1,5 @@ --- -title: DDSQL Functions (Preview) +title: DDSQL Editor Functions (Preview) aliases: - /dashboards/ddsql_editor/reference/aggregation_functions - /dashboards/ddsql_editor/reference/scalar_functions/ @@ -8,14 +8,6 @@ aliases: - /ddsql_editor/reference/functions --- -{{< callout url="https://datadoghq.com/private-beta/ddsql-editor">}} -DDSQL for the DDSQL Editor is in Preview. -{{< /callout >}} - -
- The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context. -
- ## 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/ddsql_editor_syntax/statements.md b/content/en/ddsql_reference/ddsql_editor_syntax/statements.md similarity index 94% rename from content/en/ddsql/ddsql_editor_syntax/statements.md rename to content/en/ddsql_reference/ddsql_editor_syntax/statements.md index 7edfc3599d262..2c09219034416 100644 --- a/content/en/ddsql/ddsql_editor_syntax/statements.md +++ b/content/en/ddsql_reference/ddsql_editor_syntax/statements.md @@ -1,18 +1,10 @@ --- -title: DDSQL Statements (Preview) +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 for the DDSQL Editor is in Preview. -{{< /callout >}} - -
- The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context. -
- ## SELECT `SELECT` retrieves rows from a table or view. diff --git a/content/en/ddsql/ddsql_editor_syntax/window_functions.md b/content/en/ddsql_reference/ddsql_editor_syntax/window_functions.md similarity index 88% rename from content/en/ddsql/ddsql_editor_syntax/window_functions.md rename to content/en/ddsql_reference/ddsql_editor_syntax/window_functions.md index 471ab28537262..37a2a11a1578b 100644 --- a/content/en/ddsql/ddsql_editor_syntax/window_functions.md +++ b/content/en/ddsql_reference/ddsql_editor_syntax/window_functions.md @@ -1,5 +1,5 @@ --- -title: DDSQL Window Functions (Preview) +title: DDSQL Editor Window Functions (Preview) private: true aliases: - /dashboards/ddsql_editor/reference/window_functions/ @@ -10,8 +10,6 @@ aliases: DDSQL for the DDSQL Editor is in Preview. {{< /callout >}} -
The DDSQL Editor supports only the syntax documented in the DDSQL Editor syntax documentation. Other DDSQL syntax references apply to a different version of DDSQL and are not supported in this context.
- ## Overview A window function applies an aggregation to some subset of the rows selected by a query. The selected rows are preserved in the query output, rather than being grouped into a single output row as they would be in a non-window aggregation. diff --git a/content/en/logs/workspaces/_index.md b/content/en/logs/workspaces/_index.md index d2084d89a1626..9acc4d6e579be 100644 --- a/content/en/logs/workspaces/_index.md +++ b/content/en/logs/workspaces/_index.md @@ -256,4 +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/ \ No newline at end of file +[5]: /ddsql_reference/ \ No newline at end of file From 437c77da8af874872bae925c08345e1b71742f14 Mon Sep 17 00:00:00 2001 From: Esther Kim Date: Fri, 18 Apr 2025 13:02:59 -0400 Subject: [PATCH 6/6] Apply code review suggestion --- content/en/ddsql_editor/_index.md | 2 +- content/en/ddsql_editor/reference_tables.md | 2 +- content/en/ddsql_editor/tags.md | 2 +- content/en/ddsql_reference/_index.md | 2 +- content/en/ddsql_reference/ddsql_default.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/content/en/ddsql_editor/_index.md b/content/en/ddsql_editor/_index.md index 7c22bdedce5c5..5fdb86591723f 100644 --- a/content/en/ddsql_editor/_index.md +++ b/content/en/ddsql_editor/_index.md @@ -33,7 +33,7 @@ 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.
- There are two different variants of DDSQL. For the DDSQL Editor use the syntax documented in the DDSQL Editor syntax documentation. + There are two different variants of DDSQL. For the DDSQL Editor, use the syntax documented in the DDSQL Editor syntax documentation.
{{< code-block lang="sql" >}} diff --git a/content/en/ddsql_editor/reference_tables.md b/content/en/ddsql_editor/reference_tables.md index 210919ae0fb42..f7edfe446543a 100644 --- a/content/en/ddsql_editor/reference_tables.md +++ b/content/en/ddsql_editor/reference_tables.md @@ -14,7 +14,7 @@ The DDSQL Editor is in Preview. {{< /callout >}}
- There are two different variants of DDSQL. For the DDSQL Editor use the syntax documented in the DDSQL Editor syntax documentation. + There are two different variants of DDSQL. For the DDSQL Editor, use the syntax documented in the DDSQL Editor syntax documentation.
# Overview diff --git a/content/en/ddsql_editor/tags.md b/content/en/ddsql_editor/tags.md index 22ba5e4f42a7c..cc47943b366dd 100644 --- a/content/en/ddsql_editor/tags.md +++ b/content/en/ddsql_editor/tags.md @@ -14,7 +14,7 @@ The DDSQL Editor is in Preview. {{< /callout >}}
- There are two different variants of DDSQL. For the DDSQL Editor use the syntax documented in the DDSQL Editor syntax documentation. + There are two different variants of DDSQL. For the DDSQL Editor, use the syntax documented in the DDSQL Editor syntax documentation.
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. diff --git a/content/en/ddsql_reference/_index.md b/content/en/ddsql_reference/_index.md index 4119cdb223cf8..edc0d7b752de1 100644 --- a/content/en/ddsql_reference/_index.md +++ b/content/en/ddsql_reference/_index.md @@ -13,7 +13,7 @@ further_reading: 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.
- There are two different variants of DDSQL. For the DDSQL Editor use the syntax documented in the DDSQL Editor syntax documentation. + There are two different variants of DDSQL. For the DDSQL Editor, use the syntax documented in the DDSQL Editor syntax documentation.
{{< whatsnext desc="Syntax references:" >}} diff --git a/content/en/ddsql_reference/ddsql_default.md b/content/en/ddsql_reference/ddsql_default.md index 8f5030bcfe442..f9a1f80e987dc 100644 --- a/content/en/ddsql_reference/ddsql_default.md +++ b/content/en/ddsql_reference/ddsql_default.md @@ -18,7 +18,7 @@ further_reading: {{< product-availability >}}
- There are two different variants of DDSQL. For the DDSQL Editor use the syntax documented in the DDSQL Editor syntax documentation. + There are two different variants of DDSQL. For the DDSQL Editor, use the syntax documented in the DDSQL Editor syntax documentation.
## Overview