From e481e68a01d3cb0ca5f6195093fd2db440dd16b5 Mon Sep 17 00:00:00 2001 From: meelahme Date: Fri, 18 Apr 2025 13:14:21 -0700 Subject: [PATCH 01/24] updating database create for consistency --- content/shared/influxdb3-cli/delete/database.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/shared/influxdb3-cli/delete/database.md b/content/shared/influxdb3-cli/delete/database.md index cba8750afb..d5f5311310 100644 --- a/content/shared/influxdb3-cli/delete/database.md +++ b/content/shared/influxdb3-cli/delete/database.md @@ -11,7 +11,7 @@ influxdb3 delete database [OPTIONS] ## Arguments -- **DATABASE_NAME**: The name of the database to delete. +- **DATABASE_NAME**: The name of the database to delete. Valid database names are alphanumeric and start with a letter or number. Dashes (`-`) and underscores (`_`) are allowed. Environment variable: `INFLUXDB3_DATABASE_NAME` From 0c85184b22d89e34a8a5258b268654f685a68501 Mon Sep 17 00:00:00 2001 From: meelahme Date: Fri, 18 Apr 2025 13:39:36 -0700 Subject: [PATCH 02/24] Adding distinct cache value example --- .../influxdb3-cli/create/distinct_cache.md | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/content/shared/influxdb3-cli/create/distinct_cache.md b/content/shared/influxdb3-cli/create/distinct_cache.md index 008a5e965a..63df8c30f6 100644 --- a/content/shared/influxdb3-cli/create/distinct_cache.md +++ b/content/shared/influxdb3-cli/create/distinct_cache.md @@ -49,4 +49,33 @@ You can use the following environment variables to set command options: | `INFLUXDB3_DATABASE_NAME` | `--database` | | `INFLUXDB3_AUTH_TOKEN` | `--token` | - +## Examples + +### Create a distinct value cache + +{{% code-placeholders "(DATABASE|TABLE|COLUMN|CACHE)_NAME" %}} + + + +```bash +influxdb3 create distinct_cache \ + --database DATABASE_NAME \ + --table TABLE_NAME \ + --column COLUMN_NAME \ + CACHE_NAME +``` + +{{% /code-placeholders %}} + +In the example above, replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: + Database name +- {{% code-placeholder-key %}}`TABLE_NAME`{{% /code-placeholder-key %}}: + Table name +- {{% code-placeholder-key %}}`CACHE_NAME`{{% /code-placeholder-key %}}: + Name of the distinct value cache to delete +- {{% code-placeholder-key %}}`COLUMN_NAME`{{% /code-placeholder-key %}}: Column to cache distinct values from + + + From 4746e6ed2ad230b4859dbac68e5e8b57282af2af Mon Sep 17 00:00:00 2001 From: meelahme Date: Fri, 18 Apr 2025 13:59:52 -0700 Subject: [PATCH 03/24] Adding a create last value cache example --- .../shared/influxdb3-cli/create/last_cache.md | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/content/shared/influxdb3-cli/create/last_cache.md b/content/shared/influxdb3-cli/create/last_cache.md index e155cba7ab..79eff93e9a 100644 --- a/content/shared/influxdb3-cli/create/last_cache.md +++ b/content/shared/influxdb3-cli/create/last_cache.md @@ -38,4 +38,29 @@ You can use the following environment variables to set command options: | `INFLUXDB3_DATABASE_NAME` | `--database` | | `INFLUXDB3_AUTH_TOKEN` | `--token` | - +## Examples + +### Create a last value cache + +{{% code-placeholders "(DATABASE|TABLE|CACHE)_NAME (TAG_COLUMN|FIELD_COLUMN)" %}} + + + +```bash +influxdb3 create last_cache \ + --database DATABASE_NAME \ + --table TABLE_NAME \ + --tag-columns TAG_COLUMN \ + --field-columns FIELD_COLUMN \ + CACHE_NAME +``` + +{{% /code-placeholders %}} + +In the example above, replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: Database name +- {{% code-placeholder-key %}}`TABLE_NAME`{{% /code-placeholder-key %}}: Table name +- {{% code-placeholder-key %}}`TAG_COLUMN`{{% /code-placeholder-key %}}: Column to use as a tag key for the cache +- {{% code-placeholder-key %}}`FIELD_COLUM`N{{% /code-placeholder-key %}}: Column to cache the last value from +- {{% code-placeholder-key %}}`CACHE_NAME`{{% /code-placeholder-key %}}: Name for the new last value cache \ No newline at end of file From 22c9fc486db21209c09ee4c691dbc268ef5e8c97 Mon Sep 17 00:00:00 2001 From: meelahme Date: Fri, 18 Apr 2025 14:18:13 -0700 Subject: [PATCH 04/24] Adding a create plugin example --- content/shared/influxdb3-cli/create/plugin.md | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/content/shared/influxdb3-cli/create/plugin.md b/content/shared/influxdb3-cli/create/plugin.md index 07271a8da5..ad95c47b76 100644 --- a/content/shared/influxdb3-cli/create/plugin.md +++ b/content/shared/influxdb3-cli/create/plugin.md @@ -39,4 +39,27 @@ You can use the following environment variables to set command options: | `INFLUXDB3_DATABASE_NAME` | `--database` | | `INFLUXDB3_AUTH_TOKEN` | `--token` | - +## Examples + +### Create a plugin + +{{% code-placeholders "(DATABASE|PLUGIN)_NAME (FILENAME|FUNCTION_NAME)" %}} + + + +```bash +influxdb3 create plugin \ + --database DATABASE_NAME \ + --filename FILENAME.py \ + --entry-point FUNCTION_NAME \ + PLUGIN_NAME +``` + +{{% /code-placeholders %}} + +In the example above, replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: Database name +- {{% code-placeholder-key %}}`FILENAME.py`{{% /code-placeholder-key %}}: Name of the plugin Python file (must be in the plugin directory) +- {{% code-placeholder-key %}}`FUNCTION_NAME`{{% /code-placeholder-key %}}: Name of the function in the Python file to use as the entry point +- {{% code-placeholder-key %}}`PLUGIN_NAME`{{% /code-placeholder-key %}}: Name for the new plugin \ No newline at end of file From 4f11fc160b5d422988ee83ca2aeda317282625c8 Mon Sep 17 00:00:00 2001 From: meelahme Date: Fri, 18 Apr 2025 14:42:01 -0700 Subject: [PATCH 05/24] adding a creating token example --- content/shared/influxdb3-cli/create/token.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/content/shared/influxdb3-cli/create/token.md b/content/shared/influxdb3-cli/create/token.md index 276f32151f..253a2914c3 100644 --- a/content/shared/influxdb3-cli/create/token.md +++ b/content/shared/influxdb3-cli/create/token.md @@ -6,11 +6,24 @@ The `influxdb3 create token` command creates a new authentication token. ```bash -influxdb3 create token +influxdb3 create token ``` ## Options | Option | | Description | | :----- | :------- | :--------------------- | +| |`-- admin`| Create an admin token | | `-h` | `--help` | Print help information | + +## Examples + +### Create an admin token + + + +```bash +influxdb3 create token --admin +``` + +This creates an admin token with full access to the system. From 419955462b63a7c1274a0e09f5fb2d2ceb00bd7a Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Fri, 18 Apr 2025 15:33:04 -0700 Subject: [PATCH 06/24] Update content/shared/influxdb3-cli/create/token.md Co-authored-by: Jason Stirnaman --- content/shared/influxdb3-cli/create/token.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/shared/influxdb3-cli/create/token.md b/content/shared/influxdb3-cli/create/token.md index 253a2914c3..ac8c775e71 100644 --- a/content/shared/influxdb3-cli/create/token.md +++ b/content/shared/influxdb3-cli/create/token.md @@ -6,7 +6,7 @@ The `influxdb3 create token` command creates a new authentication token. ```bash -influxdb3 create token +influxdb3 create token ``` ## Options From d72eccddc9600ef15ce2a51913696f0f824e5886 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Fri, 18 Apr 2025 15:33:10 -0700 Subject: [PATCH 07/24] Update content/shared/influxdb3-cli/create/token.md Co-authored-by: Jason Stirnaman --- content/shared/influxdb3-cli/create/token.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/shared/influxdb3-cli/create/token.md b/content/shared/influxdb3-cli/create/token.md index ac8c775e71..cc96802538 100644 --- a/content/shared/influxdb3-cli/create/token.md +++ b/content/shared/influxdb3-cli/create/token.md @@ -13,7 +13,7 @@ influxdb3 create token | Option | | Description | | :----- | :------- | :--------------------- | -| |`-- admin`| Create an admin token | +| |`--admin`| Create an admin token | | `-h` | `--help` | Print help information | ## Examples From 07aded068688acb91ff278db2c26b447a24d6047 Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 30 Apr 2025 15:53:24 -0700 Subject: [PATCH 08/24] Remove plugin.md from create CLI commands --- content/shared/influxdb3-cli/create/plugin.md | 68 ------------------- 1 file changed, 68 deletions(-) delete mode 100644 content/shared/influxdb3-cli/create/plugin.md diff --git a/content/shared/influxdb3-cli/create/plugin.md b/content/shared/influxdb3-cli/create/plugin.md deleted file mode 100644 index 08488faef2..0000000000 --- a/content/shared/influxdb3-cli/create/plugin.md +++ /dev/null @@ -1,68 +0,0 @@ - -The `influxdb3 create plugin` command creates a new processing engine plugin. - -## Usage - - - -```bash -influxdb3 create plugin [OPTIONS] \ - --database \ - --token \ - --filename \ - --entry-point \ - -``` - -## Arguments - -- **PLUGIN_NAME**: The name of the plugin to create. - -## Options - -| Option | | Description | -| :----- | :-------------- | :--------------------------------------------------------------------------------------- | -| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) | -| `-d` | `--database` | _({{< req >}})_ Name of the database to operate on | -| | `--token` | _({{< req >}})_ Authentication token | -| | `--filename` | _({{< req >}})_ Name of the plugin Python file in the plugin directory | -| | `--entry-point` | _({{< req >}})_ Entry point function name for the plugin | -| | `--plugin-type` | Type of trigger the plugin processes (default is `wal_rows`) | -| | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) | -| `-h` | `--help` | Print help information | -| | `--help-all` | Print detailed help information | - -### Option environment variables - -You can use the following environment variables to set command options: - -| Environment Variable | Option | -| :------------------------ | :----------- | -| `INFLUXDB3_HOST_URL` | `--host` | -| `INFLUXDB3_DATABASE_NAME` | `--database` | -| `INFLUXDB3_AUTH_TOKEN` | `--token` | - -## Examples - -### Create a plugin - -{{% code-placeholders "(DATABASE|PLUGIN)_NAME (FILENAME|FUNCTION_NAME)" %}} - - - -```bash -influxdb3 create plugin \ - --database DATABASE_NAME \ - --filename FILENAME.py \ - --entry-point FUNCTION_NAME \ - PLUGIN_NAME -``` - -{{% /code-placeholders %}} - -In the example above, replace the following: - -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: Database name -- {{% code-placeholder-key %}}`FILENAME.py`{{% /code-placeholder-key %}}: Name of the plugin Python file (must be in the plugin directory) -- {{% code-placeholder-key %}}`FUNCTION_NAME`{{% /code-placeholder-key %}}: Name of the function in the Python file to use as the entry point -- {{% code-placeholder-key %}}`PLUGIN_NAME`{{% /code-placeholder-key %}}: Name for the new plugin \ No newline at end of file From 481575eca4c7f16476c12137b1273e41590b5a8d Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 30 Apr 2025 16:02:39 -0700 Subject: [PATCH 09/24] Remove plugin.md from delete CLI commands --- content/shared/influxdb3-cli/delete/plugin.md | 61 ------------------- 1 file changed, 61 deletions(-) delete mode 100644 content/shared/influxdb3-cli/delete/plugin.md diff --git a/content/shared/influxdb3-cli/delete/plugin.md b/content/shared/influxdb3-cli/delete/plugin.md deleted file mode 100644 index 9aca888af0..0000000000 --- a/content/shared/influxdb3-cli/delete/plugin.md +++ /dev/null @@ -1,61 +0,0 @@ - -The `influxdb3 delete plugin` command deletes a processing engine plugin. - -## Usage - - - -```bash -influxdb3 delete plugin [OPTIONS] --database -``` - -## Arguments - -- **PLUGIN_NAME**: The name of the plugin to delete. - -## Options - -| Option | | Description | -| :----- | :----------- | :--------------------------------------------------------------------------------------- | -| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) | -| `-d` | `--database` | _({{< req >}})_ Name of the database to operate on | -| | `--token` | _({{< req >}})_ Authentication token | -| | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) | -| `-h` | `--help` | Print help information | -| | `--help-all` | Print detailed help information | - -### Option environment variables - -You can use the following environment variables to set command options: - -| Environment Variable | Option | -| :------------------------ | :----------- | -| `INFLUXDB3_HOST_URL` | `--host` | -| `INFLUXDB3_DATABASE_NAME` | `--database` | -| `INFLUXDB3_AUTH_TOKEN` | `--token` | - -## Examples - -### Delete a plugin - -{{% code-placeholders "(DATABASE|PLUGIN)_NAME|AUTH_TOKEN" %}} - - - -```bash -influxdb3 delete plugin \ - --database DATABASE_NAME \ - --token AUTH_TOKEN \ - PLUGIN_NAME -``` - -{{% /code-placeholders %}} - -In the example above, replace the following: - -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: - Database name -- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: - Authentication token -- {{% code-placeholder-key %}}`PLUGIN_NAME`{{% /code-placeholder-key %}}: - Name of the plugin to delete From 98d8d6e58836e9e7e5e14a725877630d3de4a29f Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 30 Apr 2025 16:23:05 -0700 Subject: [PATCH 10/24] chore(cli): remove plugin.md files and references from create/delete commands --- content/shared/influxdb3-cli/create/_index.md | 1 - content/shared/influxdb3-cli/create/trigger.md | 2 -- 2 files changed, 3 deletions(-) diff --git a/content/shared/influxdb3-cli/create/_index.md b/content/shared/influxdb3-cli/create/_index.md index cf436cf11d..3c9fa9ae2a 100644 --- a/content/shared/influxdb3-cli/create/_index.md +++ b/content/shared/influxdb3-cli/create/_index.md @@ -18,7 +18,6 @@ influxdb3 create | [file_index](/influxdb3/version/reference/cli/influxdb3/create/file_index/) | Create a new file index for a database or table | | [last_cache](/influxdb3/version/reference/cli/influxdb3/create/last_cache/) | Create a new last value cache | | [distinct_cache](/influxdb3/version/reference/cli/influxdb3/create/distinct_cache/) | Create a new distinct value cache | -| [plugin](/influxdb3/version/reference/cli/influxdb3/create/plugin/) | Create a new processing engine plugin | | [table](/influxdb3/version/reference/cli/influxdb3/create/table/) | Create a new table in a database | | [token](/influxdb3/version/reference/cli/influxdb3/create/token/) | Create a new authentication token | | [trigger](/influxdb3/version/reference/cli/influxdb3/create/trigger/) | Create a new trigger for the processing engine | diff --git a/content/shared/influxdb3-cli/create/trigger.md b/content/shared/influxdb3-cli/create/trigger.md index 5c6e7a7630..d869c42112 100644 --- a/content/shared/influxdb3-cli/create/trigger.md +++ b/content/shared/influxdb3-cli/create/trigger.md @@ -10,7 +10,6 @@ processing engine. influxdb3 create trigger [OPTIONS] \ --database \ --token \ - --plugin \ --trigger-spec \ ``` @@ -26,7 +25,6 @@ influxdb3 create trigger [OPTIONS] \ | `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) | | `-d` | `--database` | _({{< req >}})_ Name of the database to operate on | | | `--token` | _({{< req >}})_ Authentication token | -| | `--plugin` | Plugin to execute when the trigger fires | | | `--trigger-spec` | Trigger specification--for example `table:` or `all_tables` | | | `--disabled` | Create the trigger in disabled state | | | `--tls-ca` | Path to a custom TLS certificate authority (for testing or self-signed certificates) | From dfd1a9ceba7b063c4e14ebdd8600e0812b9128b1 Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 30 Apr 2025 16:31:06 -0700 Subject: [PATCH 11/24] chore(cli): remove create plugin.md from enterprise CLI reference --- .../reference/cli/influxdb3/create/plugin.md | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 content/influxdb3/enterprise/reference/cli/influxdb3/create/plugin.md diff --git a/content/influxdb3/enterprise/reference/cli/influxdb3/create/plugin.md b/content/influxdb3/enterprise/reference/cli/influxdb3/create/plugin.md deleted file mode 100644 index 06f2d8f972..0000000000 --- a/content/influxdb3/enterprise/reference/cli/influxdb3/create/plugin.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: influxdb3 create plugin -description: > - The `influxdb3 create plugin` command creates a new processing engine plugin. -menu: - influxdb3_enterprise: - parent: influxdb3 create - name: influxdb3 create plugin -weight: 400 -source: /shared/influxdb3-cli/create/plugin.md ---- - - From b16ea65c05d6c6be86343ce592d770a96c73a6bf Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 30 Apr 2025 16:37:42 -0700 Subject: [PATCH 12/24] chore(cli): remove delete plugin.md from enterprise CLI reference --- .../reference/cli/influxdb3/delete/plugin.md | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 content/influxdb3/enterprise/reference/cli/influxdb3/delete/plugin.md diff --git a/content/influxdb3/enterprise/reference/cli/influxdb3/delete/plugin.md b/content/influxdb3/enterprise/reference/cli/influxdb3/delete/plugin.md deleted file mode 100644 index b72a3cee0a..0000000000 --- a/content/influxdb3/enterprise/reference/cli/influxdb3/delete/plugin.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: influxdb3 delete plugin -description: > - The `influxdb3 delete plugin` command deletes a processing engine plugin. -menu: - influxdb3_enterprise: - parent: influxdb3 delete - name: influxdb3 delete plugin -weight: 400 -source: /shared/influxdb3-cli/delete/last_cache.md ---- - - From 958e0a8c97a4cb6faac7aaad346602dd680ec79e Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 30 Apr 2025 17:49:07 -0700 Subject: [PATCH 13/24] docs: revise create trigger examples for clarity and accuracy --- .../shared/influxdb3-cli/create/trigger.md | 63 ++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/content/shared/influxdb3-cli/create/trigger.md b/content/shared/influxdb3-cli/create/trigger.md index d869c42112..b82b9f4b84 100644 --- a/content/shared/influxdb3-cli/create/trigger.md +++ b/content/shared/influxdb3-cli/create/trigger.md @@ -41,4 +41,65 @@ You can use the following environment variables to set command options: | `INFLUXDB3_DATABASE_NAME` | `--database` | | `INFLUXDB3_AUTH_TOKEN` | `--token` | - +## Examples + +The following examples show how to use the `influxdb3 create trigger` command to create triggers in different scenarios. + + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: Database name +- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: +Authentication token +- {{% code-placeholder-key %}}`TRIGGER_NAME`{{% /code-placeholder-key %}}: +Name of the trigger to create +- {{% code-placeholder-key %}}`TABLE_NAME`{{% /code-placeholder-key %}}: +Name of the table to trigger on + +{{% code-placeholders "(DATABASE|TRIGGER)_NAME|AUTH_TOKEN|TABLE_NAME" %}} + +### Create a trigger for a specific table + +Use this command to create a trigger that processes data from a specific table. + + + +```bash +influxdb3 create trigger \ + --database DATABASE_NAME \ + --token AUTH_TOKEN \ + --trigger-spec table:TABLE_NAME \ + TRIGGER_NAME +``` + +### Create a trigger for all tables + +Use this command to create a trigger that applies to all tables in the specified database. + + + +```bash +influxdb3 create trigger \ + --database DATABASE_NAME \ + --token AUTH_TOKEN \ + --trigger-spec all_tables \ + TRIGGER_NAME +``` + +This is useful when you want a trigger to apply to any table in the database, regardless of name. + +### Create a disabled trigger + +Use this command to create a trigger in a disabled state. You can enable the trigger later using the update trigger command. + + + +```bash +influxdb3 create trigger \ + --disabled \ + --database DATABASE_NAME \ + --token AUTH_TOKEN \ + --trigger-spec table:TABLE_NAME \ + TRIGGER_NAME +``` +Creating a trigger in a disabled state prevents it from running immediately. You can enable it later when you're ready to activate it. + +{{% /code-placeholders %}} From 289c24e881f1938c4d885f2cbd1a719bb2edc1b1 Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 30 Apr 2025 18:03:05 -0700 Subject: [PATCH 14/24] docs(cli): fix last_cache example flags and clarify placeholder keys --- content/shared/influxdb3-cli/create/last_cache.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/shared/influxdb3-cli/create/last_cache.md b/content/shared/influxdb3-cli/create/last_cache.md index 48b75f9c86..446cbe31be 100644 --- a/content/shared/influxdb3-cli/create/last_cache.md +++ b/content/shared/influxdb3-cli/create/last_cache.md @@ -52,8 +52,8 @@ You can use the following environment variables to set command options: influxdb3 create last_cache \ --database DATABASE_NAME \ --table TABLE_NAME \ - --tag-columns TAG_COLUMN \ - --field-columns FIELD_COLUMN \ + --key-columns TAG_COLUMN \ + --value-columns FIELD_COLUMN \ CACHE_NAME ``` @@ -63,6 +63,6 @@ In the example above, replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: Database name - {{% code-placeholder-key %}}`TABLE_NAME`{{% /code-placeholder-key %}}: Table name -- {{% code-placeholder-key %}}`TAG_COLUMN`{{% /code-placeholder-key %}}: Column to use as a tag key for the cache -- {{% code-placeholder-key %}}`FIELD_COLUM`N{{% /code-placeholder-key %}}: Column to cache the last value from -- {{% code-placeholder-key %}}`CACHE_NAME`{{% /code-placeholder-key %}}: Name for the new last value cache \ No newline at end of file +- {{% code-placeholder-key %}}`TAG_COLUMN`{{% /code-placeholder-key %}}: Column to use as the key in the cache +- {{% code-placeholder-key %}}`FIELD_COLUMN`{{% /code-placeholder-key %}}: Column to store as the value in the cache +- {{% code-placeholder-key %}}`CACHE_NAME`{{% /code-placeholder-key %}}: Optional name for the last value cache \ No newline at end of file From 81d88638496f23936767ec99ae09ca0e02bbe786 Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 30 Apr 2025 18:08:43 -0700 Subject: [PATCH 15/24] docs(cli): correcting trigger disable example --- content/shared/influxdb3-cli/create/trigger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/shared/influxdb3-cli/create/trigger.md b/content/shared/influxdb3-cli/create/trigger.md index b82b9f4b84..5dde8a3632 100644 --- a/content/shared/influxdb3-cli/create/trigger.md +++ b/content/shared/influxdb3-cli/create/trigger.md @@ -88,7 +88,7 @@ This is useful when you want a trigger to apply to any table in the database, re ### Create a disabled trigger -Use this command to create a trigger in a disabled state. You can enable the trigger later using the update trigger command. +Use this command to create a trigger in a disabled state. From 156982998a67004fdb4dc99e7e984b33fc05fe5a Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Wed, 30 Apr 2025 18:36:54 -0700 Subject: [PATCH 16/24] Update content/shared/influxdb3-cli/create/distinct_cache.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- content/shared/influxdb3-cli/create/distinct_cache.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/shared/influxdb3-cli/create/distinct_cache.md b/content/shared/influxdb3-cli/create/distinct_cache.md index 48336fc02a..e09f64d31b 100644 --- a/content/shared/influxdb3-cli/create/distinct_cache.md +++ b/content/shared/influxdb3-cli/create/distinct_cache.md @@ -77,7 +77,7 @@ In the example above, replace the following: - {{% code-placeholder-key %}}`TABLE_NAME`{{% /code-placeholder-key %}}: Table name - {{% code-placeholder-key %}}`CACHE_NAME`{{% /code-placeholder-key %}}: - Name of the distinct value cache to delete + Name of the distinct value cache to create - {{% code-placeholder-key %}}`COLUMN_NAME`{{% /code-placeholder-key %}}: Column to cache distinct values from From 87cb0566abbda702800ab358d4a521d62f417d80 Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 30 Apr 2025 21:20:44 -0700 Subject: [PATCH 17/24] docs(cli): updated and add tested examples and setup guidance for create distinct_cache --- .../influxdb3-cli/create/distinct_cache.md | 51 +++++++++++++++++-- content/shared/influxdb3-cli/create/table.md | 17 +++++++ 2 files changed, 63 insertions(+), 5 deletions(-) diff --git a/content/shared/influxdb3-cli/create/distinct_cache.md b/content/shared/influxdb3-cli/create/distinct_cache.md index e09f64d31b..b61f535e8f 100644 --- a/content/shared/influxdb3-cli/create/distinct_cache.md +++ b/content/shared/influxdb3-cli/create/distinct_cache.md @@ -1,4 +1,3 @@ - The `influxdb3 create distinct_cache` command creates a new distinct value cache. ## Usage @@ -52,12 +51,24 @@ You can use the following environment variables to set command options: | `INFLUXDB3_DATABASE_NAME` | `--database` | | `INFLUXDB3_AUTH_TOKEN` | `--token` | -## Examples -### Create a distinct value cache +## Prerequisites +Before creating a distinct value cache, you must: + +- Create a [database](/influxdb3/version/reference/cli/influxdb3/create/database/). + +- Create a [table](/influxdb3/version/reference/cli/influxdb3/create/table/) with the columns you want to cache. + +- Have a valid authentication token. + +## Examples {{% code-placeholders "(DATABASE|TABLE|COLUMN|CACHE)_NAME" %}} +### Generix syntax + +Use this as a template to adapt the command to your environment. + ```bash @@ -68,8 +79,6 @@ influxdb3 create distinct_cache \ CACHE_NAME ``` -{{% /code-placeholders %}} - In the example above, replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: @@ -80,5 +89,37 @@ In the example above, replace the following: Name of the distinct value cache to create - {{% code-placeholder-key %}}`COLUMN_NAME`{{% /code-placeholder-key %}}: Column to cache distinct values from +### Create a distinct value cache for one column + +Use this simple setup to test the cache functionality for a single tag column. It’s helpful when validating basic behavior or building up incrementally. + +```bash +influxdb3 create distinct_cache \ + --database my_test_db \ + --table my_sensor_table \ + --columns room \ + my_room_cache +``` + +### Create a hierarchical cache with constraints + +Use this pattern when you need more control over cache structure and retention. It creates a multilevel cache with resource limits. + +```bash +influxdb3 create distinct_cache \ + --database my_test_db \ + --table my_sensor_table \ + --columns room,sensor_id \ + --max-cardinality 1000 \ + --max-age 30d \ + my_sensor_distinct_cache +``` + +{{% /code-placeholders %}} + +## Common pitfals +- `--column` is not valid—must use `--columns` +- Tokens must be included explicitly unless set via `INFLUXDB3_AUTH_TOKEN` +- Table and column names must already exist or be recognized by the engine diff --git a/content/shared/influxdb3-cli/create/table.md b/content/shared/influxdb3-cli/create/table.md index 53d54b3e9a..7eace2dc55 100644 --- a/content/shared/influxdb3-cli/create/table.md +++ b/content/shared/influxdb3-cli/create/table.md @@ -86,4 +86,21 @@ influxdb3 create table \ TABLE_NAME ``` +### Verification + +Use the following command to confirm that your table was created: + +```bash +influxdb3 query \ + --database DATABASE_NAME \ + --token AUTH_TOKEN \ + "SHOW TABLES" +``` + +If successful, you’ll see a list of tables in the specified database, including the new one. + +>[!Note] +> The `SHOW TABLES SQL` query must be run using the influxdb3 query CLI. +> HTTP requests to /api/v3/query are not supported in local or OSS builds of {{< product-name >}}. + {{% /code-placeholders %}} From 88ec6af7a4b6d0eeee27e5c434b28258f5769667 Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 30 Apr 2025 22:27:57 -0700 Subject: [PATCH 18/24] docs(cli): update table guide with query verification example --- .../influxdb3-cli/create/distinct_cache.md | 6 +- .../shared/influxdb3-cli/create/last_cache.md | 63 +++++++++++++++++-- content/shared/influxdb3-cli/create/table.md | 25 +++++++- 3 files changed, 85 insertions(+), 9 deletions(-) diff --git a/content/shared/influxdb3-cli/create/distinct_cache.md b/content/shared/influxdb3-cli/create/distinct_cache.md index b61f535e8f..26d68ff120 100644 --- a/content/shared/influxdb3-cli/create/distinct_cache.md +++ b/content/shared/influxdb3-cli/create/distinct_cache.md @@ -55,11 +55,11 @@ You can use the following environment variables to set command options: ## Prerequisites Before creating a distinct value cache, you must: -- Create a [database](/influxdb3/version/reference/cli/influxdb3/create/database/). +1. Create a [database](/influxdb3/version/reference/cli/influxdb3/create/database/). -- Create a [table](/influxdb3/version/reference/cli/influxdb3/create/table/) with the columns you want to cache. +2. Create a [table](/influxdb3/version/reference/cli/influxdb3/create/table/) with the columns you want to cache. -- Have a valid authentication token. +3. Have a valid authentication token. ## Examples diff --git a/content/shared/influxdb3-cli/create/last_cache.md b/content/shared/influxdb3-cli/create/last_cache.md index 446cbe31be..ae80988399 100644 --- a/content/shared/influxdb3-cli/create/last_cache.md +++ b/content/shared/influxdb3-cli/create/last_cache.md @@ -6,7 +6,10 @@ The `influxdb3 create last_cache` command creates a new last value cache. ```bash -influxdb3 create last_cache [OPTIONS] --database --table [CACHE_NAME] +influxdb3 create last_cache [OPTIONS] \ + --database \ + --table \ + [CACHE_NAME] ``` ## Arguments @@ -40,9 +43,21 @@ You can use the following environment variables to set command options: | `INFLUXDB3_DATABASE_NAME` | `--database` | | `INFLUXDB3_AUTH_TOKEN` | `--token` | +## Prerequisites + +Before creating a last value cache, you must: + +Before creating a distinct value cache, you must: + +1. Create a [database](/influxdb3/version/reference/cli/influxdb3/create/database/). + +2. Create a [table](/influxdb3/version/reference/cli/influxdb3/create/table/) with the columns you want to cache. + +3. Have a valid authentication token. + ## Examples -### Create a last value cache +### Generic syntax {{% code-placeholders "(DATABASE|TABLE|CACHE)_NAME (TAG_COLUMN|FIELD_COLUMN)" %}} @@ -57,12 +72,50 @@ influxdb3 create last_cache \ CACHE_NAME ``` -{{% /code-placeholders %}} - In the example above, replace the following: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: Database name - {{% code-placeholder-key %}}`TABLE_NAME`{{% /code-placeholder-key %}}: Table name - {{% code-placeholder-key %}}`TAG_COLUMN`{{% /code-placeholder-key %}}: Column to use as the key in the cache - {{% code-placeholder-key %}}`FIELD_COLUMN`{{% /code-placeholder-key %}}: Column to store as the value in the cache -- {{% code-placeholder-key %}}`CACHE_NAME`{{% /code-placeholder-key %}}: Optional name for the last value cache \ No newline at end of file +- {{% code-placeholder-key %}}`CACHE_NAME`{{% /code-placeholder-key %}}: Optional name for the last value cache + +## Create a basic last value cache for one column + +Use this example to create a simple cache for a single key and value column: + + + +```bash +influxdb3 create last_cache \ + --database my_test_db \ + --table my_sensor_table \ + --key-columns room \ + --value-columns temp \ + my_temp_cache +``` + + + +## Create a last value cache with multiple keys and values + +This example shows how to configure a more complex cache: + +```bash +influxdb3 create last_cache \ + --database my_test_db \ + --table my_sensor_table \ + --key-columns room,sensor_id \ + --value-columns temp,hum \ + --count 10 \ + --ttl 1h \ + my_sensor_cache +``` + +{{% /code-placeholders %}} + +## Common pitfalls + +- All specified key and value columns must exist in the table schema. +- Tokens must be passed with `--token` unless set via environment variable. +- If not specified, default values are used for `--count` and `--ttl`. \ No newline at end of file diff --git a/content/shared/influxdb3-cli/create/table.md b/content/shared/influxdb3-cli/create/table.md index 7eace2dc55..98a7f1cff9 100644 --- a/content/shared/influxdb3-cli/create/table.md +++ b/content/shared/influxdb3-cli/create/table.md @@ -90,6 +90,8 @@ influxdb3 create table \ Use the following command to confirm that your table was created: + + ```bash influxdb3 query \ --database DATABASE_NAME \ @@ -97,7 +99,28 @@ influxdb3 query \ "SHOW TABLES" ``` -If successful, you’ll see a list of tables in the specified database, including the new one. +If successful, you’ll see a list of tables in the specified database, including the new one. The expected output should look similar to: + + + +```bash ++---------------+--------------------+----------------------------+------------+ +| table_catalog | table_schema | table_name | table_type | ++---------------+--------------------+----------------------------+------------+ +| public | iox | my_sensor_table | BASE TABLE | +| public | system | distinct_caches | BASE TABLE | +| public | system | last_caches | BASE TABLE | +| public | system | parquet_files | BASE TABLE | +| public | system | processing_engine_logs | BASE TABLE | +| public | system | processing_engine_triggers | BASE TABLE | +| public | system | queries | BASE TABLE | +| public | information_schema | tables | VIEW | +| public | information_schema | views | VIEW | +| public | information_schema | columns | VIEW | +| public | information_schema | df_settings | VIEW | +| public | information_schema | schemata | VIEW | ++---------------+--------------------+----------------------------+------------+ +``` >[!Note] > The `SHOW TABLES SQL` query must be run using the influxdb3 query CLI. From 85310e12822e6b2e687eb16570029833c44a0e7b Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 30 Apr 2025 22:41:45 -0700 Subject: [PATCH 19/24] docs: add examples and clarify usage for token, distinct_cache, and last_cache commands --- .../influxdb3-cli/create/distinct_cache.md | 4 ++++ .../shared/influxdb3-cli/create/last_cache.md | 4 ++-- content/shared/influxdb3-cli/create/token.md | 19 ++++++++++++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/content/shared/influxdb3-cli/create/distinct_cache.md b/content/shared/influxdb3-cli/create/distinct_cache.md index 26d68ff120..c4a4069dcb 100644 --- a/content/shared/influxdb3-cli/create/distinct_cache.md +++ b/content/shared/influxdb3-cli/create/distinct_cache.md @@ -93,6 +93,8 @@ In the example above, replace the following: Use this simple setup to test the cache functionality for a single tag column. It’s helpful when validating basic behavior or building up incrementally. + + ```bash influxdb3 create distinct_cache \ --database my_test_db \ @@ -105,6 +107,8 @@ influxdb3 create distinct_cache \ Use this pattern when you need more control over cache structure and retention. It creates a multilevel cache with resource limits. + + ```bash influxdb3 create distinct_cache \ --database my_test_db \ diff --git a/content/shared/influxdb3-cli/create/last_cache.md b/content/shared/influxdb3-cli/create/last_cache.md index ae80988399..49d20a781a 100644 --- a/content/shared/influxdb3-cli/create/last_cache.md +++ b/content/shared/influxdb3-cli/create/last_cache.md @@ -95,12 +95,12 @@ influxdb3 create last_cache \ my_temp_cache ``` - - ## Create a last value cache with multiple keys and values This example shows how to configure a more complex cache: + + ```bash influxdb3 create last_cache \ --database my_test_db \ diff --git a/content/shared/influxdb3-cli/create/token.md b/content/shared/influxdb3-cli/create/token.md index fa8b912265..6cf95dfba5 100644 --- a/content/shared/influxdb3-cli/create/token.md +++ b/content/shared/influxdb3-cli/create/token.md @@ -1,4 +1,3 @@ - The `influxdb3 create token` command creates a new authentication token. ## Usage @@ -33,3 +32,21 @@ influxdb3 create token ```bash influxdb3 create token --admin ``` + +This returns a token string. You can use it to authenticate future requests by setting it with `--token` or the `INFLUXDB3_AUTH_TOKEN` environment variable. + +### Use the token to create a database + + + +```bash +influxdb3 create database \ + --token YOUR_ADMIN_TOKEN \ + my_new_database +``` + +> [!Tip] +> Set the token as an environment variable to simplify repeated commands: +> ```bash +> export INFLUXDB3_AUTH_TOKEN=YOUR_ADMIN_TOKEN +> ``` From b3be9ded6d8fef2f55e2abbea6eaeebb07a7ac7f Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 30 Apr 2025 22:49:19 -0700 Subject: [PATCH 20/24] docs(cli): minor updates to examples --- content/shared/influxdb3-cli/create/last_cache.md | 4 ++-- content/shared/influxdb3-cli/create/token.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/content/shared/influxdb3-cli/create/last_cache.md b/content/shared/influxdb3-cli/create/last_cache.md index 49d20a781a..4ea3e38f9b 100644 --- a/content/shared/influxdb3-cli/create/last_cache.md +++ b/content/shared/influxdb3-cli/create/last_cache.md @@ -88,7 +88,7 @@ Use this example to create a simple cache for a single key and value column: ```bash influxdb3 create last_cache \ - --database my_test_db \ + --database DATABASE_NAME \ --table my_sensor_table \ --key-columns room \ --value-columns temp \ @@ -103,7 +103,7 @@ This example shows how to configure a more complex cache: ```bash influxdb3 create last_cache \ - --database my_test_db \ + --database DATABASE_NAME \ --table my_sensor_table \ --key-columns room,sensor_id \ --value-columns temp,hum \ diff --git a/content/shared/influxdb3-cli/create/token.md b/content/shared/influxdb3-cli/create/token.md index 6cf95dfba5..bb886c630d 100644 --- a/content/shared/influxdb3-cli/create/token.md +++ b/content/shared/influxdb3-cli/create/token.md @@ -47,6 +47,6 @@ influxdb3 create database \ > [!Tip] > Set the token as an environment variable to simplify repeated commands: -> ```bash -> export INFLUXDB3_AUTH_TOKEN=YOUR_ADMIN_TOKEN -> ``` +> ```bash +> export INFLUXDB3_AUTH_TOKEN=YOUR_ADMIN_TOKEN +> ``` From f5920099cd3b48982180920db2c5375003b536e5 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Wed, 30 Apr 2025 22:50:49 -0700 Subject: [PATCH 21/24] Update content/shared/influxdb3-cli/create/distinct_cache.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- content/shared/influxdb3-cli/create/distinct_cache.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/shared/influxdb3-cli/create/distinct_cache.md b/content/shared/influxdb3-cli/create/distinct_cache.md index c4a4069dcb..f971412e17 100644 --- a/content/shared/influxdb3-cli/create/distinct_cache.md +++ b/content/shared/influxdb3-cli/create/distinct_cache.md @@ -65,7 +65,7 @@ Before creating a distinct value cache, you must: {{% code-placeholders "(DATABASE|TABLE|COLUMN|CACHE)_NAME" %}} -### Generix syntax +### Generic syntax Use this as a template to adapt the command to your environment. From e659a0b7e03ec5aa90711253bd69d64d5fe092b9 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Wed, 30 Apr 2025 22:51:06 -0700 Subject: [PATCH 22/24] Update content/shared/influxdb3-cli/create/distinct_cache.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- content/shared/influxdb3-cli/create/distinct_cache.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/shared/influxdb3-cli/create/distinct_cache.md b/content/shared/influxdb3-cli/create/distinct_cache.md index f971412e17..c60cfb5e59 100644 --- a/content/shared/influxdb3-cli/create/distinct_cache.md +++ b/content/shared/influxdb3-cli/create/distinct_cache.md @@ -121,7 +121,7 @@ influxdb3 create distinct_cache \ {{% /code-placeholders %}} -## Common pitfals +## Common pitfalls - `--column` is not valid—must use `--columns` - Tokens must be included explicitly unless set via `INFLUXDB3_AUTH_TOKEN` From b71dd9ac87ea76fed39906365bbdddef93ae8efc Mon Sep 17 00:00:00 2001 From: meelahme Date: Wed, 30 Apr 2025 23:06:10 -0700 Subject: [PATCH 23/24] chore(cli): remove deprecated delete plugin reference --- .../core/reference/cli/influxdb3/create/plugin.md | 15 --------------- .../core/reference/cli/influxdb3/delete/plugin.md | 15 --------------- 2 files changed, 30 deletions(-) delete mode 100644 content/influxdb3/core/reference/cli/influxdb3/create/plugin.md delete mode 100644 content/influxdb3/core/reference/cli/influxdb3/delete/plugin.md diff --git a/content/influxdb3/core/reference/cli/influxdb3/create/plugin.md b/content/influxdb3/core/reference/cli/influxdb3/create/plugin.md deleted file mode 100644 index 84b793b531..0000000000 --- a/content/influxdb3/core/reference/cli/influxdb3/create/plugin.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: influxdb3 create plugin -description: > - The `influxdb3 create plugin` command creates a new processing engine plugin. -menu: - influxdb3_core: - parent: influxdb3 create - name: influxdb3 create plugin -weight: 400 -source: /shared/influxdb3-cli/create/plugin.md ---- - - diff --git a/content/influxdb3/core/reference/cli/influxdb3/delete/plugin.md b/content/influxdb3/core/reference/cli/influxdb3/delete/plugin.md deleted file mode 100644 index 9a151c04be..0000000000 --- a/content/influxdb3/core/reference/cli/influxdb3/delete/plugin.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: influxdb3 delete plugin -description: > - The `influxdb3 delete plugin` command deletes a processing engine plugin. -menu: - influxdb3_core: - parent: influxdb3 delete - name: influxdb3 delete plugin -weight: 400 -source: /shared/influxdb3-cli/delete/last_cache.md ---- - - From e9bcb06f18fa0d38bdbe9c79147c2df7e2b9d501 Mon Sep 17 00:00:00 2001 From: Jameelah Mercer <36314199+MeelahMe@users.noreply.github.com> Date: Wed, 30 Apr 2025 23:09:57 -0700 Subject: [PATCH 24/24] Update content/shared/influxdb3-cli/create/last_cache.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- content/shared/influxdb3-cli/create/last_cache.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/shared/influxdb3-cli/create/last_cache.md b/content/shared/influxdb3-cli/create/last_cache.md index 4ea3e38f9b..c6e7673fa4 100644 --- a/content/shared/influxdb3-cli/create/last_cache.md +++ b/content/shared/influxdb3-cli/create/last_cache.md @@ -47,7 +47,7 @@ You can use the following environment variables to set command options: Before creating a last value cache, you must: -Before creating a distinct value cache, you must: +Before creating a last value cache, you must: 1. Create a [database](/influxdb3/version/reference/cli/influxdb3/create/database/).