From 23816d9a7e2198b1d7ab9fbebde142b3b962aa0b Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Tue, 2 Jul 2024 09:29:16 -0500 Subject: [PATCH] fix(v3): Skip tests for creating databases; namespaces aren't reusable. --- .../vocabularies/InfluxDataDocs/accept.txt | 2 +- .../cloud-dedicated/admin/databases/create.md | 48 ++++++++++++------- .../clustered/admin/databases/create.md | 21 +++++--- 3 files changed, 48 insertions(+), 23 deletions(-) diff --git a/.ci/vale/styles/config/vocabularies/InfluxDataDocs/accept.txt b/.ci/vale/styles/config/vocabularies/InfluxDataDocs/accept.txt index 2d7ef17b4..5eb80d548 100644 --- a/.ci/vale/styles/config/vocabularies/InfluxDataDocs/accept.txt +++ b/.ci/vale/styles/config/vocabularies/InfluxDataDocs/accept.txt @@ -7,7 +7,7 @@ Anaconda Apache Superset Arrow AuthToken -CLI +CLI|\/cli\/ CSV Data Explorer Dedup diff --git a/content/influxdb/cloud-dedicated/admin/databases/create.md b/content/influxdb/cloud-dedicated/admin/databases/create.md index 54ff45460..a40c1bc15 100644 --- a/content/influxdb/cloud-dedicated/admin/databases/create.md +++ b/content/influxdb/cloud-dedicated/admin/databases/create.md @@ -10,20 +10,22 @@ menu: parent: Manage databases weight: 201 list_code_example: | + ##### CLI ```sh influxctl database create \ --retention-period 30d \ --max-tables 500 \ --max-columns 250 \ - + DATABASE_NAME ``` + ##### API ```sh curl \ --location "https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases" \ - --request POST + --request POST \ --header "Accept: application/json" \ --header 'Content-Type: application/json' \ --header "Authorization: Bearer MANAGEMENT_TOKEN" \ @@ -103,6 +105,9 @@ to create a database in your {{< product-name omit=" Clustered" >}} cluster. _{{< product-name >}} supports up to 7 total tags or tag buckets in the partition template._ {{% /note %}} + + + {{% code-placeholders "DATABASE_NAME|30d|500|100|300|(TAG_KEY(_\d)?)" %}} ```sh @@ -127,11 +132,15 @@ Replace the following in your command: ## Database attributes -- [Retention period syntax (influxctl CLI)](#retention-period-syntax-influxctl-cli) -- [Custom partitioning (influxctl CLI)](#custom-partitioning-influxctl-cli) -- [Database naming restrictions](#database-naming-restrictions) -- [InfluxQL DBRP naming convention](#influxql-dbrp-naming-convention) -- [Table and column limits](#table-and-column-limits) +- [Database attributes](#database-attributes) + - [Retention period syntax (influxctl CLI)](#retention-period-syntax-influxctl-cli) + - [Custom partitioning (influxctl CLI)](#custom-partitioning-influxctl-cli) +- [Database attributes](#database-attributes-1) + - [Retention period syntax (Management API)](#retention-period-syntax-management-api) + - [Custom partitioning (Management API)](#custom-partitioning-management-api) + - [Database naming restrictions](#database-naming-restrictions) + - [InfluxQL DBRP naming convention](#influxql-dbrp-naming-convention) + - [Table and column limits](#table-and-column-limits) ### Retention period syntax (influxctl CLI) @@ -190,7 +199,7 @@ For more information, see [Manage data partitioning](/influxdb/cloud-dedicated/a #### Partition templates can only be applied on create You can only apply a partition template when creating a database. -There is no way to update a partition template on an existing database. +You can't update a partition template on an existing database. {{% /note %}} @@ -237,12 +246,15 @@ _{{< product-name >}} supports up to 7 total tags or tag buckets in the partitio The following example shows how to use the Management API to create a database with custom partitioning: + + + {{% code-placeholders "DATABASE_NAME|2592000000000|500|100|300|250|ACCOUNT_ID|CLUSTER_ID|MANAGEMENT_TOKEN|(TAG_KEY(_\d)?)" %}} ```sh curl \ --location "https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases" \ - --request POST + --request POST \ --header "Accept: application/json" \ --header 'Content-Type: application/json' \ --header "Authorization: Bearer MANAGEMENT_TOKEN" \ @@ -294,11 +306,15 @@ Replace the following in your request: ## Database attributes -- [Retention period syntax (Management API)](#retention-period-syntax-management-api) -- [Custom partitioning (Management API)](#custom-partitioning-management-api) -- [Database naming restrictions](#database-naming-restrictions) -- [InfluxQL DBRP naming convention](#influxql-dbrp-naming-convention) -- [Table and column limits](#table-and-column-limits) +- [Database attributes](#database-attributes) + - [Retention period syntax (influxctl CLI)](#retention-period-syntax-influxctl-cli) + - [Custom partitioning (influxctl CLI)](#custom-partitioning-influxctl-cli) +- [Database attributes](#database-attributes-1) + - [Retention period syntax (Management API)](#retention-period-syntax-management-api) + - [Custom partitioning (Management API)](#custom-partitioning-management-api) + - [Database naming restrictions](#database-naming-restrictions) + - [InfluxQL DBRP naming convention](#influxql-dbrp-naming-convention) + - [Table and column limits](#table-and-column-limits) ### Retention period syntax (Management API) @@ -334,7 +350,7 @@ For more information, see [Manage data partitioning](/influxdb/cloud-dedicated/a #### Partition templates can only be applied on create You can only apply a partition template when creating a database. -There is no way to update a partition template on an existing database. +You can't update a partition template on an existing database. {{% /note %}} @@ -364,7 +380,7 @@ database and retention policy (DBRP) to be queryable with InfluxQL. **When naming a database that you want to query with InfluxQL**, use the following naming convention to automatically map v1 DBRP combinations to an {{% product-name %}} database: -```sh +```text database_name/retention_policy_name ``` diff --git a/content/influxdb/clustered/admin/databases/create.md b/content/influxdb/clustered/admin/databases/create.md index 5ad5598ed..9b1d7a8b7 100644 --- a/content/influxdb/clustered/admin/databases/create.md +++ b/content/influxdb/clustered/admin/databases/create.md @@ -1,20 +1,22 @@ --- title: Create a database description: > - Use the [`influxctl database create` command](/influxdb/clustered/reference/cli/influxctl/database/create/) - to create a new InfluxDB database in your InfluxDB cluster. + Use the [`influxctl database create` command](/influxdb/clustered/reference/cli/influxctl/database/create/) to create a new InfluxDB database in your InfluxDB cluster. Provide a database name and an optional retention period. menu: influxdb_clustered: parent: Manage databases weight: 201 list_code_example: | + + ##### CLI + ```sh influxctl database create \ --retention-period 30d \ --max-tables 500 \ --max-columns 250 \ - + DATABASE_NAME ``` related: - /influxdb/clustered/reference/cli/influxctl/database/create/ @@ -44,7 +46,11 @@ to create a database in your {{< product-name omit=" Clustered" >}} cluster. _{{< product-name >}} supports up to 7 total tags or tag buckets in the partition template._ {{% /note %}} + + + {{% code-placeholders "DATABASE_NAME|30d|500|200" %}} + ```sh influxctl database create \ --retention-period 30d \ @@ -57,13 +63,16 @@ influxctl database create \ --template-timeformat '%Y-%m-%d' \ DATABASE_NAME ``` + {{% /code-placeholders %}} - [Retention period syntax](#retention-period-syntax) - [Database naming restrictions](#database-naming-restrictions) - [InfluxQL DBRP naming convention](#influxql-dbrp-naming-convention) - [Table and column limits](#table-and-column-limits) -- [Custom partitioning](#custom-partitioning) + - [Table limit](#table-limit) + - [Column limit](#column-limit) + - [Custom partitioning](#custom-partitioning) ## Retention period syntax @@ -127,7 +136,7 @@ database and retention policy (DBRP) to be queryable with InfluxQL. **When naming a database that you want to query with InfluxQL**, use the following naming convention to automatically map v1 DBRP combinations to an {{% product-name %}} database: -```sh +```text database_name/retention_policy_name ``` @@ -225,5 +234,5 @@ For more information, see [Manage data partitioning](/influxdb/clustered/admin/c #### Partition templates can only be applied on create You can only apply a partition template when creating a database. -There is no way to update a partition template on an existing database. +You can't update a partition template on an existing database. {{% /note %}}