From 1d1ad3be32626e2955ab1451cca19c1bc9295d46 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Mar 2026 19:03:02 +0000 Subject: [PATCH 2/7] Add aliases to fix broken Docker Hub links to serve documentation Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com> --- content/influxdb3/core/reference/cli/influxdb3/serve.md | 2 ++ content/influxdb3/enterprise/reference/cli/influxdb3/serve.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/content/influxdb3/core/reference/cli/influxdb3/serve.md b/content/influxdb3/core/reference/cli/influxdb3/serve.md index 35fdd5835..d86d5413c 100644 --- a/content/influxdb3/core/reference/cli/influxdb3/serve.md +++ b/content/influxdb3/core/reference/cli/influxdb3/serve.md @@ -7,6 +7,8 @@ menu: parent: influxdb3 name: influxdb3 serve weight: 300 +aliases: + - /influxdb3/core/reference/clis/influxdb3/serve/ related: - /influxdb3/core/reference/config-options/ --- diff --git a/content/influxdb3/enterprise/reference/cli/influxdb3/serve.md b/content/influxdb3/enterprise/reference/cli/influxdb3/serve.md index 804a826ec..c145136e5 100644 --- a/content/influxdb3/enterprise/reference/cli/influxdb3/serve.md +++ b/content/influxdb3/enterprise/reference/cli/influxdb3/serve.md @@ -7,6 +7,8 @@ menu: parent: influxdb3 name: influxdb3 serve weight: 300 +aliases: + - /influxdb3/enterprise/reference/clis/influxdb3/serve/ related: - /influxdb3/enterprise/reference/config-options/ --- From 7603f82471e7a0e5123fda1c2eb7526180d5425e Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Tue, 17 Mar 2026 12:07:19 -0500 Subject: [PATCH 3/7] fix(influxdb3): correct broken links causing 404s (#6958) - Fix Power BI links in visualization-tools.md for cloud-dedicated, cloud-serverless, and clustered to use new visualize-data/ path instead of old process-data/visualize/ path - Fix influxctl cluster list link in cloud-dedicated/admin/clusters/list.md to include missing cluster/ path segment https://claude.ai/code/session_01SV14CdHN4GGVuATt9n7STn Co-authored-by: Claude --- content/influxdb3/cloud-dedicated/admin/clusters/list.md | 2 +- .../query-data/execute-queries/visualization-tools.md | 2 +- .../query-data/execute-queries/visualization-tools.md | 2 +- .../clustered/query-data/execute-queries/visualization-tools.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/influxdb3/cloud-dedicated/admin/clusters/list.md b/content/influxdb3/cloud-dedicated/admin/clusters/list.md index 7fc250ee6..9a6a174e9 100644 --- a/content/influxdb3/cloud-dedicated/admin/clusters/list.md +++ b/content/influxdb3/cloud-dedicated/admin/clusters/list.md @@ -15,7 +15,7 @@ aliases: - /influxdb3/cloud-dedicated/admin/clusters/list/ --- -Use the Admin UI or the [`influxctl cluster list` CLI command](/influxdb3/cloud-dedicated/reference/cli/influxctl/list/) +Use the Admin UI or the [`influxctl cluster list` CLI command](/influxdb3/cloud-dedicated/reference/cli/influxctl/cluster/list/) to view information about all {{< product-name omit=" Clustered" >}} clusters associated with your account ID. {{< tabs-wrapper >}} diff --git a/content/influxdb3/cloud-dedicated/query-data/execute-queries/visualization-tools.md b/content/influxdb3/cloud-dedicated/query-data/execute-queries/visualization-tools.md index 96e8be6e7..55c82d0b2 100644 --- a/content/influxdb3/cloud-dedicated/query-data/execute-queries/visualization-tools.md +++ b/content/influxdb3/cloud-dedicated/query-data/execute-queries/visualization-tools.md @@ -27,7 +27,7 @@ Use visualization tools to query data stored in {{% product-name %}} with SQL. The following visualization tools support querying InfluxDB with SQL: - [Grafana](/influxdb3/cloud-dedicated/process-data/visualize/grafana/) -- [Power BI](/influxdb3/cloud-dedicated/process-data/visualize/powerbi/) +- [Power BI](/influxdb3/cloud-dedicated/visualize-data/powerbi/) - [Superset](/influxdb3/cloud-dedicated/process-data/visualize/superset/) - [Tableau](/influxdb3/cloud-dedicated/process-data/visualize/tableau/) diff --git a/content/influxdb3/cloud-serverless/query-data/execute-queries/visualization-tools.md b/content/influxdb3/cloud-serverless/query-data/execute-queries/visualization-tools.md index 039134e2e..7b4a0cd87 100644 --- a/content/influxdb3/cloud-serverless/query-data/execute-queries/visualization-tools.md +++ b/content/influxdb3/cloud-serverless/query-data/execute-queries/visualization-tools.md @@ -27,7 +27,7 @@ Use visualization tools to query data stored in {{% product-name %}}. The following visualization tools support querying InfluxDB with SQL: - [Grafana](/influxdb3/cloud-serverless/process-data/visualize/grafana/) -- [Power BI](/influxdb3/cloud-serverless/process-data/visualize/powerbi/) +- [Power BI](/influxdb3/cloud-serverless/visualize-data/powerbi/) - [Superset](/influxdb3/cloud-serverless/process-data/visualize/superset/) - [Tableau](/influxdb3/cloud-serverless/process-data/visualize/tableau/) diff --git a/content/influxdb3/clustered/query-data/execute-queries/visualization-tools.md b/content/influxdb3/clustered/query-data/execute-queries/visualization-tools.md index e942ded97..b8ff5dee8 100644 --- a/content/influxdb3/clustered/query-data/execute-queries/visualization-tools.md +++ b/content/influxdb3/clustered/query-data/execute-queries/visualization-tools.md @@ -27,7 +27,7 @@ Use visualization tools to query data stored in {{% product-name %}} with SQL. The following visualization tools support querying InfluxDB with SQL: - [Grafana](/influxdb3/clustered/process-data/visualize/grafana/) -- [Power BI](/influxdb3/clustered/process-data/visualize/powerbi/) +- [Power BI](/influxdb3/clustered/visualize-data/powerbi/) - [Superset](/influxdb3/clustered/process-data/visualize/superset/) - [Tableau](/influxdb3/clustered/process-data/visualize/tableau/) From e1f83584e25fdd60189c8dbeb2487692decb8127 Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Wed, 18 Mar 2026 11:25:49 -0500 Subject: [PATCH 4/7] fix(influxdb3): backfill missing product URLs in localStorage (#6961) * fix(influxdb3): backfill missing product URLs in localStorage Returning visitors with stale localStorage (created before core/enterprise products were added) had undefined URL values for new products. The updateUrls() function then replaced Hugo-rendered hostnames like localhost:8181 with the string "undefined" in api-endpoint blocks. Fix by merging DEFAULT_STORAGE_URLS as fallbacks when reading from localStorage, so new product keys are always present. closes #6960 https://claude.ai/code/session_01GJZ2yMR5DBk1feqTD5LeHW * test(influxdb3): add Cypress tests for localStorage URL backfill Adds 2 E2E tests for the fix in #6960: 1. Stale localStorage (missing `core` key) should not cause "undefined" to appear in api-endpoint or code blocks on the plugins page. 2. Fresh localStorage should be initialized with all expected product URL keys (oss, cloud, core, enterprise, serverless, dedicated, clustered). Run with: node cypress/support/run-e2e-specs.js --spec "cypress/e2e/influxdb-url.cy.js" --no-mapping https://claude.ai/code/session_01GJZ2yMR5DBk1feqTD5LeHW --------- Co-authored-by: Claude --- assets/js/services/local-storage.js | 9 ++-- cypress/e2e/influxdb-url.cy.js | 80 +++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 cypress/e2e/influxdb-url.cy.js diff --git a/assets/js/services/local-storage.js b/assets/js/services/local-storage.js index 8efccde12..22b778733 100644 --- a/assets/js/services/local-storage.js +++ b/assets/js/services/local-storage.js @@ -117,7 +117,10 @@ function getInfluxDBUrls() { initializeStorageItem('urls', JSON.stringify(DEFAULT_STORAGE_URLS)); } - return JSON.parse(localStorage.getItem(urlStorageKey)); + const storedUrls = JSON.parse(localStorage.getItem(urlStorageKey)); + // Backfill any new default keys missing from stored data (e.g., when new + // products like core/enterprise are added after a user's first visit). + return { ...DEFAULT_STORAGE_URLS, ...storedUrls }; } // Get the current or previous URL for a specific product or a custom url @@ -131,8 +134,8 @@ function getInfluxDBUrl(product) { const urlsString = localStorage.getItem(urlStorageKey); const urlsObj = JSON.parse(urlsString); - // Return the URL of the specified product - return urlsObj[product]; + // Return the URL of the specified product, falling back to the default + return urlsObj[product] ?? DEFAULT_STORAGE_URLS[product]; } /* diff --git a/cypress/e2e/influxdb-url.cy.js b/cypress/e2e/influxdb-url.cy.js new file mode 100644 index 000000000..7203e69d8 --- /dev/null +++ b/cypress/e2e/influxdb-url.cy.js @@ -0,0 +1,80 @@ +/// + +/** + * InfluxDB URL localStorage E2E Test Suite + * + * Tests that the InfluxDB URL replacement logic in influxdb-url.js handles + * localStorage correctly, including stale data from returning visitors. + * + * Regression tests for https://github.com/influxdata/docs-v2/issues/6960 + * where stale localStorage missing the `core` key caused JavaScript to + * replace rendered hostnames with "undefined" in code blocks. + */ + +const STORAGE_KEY = 'influxdata_docs_urls'; +const TEST_PAGE = '/influxdb3/core/plugins/'; +const EXPECTED_PRODUCT_KEYS = [ + 'oss', + 'cloud', + 'core', + 'enterprise', + 'serverless', + 'dedicated', + 'clustered', +]; + +describe('InfluxDB URL - localStorage', function () { + it('should not render "undefined" in code blocks when localStorage is missing product keys', function () { + // Simulate a returning visitor whose localStorage was created before + // core/enterprise products were added — missing those keys entirely. + const staleUrls = { + oss: 'http://localhost:8086', + cloud: 'https://us-west-2-1.aws.cloud2.influxdata.com', + prev_oss: 'http://localhost:8086', + prev_cloud: 'https://us-west-2-1.aws.cloud2.influxdata.com', + custom: '', + }; + + cy.visit(TEST_PAGE, { + onBeforeLoad(win) { + win.localStorage.setItem(STORAGE_KEY, JSON.stringify(staleUrls)); + }, + }); + + // The api-endpoint block should show the default Core host, not "undefined" + cy.get('.article--content pre.api-endpoint') + .first() + .should('contain', 'localhost:8181') + .and('not.contain', 'undefined'); + + // No code block in the article should contain "undefined" as a bare host + cy.get('.article--content pre:not(.preserve)').each(($el) => { + cy.wrap($el).invoke('text').should('not.match', /undefined\/api\//); + }); + }); + + it('should backfill all expected product URL keys into localStorage', function () { + cy.visit(TEST_PAGE, { + onBeforeLoad(win) { + // Start with no stored URLs — forces initialization + win.localStorage.removeItem(STORAGE_KEY); + }, + }); + + // After the page loads and JS initializes, localStorage should contain + // all expected product keys with non-empty URL values. + cy.window().then((win) => { + const stored = JSON.parse(win.localStorage.getItem(STORAGE_KEY)); + expect(stored).to.be.an('object'); + + EXPECTED_PRODUCT_KEYS.forEach((key) => { + expect(stored, `stored URLs should have key "${key}"`).to.have.property( + key + ); + expect(stored[key], `"${key}" should be a non-empty string`).to.be.a( + 'string' + ).and.not.be.empty; + }); + }); + }); +}); From 04f6b973bc311a551a925f2e185cf0dc9a0746c5 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Wed, 18 Mar 2026 16:09:00 -0500 Subject: [PATCH 5/7] Remove `>` CLI prompts from runnable code blocks in InfluxQL/Flux/MongoDB docs (#6948) * Initial plan * fix(docs): remove > prompt from runnable code blocks Remove leading `>` CLI prompt characters from code blocks that are meant to be executed by users. Only keep `>` in code blocks that demonstrate console output (showing both the command at the prompt AND the result output). Changes affect 34 files across InfluxDB v1, Enterprise InfluxDB, shared influxql-v3 reference, and Telegraf content: - InfluxQL queries and management commands (sql/bash/no-lang blocks) - Flux REPL examples (js blocks) - MongoDB shell commands (shell blocks) Preserved (unchanged): - Console session blocks showing command + output (Type B: mixed > and non-> lines) - Telegraf metric output blocks (text language with > measurement,tags format) - diff blocks with < and > diff markers Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com> * Apply suggestions from code review * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Apply suggestions from code review * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Update content/enterprise_influxdb/v1/query_language/continuous_queries.md --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jstirnaman <212227+jstirnaman@users.noreply.github.com> Co-authored-by: Jason Stirnaman Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../manage/clusters/rebalance.md | 4 +- .../authorization-influxql.md | 22 +++---- .../v1/flux/get-started/syntax-basics.md | 8 +-- .../v1/guides/downsample_and_retain.md | 6 +- .../v1/query_language/continuous_queries.md | 3 +- .../v1/query_language/explore-data.md | 25 ++++---- .../v1/query_language/manage-database.md | 58 +++++++++---------- .../v1/query_language/sample-data.md | 6 +- .../v1/query_language/spec.md | 2 +- .../v1/tools/influx-cli/use-influx-cli.md | 4 +- .../v1/troubleshooting/errors.md | 12 ++-- .../frequently-asked-questions.md | 18 +++--- .../line_protocol_reference.md | 22 +++---- .../write_protocols/line_protocol_tutorial.md | 6 +- .../authentication_and_authorization.md | 36 ++++++------ .../v1/flux/get-started/syntax-basics.md | 8 +-- .../v1/guides/downsample_and_retain.md | 6 +- .../v1/introduction/get-started/_index.md | 12 ++-- .../v1/query_language/continuous_queries.md | 4 +- .../v1/query_language/explore-data.md | 26 ++++----- .../v1/query_language/manage-database.md | 52 ++++++++--------- .../influxdb/v1/query_language/sample-data.md | 4 +- content/influxdb/v1/query_language/spec.md | 2 +- .../v1/tools/influx-cli/use-influx-cli.md | 4 +- content/influxdb/v1/troubleshooting/errors.md | 12 ++-- .../frequently-asked-questions.md | 18 +++--- .../line_protocol_reference.md | 22 +++---- .../write_protocols/line_protocol_tutorial.md | 6 +- .../upgrade/v1-to-v2/automatic-upgrade.md | 4 +- .../explore-data/time-and-timezone.md | 2 +- .../query-data/influxql/manage-data.md | 4 +- .../reference/syntax/influxql/spec.md | 2 +- .../shared/influxql-v3-reference/_index.md | 2 +- .../v1/input-plugins/mongodb/_index.md | 2 +- 34 files changed, 211 insertions(+), 213 deletions(-) diff --git a/content/enterprise_influxdb/v1/administration/manage/clusters/rebalance.md b/content/enterprise_influxdb/v1/administration/manage/clusters/rebalance.md index 020133649..75bc3778c 100644 --- a/content/enterprise_influxdb/v1/administration/manage/clusters/rebalance.md +++ b/content/enterprise_influxdb/v1/administration/manage/clusters/rebalance.md @@ -289,8 +289,8 @@ Run the query on any data node for each retention policy and database. Here, we use InfluxDB's [CLI](/enterprise_influxdb/v1/tools/influx-cli/use-influx/) to execute the query: ``` -> ALTER RETENTION POLICY "" ON "" REPLICATION 3 -> +ALTER RETENTION POLICY "" ON "" REPLICATION 3 + ``` A successful `ALTER RETENTION POLICY` query returns no results. diff --git a/content/enterprise_influxdb/v1/administration/manage/users-and-permissions/authorization-influxql.md b/content/enterprise_influxdb/v1/administration/manage/users-and-permissions/authorization-influxql.md index f9bcf1bf6..a132289b7 100644 --- a/content/enterprise_influxdb/v1/administration/manage/users-and-permissions/authorization-influxql.md +++ b/content/enterprise_influxdb/v1/administration/manage/users-and-permissions/authorization-influxql.md @@ -124,11 +124,11 @@ CREATE USER WITH PASSWORD '' ###### CLI example ```js -> CREATE USER todd WITH PASSWORD 'influxdb41yf3' -> CREATE USER alice WITH PASSWORD 'wonder\'land' -> CREATE USER "rachel_smith" WITH PASSWORD 'asdf1234!' -> CREATE USER "monitoring-robot" WITH PASSWORD 'XXXXX' -> CREATE USER "$savyadmin" WITH PASSWORD 'm3tr1cL0v3r' +CREATE USER todd WITH PASSWORD 'influxdb41yf3' +CREATE USER alice WITH PASSWORD 'wonder\'land' +CREATE USER "rachel_smith" WITH PASSWORD 'asdf1234!' +CREATE USER "monitoring-robot" WITH PASSWORD 'XXXXX' +CREATE USER "$savyadmin" WITH PASSWORD 'm3tr1cL0v3r' ``` {{% note %}} @@ -169,13 +169,13 @@ CLI examples: `GRANT` `READ` access to `todd` on the `NOAA_water_database` database: ```sql -> GRANT READ ON "NOAA_water_database" TO "todd" +GRANT READ ON "NOAA_water_database" TO "todd" ``` `GRANT` `ALL` access to `todd` on the `NOAA_water_database` database: ```sql -> GRANT ALL ON "NOAA_water_database" TO "todd" +GRANT ALL ON "NOAA_water_database" TO "todd" ``` ##### `REVOKE` `READ`, `WRITE`, or `ALL` database privileges from an existing user @@ -189,13 +189,13 @@ CLI examples: `REVOKE` `ALL` privileges from `todd` on the `NOAA_water_database` database: ```sql -> REVOKE ALL ON "NOAA_water_database" FROM "todd" +REVOKE ALL ON "NOAA_water_database" FROM "todd" ``` `REVOKE` `WRITE` privileges from `todd` on the `NOAA_water_database` database: ```sql -> REVOKE WRITE ON "NOAA_water_database" FROM "todd" +REVOKE WRITE ON "NOAA_water_database" FROM "todd" ``` {{% note %}} @@ -230,7 +230,7 @@ SET PASSWORD FOR = '' CLI example: ```sql -> SET PASSWORD FOR "todd" = 'password4todd' +SET PASSWORD FOR "todd" = 'password4todd' ``` {{% note %}} @@ -250,6 +250,6 @@ DROP USER CLI example: ```sql -> DROP USER "todd" +DROP USER "todd" ``` diff --git a/content/enterprise_influxdb/v1/flux/get-started/syntax-basics.md b/content/enterprise_influxdb/v1/flux/get-started/syntax-basics.md index e48c0b79b..710cbb2bb 100644 --- a/content/enterprise_influxdb/v1/flux/get-started/syntax-basics.md +++ b/content/enterprise_influxdb/v1/flux/get-started/syntax-basics.md @@ -28,9 +28,9 @@ For example, simple addition: Assign an expression to a variable using the assignment operator, `=`. ```js -> s = "this is a string" -> i = 1 // an integer -> f = 2.0 // a floating point number +s = "this is a string" +i = 1 // an integer +f = 2.0 // a floating point number ``` Type the name of a variable to print its value: @@ -48,7 +48,7 @@ this is a string Flux also supports records. Each value in a record can be a different data type. ```js -> o = {name:"Jim", age: 42, "favorite color": "red"} +o = {name:"Jim", age: 42, "favorite color": "red"} ``` Use **dot notation** to access a properties of a record: diff --git a/content/enterprise_influxdb/v1/guides/downsample_and_retain.md b/content/enterprise_influxdb/v1/guides/downsample_and_retain.md index c544c276e..81c4238fd 100644 --- a/content/enterprise_influxdb/v1/guides/downsample_and_retain.md +++ b/content/enterprise_influxdb/v1/guides/downsample_and_retain.md @@ -70,7 +70,7 @@ the CQ has no `FOR` clause. #### 1. Create the database ```sql -> CREATE DATABASE "food_data" +CREATE DATABASE "food_data" ``` #### 2. Create a two-hour `DEFAULT` retention policy @@ -85,7 +85,7 @@ Use the statement to create a `DEFAULT` RP: ```sql -> CREATE RETENTION POLICY "two_hours" ON "food_data" DURATION 2h REPLICATION 1 DEFAULT +CREATE RETENTION POLICY "two_hours" ON "food_data" DURATION 2h REPLICATION 1 DEFAULT ``` That query creates an RP called `two_hours` that exists in the database @@ -116,7 +116,7 @@ Use the statement to create a non-`DEFAULT` retention policy: ```sql -> CREATE RETENTION POLICY "a_year" ON "food_data" DURATION 52w REPLICATION 1 +CREATE RETENTION POLICY "a_year" ON "food_data" DURATION 52w REPLICATION 1 ``` That query creates a retention policy (RP) called `a_year` that exists in the database diff --git a/content/enterprise_influxdb/v1/query_language/continuous_queries.md b/content/enterprise_influxdb/v1/query_language/continuous_queries.md index 1ca7d56b7..76cb98168 100644 --- a/content/enterprise_influxdb/v1/query_language/continuous_queries.md +++ b/content/enterprise_influxdb/v1/query_language/continuous_queries.md @@ -839,8 +839,7 @@ DROP CONTINUOUS QUERY ON Drop the `idle_hands` CQ from the `telegraf` database: ```sql -> DROP CONTINUOUS QUERY "idle_hands" ON "telegraf"` -> +DROP CONTINUOUS QUERY "idle_hands" ON "telegraf" ``` ### Altering continuous queries diff --git a/content/enterprise_influxdb/v1/query_language/explore-data.md b/content/enterprise_influxdb/v1/query_language/explore-data.md index a4b880ed7..1cf896f9b 100644 --- a/content/enterprise_influxdb/v1/query_language/explore-data.md +++ b/content/enterprise_influxdb/v1/query_language/explore-data.md @@ -380,8 +380,7 @@ The following query returns no data because it specifies a single tag key (`loca the `SELECT` clause: ```sql -> SELECT "location" FROM "h2o_feet" -> +SELECT "location" FROM "h2o_feet" ``` To return any data associated with the `location` tag key, the query's `SELECT` @@ -597,7 +596,7 @@ separating logic with parentheses. #### Select data that have specific timestamps ```sql -> SELECT * FROM "h2o_feet" WHERE time > now() - 7d +SELECT * FROM "h2o_feet" WHERE time > now() - 7d ``` The query returns data from the `h2o_feet` measurement that have [timestamps](/enterprise_influxdb/v1/concepts/glossary/#timestamp) @@ -1592,8 +1591,8 @@ the query's time range. Note that `fill(800)` has no effect on the query results. ```sql -> SELECT MEAN("water_level") FROM "h2o_feet" WHERE "location" = 'coyote_creek' AND time >= '2015-09-18T22:00:00Z' AND time <= '2015-09-18T22:18:00Z' GROUP BY time(12m) fill(800) -> +SELECT MEAN("water_level") FROM "h2o_feet" WHERE "location" = 'coyote_creek' AND time >= '2015-09-18T22:00:00Z' AND time <= '2015-09-18T22:18:00Z' GROUP BY time(12m) fill(800) + ``` ##### Queries with `fill(previous)` when the previous result falls outside the query's time range @@ -2639,7 +2638,7 @@ The whitespace between `-` or `+` and the [duration literal](/enterprise_influxd #### Specify a time range with relative time ```sql -> SELECT "water_level" FROM "h2o_feet" WHERE time > now() - 1h +SELECT "water_level" FROM "h2o_feet" WHERE time > now() - 1h ``` The query returns data with timestamps that occur within the past hour. @@ -2686,7 +2685,7 @@ a `GROUP BY time()` clause must provide an alternative upper bound in the Use the [CLI](/enterprise_influxdb/v1/tools/influx-cli/use-influx/) to write a point to the `NOAA_water_database` that occurs after `now()`: ```sql -> INSERT h2o_feet,location=santa_monica water_level=3.1 1587074400000000000 +INSERT h2o_feet,location=santa_monica water_level=3.1 1587074400000000000 ``` Run a `GROUP BY time()` query that covers data with timestamps between @@ -2722,8 +2721,8 @@ the lower bound to `now()` such that the query's time range is between `now()` and `now()`: ```sql -> SELECT MEAN("water_level") FROM "h2o_feet" WHERE "location"='santa_monica' AND time >= now() GROUP BY time(12m) fill(none) -> +SELECT MEAN("water_level") FROM "h2o_feet" WHERE "location"='santa_monica' AND time >= now() GROUP BY time(12m) fill(none) + ``` ### Configuring the returned timestamps @@ -2831,8 +2830,8 @@ includes an `m` and `water_level` is greater than three. #### Use a regular expression to specify a tag with no value in the WHERE clause ```sql -> SELECT * FROM "h2o_feet" WHERE "location" !~ /./ -> +SELECT * FROM "h2o_feet" WHERE "location" !~ /./ + ``` The query selects all data from the `h2o_feet` measurement where the `location` @@ -2989,8 +2988,8 @@ The query returns the integer form of `water_level`'s float [field values](/ente #### Cast float field values to strings (this functionality is not supported) ```sql -> SELECT "water_level"::string FROM "h2o_feet" LIMIT 4 -> +SELECT "water_level"::string FROM "h2o_feet" LIMIT 4 + ``` The query returns no data as casting a float field value to a string is not diff --git a/content/enterprise_influxdb/v1/query_language/manage-database.md b/content/enterprise_influxdb/v1/query_language/manage-database.md index d57aa6efd..45b5848fe 100644 --- a/content/enterprise_influxdb/v1/query_language/manage-database.md +++ b/content/enterprise_influxdb/v1/query_language/manage-database.md @@ -87,8 +87,8 @@ If you attempt to create a database that already exists, InfluxDB does nothing a ##### Create a database ``` -> CREATE DATABASE "NOAA_water_database" -> +CREATE DATABASE "NOAA_water_database" + ``` The query creates a database called `NOAA_water_database`. @@ -97,8 +97,8 @@ The query creates a database called `NOAA_water_database`. ##### Create a database with a specific retention policy ``` -> CREATE DATABASE "NOAA_water_database" WITH DURATION 3d REPLICATION 1 SHARD DURATION 1h NAME "liquid" -> +CREATE DATABASE "NOAA_water_database" WITH DURATION 3d REPLICATION 1 SHARD DURATION 1h NAME "liquid" + ``` The query creates a database called `NOAA_water_database`. @@ -114,8 +114,8 @@ DROP DATABASE Drop the database NOAA_water_database: ```bash -> DROP DATABASE "NOAA_water_database" -> +DROP DATABASE "NOAA_water_database" + ``` A successful `DROP DATABASE` query returns an empty result. @@ -135,19 +135,19 @@ DROP SERIES FROM WHERE =' DROP SERIES FROM "h2o_feet" +DROP SERIES FROM "h2o_feet" ``` Drop series with a specific tag pair from a single measurement: ```sql -> DROP SERIES FROM "h2o_feet" WHERE "location" = 'santa_monica' +DROP SERIES FROM "h2o_feet" WHERE "location" = 'santa_monica' ``` Drop all points in the series that have a specific tag pair from all measurements in the database: ```sql -> DROP SERIES WHERE "location" = 'santa_monica' +DROP SERIES WHERE "location" = 'santa_monica' ``` A successful `DROP SERIES` query returns an empty result. @@ -168,25 +168,25 @@ DELETE FROM WHERE [=''] | [