diff --git a/.vscode/settings.json b/.vscode/settings.json index 92e45a176..2c18d3282 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,12 +1,12 @@ { - "commentAnchors.tags.anchors": - { "SOURCE": { - "scope": "file", - "behavior": "link", - "iconColor": "#FF0000", - "highlightColor": "#FF0000", - "style": "bold" - }}, + "commentAnchors.tags.anchors": + { "SOURCE": { + "scope": "file", + "behavior": "link", + "iconColor": "#FF0000", + "highlightColor": "#FF0000", + "style": "bold" + }}, "commentAnchors.workspace.matchFiles": "**/*.{md,ini,json,yaml,yml}", "commentAnchors.workspace.enabled": true, "yaml.schemas": { @@ -15,13 +15,17 @@ "vale.valeCLI.config": "${workspaceFolder}/.vale.ini", "vale.valeCLI.minAlertLevel": "warning", "github.copilot.chat.codeGeneration.useInstructionFiles": true, - "github.copilot.chat.codeGeneration.instructionFiles": [ + "github.copilot.chat.codeGeneration.instructions": [ { - "path": "${workspaceFolder}/.github/copilot-instructions.md", - "enabled": true + "file": "${workspaceFolder}/.github/copilot-instructions.md", + } + ], + "github.copilot.chat.pullRequestDescriptionGeneration.instructions": [ + { + "file": "${workspaceFolder}/.github/copilot-instructions.md", } ], "cSpell.words": [ "influxctl" - ], + ] } \ No newline at end of file diff --git a/api-docs/influxdb3/core/v3/ref.yml b/api-docs/influxdb3/core/v3/ref.yml index 7c344f7d7..5d0abe7df 100644 --- a/api-docs/influxdb3/core/v3/ref.yml +++ b/api-docs/influxdb3/core/v3/ref.yml @@ -43,7 +43,7 @@ security: tags: - name: Authentication description: | - During the initial Alpha phase, InfluxDB 3 Core does not require authentication. + During the Beta phase, InfluxDB 3 Core does not require authentication. x-traitTag: true - name: Compatibility endpoints description: | diff --git a/api-docs/influxdb3/enterprise/v3/ref.yml b/api-docs/influxdb3/enterprise/v3/ref.yml index 5738d28f7..69019c77d 100644 --- a/api-docs/influxdb3/enterprise/v3/ref.yml +++ b/api-docs/influxdb3/enterprise/v3/ref.yml @@ -43,7 +43,7 @@ security: tags: - name: Authentication description: | - During the initial Alpha phase, InfluxDB 3 Enterprise does not require authentication. + During the Beta phase, InfluxDB 3 Enterprise does not require authentication. x-traitTag: true - name: Compatibility endpoints description: | diff --git a/content/influxdb3/cloud-dedicated/admin/databases/delete.md b/content/influxdb3/cloud-dedicated/admin/databases/delete.md index 29066543e..0903085f2 100644 --- a/content/influxdb3/cloud-dedicated/admin/databases/delete.md +++ b/content/influxdb3/cloud-dedicated/admin/databases/delete.md @@ -29,17 +29,21 @@ related: --- Use the [`influxctl` CLI](/influxdb3/cloud-dedicated/reference/cli/influxctl/) -or the [Management HTTP API](/influxdb3/cloud-dedicated/api/management/) to create a database in your {{< product-name omit=" Clustered" >}} cluster. +or the [Management HTTP API](/influxdb3/cloud-dedicated/api/management/) +to delete a database from your {{< product-name omit=" Clustered" >}} cluster. > [!Warning] > > #### Deleting a database cannot be undone > > Once a database is deleted, data stored in that database cannot be recovered. -> -> #### Cannot reuse database names -> -> After a database is deleted, you cannot reuse the same name for a new database. +> +> #### Wait before writing to a new database with the same name +> +> After deleting a database from your {{% product-name omit=" Clustered" %}} +> cluster, you can reuse the name to create a new database, but **wait two to +> three minutes** after deleting the previous database before writing to the new +> database to allow write caches to clear. {{< tabs-wrapper >}} {{% tabs %}} @@ -50,13 +54,15 @@ or the [Management HTTP API](/influxdb3/cloud-dedicated/api/management/) to crea -1. If you haven't already, [download and install the `influxctl` CLI](/influxdb3/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl), and then [configure an `influxctl` connection profile](/influxdb3/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles) for your cluster. +1. If you haven't already, + [download and install the `influxctl` CLI](/influxdb3/cloud-dedicated/reference/cli/influxctl/#download-and-install-influxctl), and then [configure an `influxctl` connection profile](/influxdb3/cloud-dedicated/reference/cli/influxctl/#configure-connection-profiles) + for your cluster. -2. In your terminal, run the `influxctl database delete` command and provide the following: +2. In your terminal, run the `influxctl database delete` command and provide the following: - - Name of the database to delete + - The name of the database to delete -3. Confirm that you want to delete the database. +3. Confirm that you want to delete the database. {{% code-placeholders "DATABASE_NAME" %}} @@ -73,23 +79,26 @@ influxctl database delete DATABASE_NAME _This example uses [cURL](https://curl.se/) to send a Management HTTP API request, but you can use any HTTP client._ -1. If you haven't already, follow the instructions to [install cURL](https://everything.curl.dev/install/index.html) for your system. -2. In your terminal, use cURL to send a request to the following {{% product-name %}} endpoint: +1. If you haven't already, follow the instructions to [install cURL](https://everything.curl.dev/install/index.html) for your system. +2. In your terminal, use cURL to send a request to the following {{% product-name %}} endpoint: - {{% api-endpoint endpoint="https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases/DATABASE_NAME" method="delete" api-ref="/influxdb3/cloud-dedicated/api/management/#operation/DeleteClusterDatabase" %}} + {{% api-endpoint endpoint="https://console.influxdata.com/api/v0/accounts/ACCOUNT_ID/clusters/CLUSTER_ID/databases/DATABASE_NAME" method="delete" api-ref="/influxdb3/cloud-dedicated/api/management/#operation/DeleteClusterDatabase" %}} - In the URL, provide the following: + In the URL, provide the following: - - `ACCOUNT_ID`: The ID of the [account](/influxdb3/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that the cluster belongs to _(see how to [list cluster details](/influxdb3/cloud-dedicated/admin/clusters/list/#detailed-output-in-json))_. - - `CLUSTER_ID`: The ID of the [cluster](/influxdb3/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) that you want to manage _(see how to [list cluster details](/influxdb3/cloud-dedicated/admin/clusters/list/#detailed-output-in-json))_. - - `DATABASE_NAME`: The name of the [database](/influxdb3/cloud-dedicated/admin/databases/) that you want to delete _(see how to [list databases](/influxdb3/cloud-dedicated/admin/databases/list/))_. + - `ACCOUNT_ID`: The ID of the [account](/influxdb3/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) + that the cluster belongs to _(see how to [list cluster details](/influxdb3/cloud-dedicated/admin/clusters/list/#detailed-output-in-json))_. + - `CLUSTER_ID`: The ID of the [cluster](/influxdb3/cloud-dedicated/get-started/setup/#request-an-influxdb-cloud-dedicated-cluster) + that you want to manage _(see how to [list cluster details](/influxdb3/cloud-dedicated/admin/clusters/list/#detailed-output-in-json))_. + - `DATABASE_NAME`: The name of the [database](/influxdb3/cloud-dedicated/admin/databases/) + that you want to delete _(see how to [list databases](/influxdb3/cloud-dedicated/admin/databases/list/))_. - Provide the following request headers: + Provide the following request headers: - - `Accept: application/json` to ensure the response body is JSON content - - `Authorization: Bearer` and a [Management API token](/influxdb3/cloud-dedicated/admin/tokens/management/) for your cluster _(see how to [create a management token](/influxdb3/cloud-dedicated/admin/tokens/management/) for Management API requests)_. + - `Accept: application/json` to ensure the response body is JSON content + - `Authorization: Bearer` and a [Management API token](/influxdb3/cloud-dedicated/admin/tokens/management/) for your cluster _(see how to [create a management token](/influxdb3/cloud-dedicated/admin/tokens/management/) for Management API requests)_. - Specify the `DELETE` request method. + Specify the `DELETE` request method. The following example shows how to use the Management API to delete a database: diff --git a/content/influxdb3/cloud-dedicated/reference/cli/influxctl/database/create.md b/content/influxdb3/cloud-dedicated/reference/cli/influxctl/database/create.md index b74e8c593..69e573cc0 100644 --- a/content/influxdb3/cloud-dedicated/reference/cli/influxctl/database/create.md +++ b/content/influxdb3/cloud-dedicated/reference/cli/influxctl/database/create.md @@ -69,17 +69,12 @@ Be sure to follow [partitioning best practices](/influxdb3/cloud-dedicated/admin > Otherwise, InfluxDB omits time from the partition template and won't compact partitions. > [!Warning] -> #### Cannot reuse deleted database names -> -> You cannot reuse the name of a deleted database when creating a new database. -> If you try to reuse the name, the API response status code -> is `400` and the `message` field contains the following: -> -> ```text -> 'iox_proxy.app.CreateDatabase failed to create database: \ -> rpc error: code = AlreadyExists desc = A namespace with the -> name `` already exists' -> ``` +> #### Wait before writing to a new database with the same name as a deleted database +> +> After deleting a database from your {{% product-name omit=" Clustered" %}} +> cluster, you can reuse the name to create a new database, but **wait two to +> three minutes** after deleting the previous database before writing to the new +> database to allow write caches to clear. ## Usage diff --git a/content/influxdb3/cloud-dedicated/reference/cli/influxctl/database/delete.md b/content/influxdb3/cloud-dedicated/reference/cli/influxctl/database/delete.md index 2fc657513..23c76b6dc 100644 --- a/content/influxdb3/cloud-dedicated/reference/cli/influxctl/database/delete.md +++ b/content/influxdb3/cloud-dedicated/reference/cli/influxctl/database/delete.md @@ -9,8 +9,8 @@ menu: weight: 301 --- -The `influxctl database delete` command deletes a database from an InfluxDB -Cloud Dedicated cluster. +The `influxctl database delete` command deletes a database from an +{{< product-name omit=" Clustered" >}} cluster. ## Usage @@ -25,11 +25,13 @@ influxctl database delete [command options] [--force] [ #### Cannot be undone > > Deleting a database is a destructive action that cannot be undone. -> -> #### Cannot reuse deleted database names -> -> After deleting a database, you cannot reuse the name of the deleted database -> when creating a new database. +> +> #### Wait before writing to a new database with the same name +> +> After deleting a database from your {{% product-name omit=" Clustered" %}} +> cluster, you can reuse the name to create a new database, but **wait two to +> three minutes** after deleting the previous database before writing to the new +> database to allow write caches to clear. ## Arguments diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/_index.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/_index.md index 066588ff0..38a5fe750 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/_index.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/_index.md @@ -17,8 +17,7 @@ prepend: | > client libraries and the `influx` CLI, **can't** query an > {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) - > and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) > are available that integrate with your code to write and query data stored > in {{% product-name %}}. > diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/arduino.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/arduino.md index 490be664f..9f3698155 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/arduino.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/arduino.md @@ -16,7 +16,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-dedicated/write-data/) and [**querying**](/influxdb3/cloud-dedicated/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-dedicated/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/csharp.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/csharp.md index 3c043ecda..0f6462073 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/csharp.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/csharp.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-dedicated/write-data/) and [**querying**](/influxdb3/cloud-dedicated/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-dedicated/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/dart.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/dart.md index 5f2031ee7..993617608 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/dart.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/dart.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-dedicated/write-data/) and [**querying**](/influxdb3/cloud-dedicated/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-dedicated/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/go.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/go.md index 721532aad..849ca748f 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/go.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/go.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-dedicated/write-data/) and [**querying**](/influxdb3/cloud-dedicated/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-dedicated/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/java.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/java.md index b4737500e..adcd402f8 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/java.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/java.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-dedicated/write-data/) and [**querying**](/influxdb3/cloud-dedicated/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-dedicated/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/_index.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/_index.md index 4a3f3ba27..3c0dc1646 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/_index.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/_index.md @@ -19,7 +19,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-dedicated/write-data/) and [**querying**](/influxdb3/cloud-dedicated/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-dedicated/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/browser.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/browser.md index 8d03fc4f7..93b8ae998 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/browser.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/browser.md @@ -22,7 +22,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-dedicated/write-data/) and [**querying**](/influxdb3/cloud-dedicated/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-dedicated/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/nodejs/_index.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/nodejs/_index.md index b7fd5493b..fe703c51e 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/nodejs/_index.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/nodejs/_index.md @@ -19,7 +19,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-dedicated/write-data/) and [**querying**](/influxdb3/cloud-dedicated/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-dedicated/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/nodejs/install.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/nodejs/install.md index b06d641d5..32e4f4388 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/nodejs/install.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/nodejs/install.md @@ -16,7 +16,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-dedicated/write-data/) and [**querying**](/influxdb3/cloud-dedicated/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-dedicated/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/nodejs/write.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/nodejs/write.md index 9bea77afa..4a05ccd4c 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/nodejs/write.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/javascript/nodejs/write.md @@ -19,7 +19,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-dedicated/write-data/) and [**querying**](/influxdb3/cloud-dedicated/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-dedicated/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/kotlin.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/kotlin.md index 7a02a0c50..527fb98a9 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/kotlin.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/kotlin.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-dedicated/write-data/) and [**querying**](/influxdb3/cloud-dedicated/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-dedicated/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/php.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/php.md index e9e76e394..19a07f2fc 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/php.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/php.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-dedicated/write-data/) and [**querying**](/influxdb3/cloud-dedicated/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-dedicated/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/python.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/python.md index 0968abba4..20e9ab75a 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/python.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/python.md @@ -20,7 +20,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-dedicated/write-data/) and [**querying**](/influxdb3/cloud-dedicated/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-dedicated/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/r.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/r.md index 80abd2e17..0dcaf1276 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/r.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/r.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-dedicated/write-data/) and [**querying**](/influxdb3/cloud-dedicated/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-dedicated/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/ruby.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/ruby.md index 24d8991a2..c1f6ef5c4 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/ruby.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/ruby.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-dedicated/write-data/) and [**querying**](/influxdb3/cloud-dedicated/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-dedicated/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/scala.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/scala.md index d42cfe229..c803c8345 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/scala.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/scala.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-dedicated/write-data/) and [**querying**](/influxdb3/cloud-dedicated/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-dedicated/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/swift.md b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/swift.md index 56c2cca3a..4dae858f6 100644 --- a/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/swift.md +++ b/content/influxdb3/cloud-dedicated/reference/client-libraries/v2/swift.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-dedicated/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-dedicated/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-dedicated/write-data/) and [**querying**](/influxdb3/cloud-dedicated/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-dedicated/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-dedicated/write-data/line-protocol/influxctl-cli.md b/content/influxdb3/cloud-dedicated/write-data/line-protocol/influxctl-cli.md index 19b253010..69f9b10bc 100644 --- a/content/influxdb3/cloud-dedicated/write-data/line-protocol/influxctl-cli.md +++ b/content/influxdb3/cloud-dedicated/write-data/line-protocol/influxctl-cli.md @@ -26,7 +26,7 @@ to write line protocol data to {{< product-name >}}. ## Construct line protocol With a [basic understanding of line protocol](/influxdb3/cloud-dedicated/write-data/line-protocol/), -you can now construct line protocol and write data to InfluxDB. +you can construct data in line protocol format and write it to InfluxDB. Consider a use case where you collect data from sensors in your home. Each sensor collects temperature, humidity, and carbon monoxide readings. To collect this data, use the following schema: @@ -40,7 +40,7 @@ To collect this data, use the following schema: - `co`: carbon monoxide in parts per million (integer) - **timestamp**: Unix timestamp in _second_ precision -The following line protocol represent the schema described above: +The following line protocol represents the schema described above: ```text home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1641024000 diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/_index.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/_index.md index d6b7c499a..d4638091c 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/_index.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/_index.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/arduino.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/arduino.md index afa20cf99..6dee93b86 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/arduino.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/arduino.md @@ -16,7 +16,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/csharp.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/csharp.md index 931ca42cc..36a3e69e7 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/csharp.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/csharp.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/dart.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/dart.md index cba6138c6..17670500c 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/dart.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/dart.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/go.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/go.md index cd565da64..e102c1487 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/go.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/go.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/java.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/java.md index 9c57912a2..59c825aa8 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/java.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/java.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/_index.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/_index.md index 3a5cf0ddc..23ca20125 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/_index.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/_index.md @@ -19,7 +19,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/browser.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/browser.md index 6a29e94a4..7dd153d87 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/browser.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/browser.md @@ -22,7 +22,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/nodejs/_index.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/nodejs/_index.md index fa6b76dc9..15764fe34 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/nodejs/_index.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/nodejs/_index.md @@ -20,7 +20,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/nodejs/install.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/nodejs/install.md index eba4fa2f5..8cc84cf96 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/nodejs/install.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/nodejs/install.md @@ -16,7 +16,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/nodejs/write.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/nodejs/write.md index 19f855a76..fbc8c1215 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/nodejs/write.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/javascript/nodejs/write.md @@ -19,7 +19,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/kotlin.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/kotlin.md index 38ef551bc..00ac9dea8 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/kotlin.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/kotlin.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/php.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/php.md index e567abe9a..9cb06b151 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/php.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/php.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/python.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/python.md index aca9da26e..06bd1bf72 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/python.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/python.md @@ -20,7 +20,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/r.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/r.md index 6a1304c3c..511da47ce 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/r.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/r.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/ruby.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/ruby.md index 87324340e..0c127675b 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/ruby.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/ruby.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/scala.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/scala.md index ef45549e8..0278de3ee 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/scala.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/scala.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/swift.md b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/swift.md index db45ee0c8..19e668413 100644 --- a/content/influxdb3/cloud-serverless/reference/client-libraries/v2/swift.md +++ b/content/influxdb3/cloud-serverless/reference/client-libraries/v2/swift.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/cloud-serverless/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/cloud-serverless/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/cloud-serverless/write-data/) and [**querying**](/influxdb3/cloud-serverless/query-data/) data. > [**Compare tools you can use**](/influxdb3/cloud-serverless/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/_index.md b/content/influxdb3/clustered/reference/client-libraries/v2/_index.md index 631e1c5ec..d546f66c7 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/_index.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/_index.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/arduino.md b/content/influxdb3/clustered/reference/client-libraries/v2/arduino.md index 90f3734db..b8db0ed9c 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/arduino.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/arduino.md @@ -16,7 +16,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/csharp.md b/content/influxdb3/clustered/reference/client-libraries/v2/csharp.md index 45e29f654..519e7c59d 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/csharp.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/csharp.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/dart.md b/content/influxdb3/clustered/reference/client-libraries/v2/dart.md index 3e45224a1..0c7ff7a27 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/dart.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/dart.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/go.md b/content/influxdb3/clustered/reference/client-libraries/v2/go.md index f2e6d51b9..49593b626 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/go.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/go.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/java.md b/content/influxdb3/clustered/reference/client-libraries/v2/java.md index 193bedb9d..d9d1875f2 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/java.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/java.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/javascript/_index.md b/content/influxdb3/clustered/reference/client-libraries/v2/javascript/_index.md index f4b63794a..8aab3f98c 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/javascript/_index.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/javascript/_index.md @@ -19,7 +19,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/javascript/browser.md b/content/influxdb3/clustered/reference/client-libraries/v2/javascript/browser.md index c42010710..18fe58680 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/javascript/browser.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/javascript/browser.md @@ -22,7 +22,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/javascript/nodejs/_index.md b/content/influxdb3/clustered/reference/client-libraries/v2/javascript/nodejs/_index.md index 550f417fd..b5cc28ec0 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/javascript/nodejs/_index.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/javascript/nodejs/_index.md @@ -19,7 +19,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/javascript/nodejs/install.md b/content/influxdb3/clustered/reference/client-libraries/v2/javascript/nodejs/install.md index 1779c7fab..91d6195eb 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/javascript/nodejs/install.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/javascript/nodejs/install.md @@ -16,7 +16,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/javascript/nodejs/write.md b/content/influxdb3/clustered/reference/client-libraries/v2/javascript/nodejs/write.md index 2376cc180..02d020c41 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/javascript/nodejs/write.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/javascript/nodejs/write.md @@ -19,7 +19,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/kotlin.md b/content/influxdb3/clustered/reference/client-libraries/v2/kotlin.md index a3d0a476d..f26784d94 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/kotlin.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/kotlin.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/php.md b/content/influxdb3/clustered/reference/client-libraries/v2/php.md index e6d233f87..0a368a4c5 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/php.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/php.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/python.md b/content/influxdb3/clustered/reference/client-libraries/v2/python.md index 02a03a136..0be04f05f 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/python.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/python.md @@ -20,7 +20,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/r.md b/content/influxdb3/clustered/reference/client-libraries/v2/r.md index 3610ff041..6ebd18e68 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/r.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/r.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/ruby.md b/content/influxdb3/clustered/reference/client-libraries/v2/ruby.md index c5bd99ab9..dcec46529 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/ruby.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/ruby.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/scala.md b/content/influxdb3/clustered/reference/client-libraries/v2/scala.md index ab51742a1..02c0dca2a 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/scala.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/scala.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/reference/client-libraries/v2/swift.md b/content/influxdb3/clustered/reference/client-libraries/v2/swift.md index 369fbaab6..861824ecc 100644 --- a/content/influxdb3/clustered/reference/client-libraries/v2/swift.md +++ b/content/influxdb3/clustered/reference/client-libraries/v2/swift.md @@ -15,7 +15,7 @@ prepend: | > > The `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, **can't** query an {{% product-name omit=" Clustered" %}} cluster. > - > [InfluxDB 3 client libraries](/influxdb3/clustered/reference/client-libraries/v3/) and [Flight SQL clients](/influxdb3/clustered/reference/client-libraries/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. > > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/clustered/write-data/) and [**querying**](/influxdb3/clustered/query-data/) data. > [**Compare tools you can use**](/influxdb3/clustered/get-started/#tools-to-use) to interact with {{% product-name %}}. diff --git a/content/influxdb3/clustered/write-data/line-protocol/influxctl-cli.md b/content/influxdb3/clustered/write-data/line-protocol/influxctl-cli.md index 8f0da6cb1..a1e03f424 100644 --- a/content/influxdb3/clustered/write-data/line-protocol/influxctl-cli.md +++ b/content/influxdb3/clustered/write-data/line-protocol/influxctl-cli.md @@ -26,7 +26,7 @@ to write line protocol data to {{< product-name >}}. ## Construct line protocol With a [basic understanding of line protocol](/influxdb3/clustered/write-data/line-protocol/), -you can now construct line protocol and write data to InfluxDB. +you can construct data in line protocol format and write it to InfluxDB. Consider a use case where you collect data from sensors in your home. Each sensor collects temperature, humidity, and carbon monoxide readings. To collect this data, use the following schema: @@ -40,7 +40,7 @@ To collect this data, use the following schema: - `co`: carbon monoxide in parts per million (integer) - **timestamp**: Unix timestamp in _second_ precision -The following line protocol represent the schema described above: +The following line protocol represents the schema described above: ```text home,room=Living\ Room temp=21.1,hum=35.9,co=0i 1641024000 diff --git a/content/influxdb3/core/get-started/_index.md b/content/influxdb3/core/get-started/_index.md index b715d6ddc..fd81839af 100644 --- a/content/influxdb3/core/get-started/_index.md +++ b/content/influxdb3/core/get-started/_index.md @@ -11,7 +11,17 @@ menu: weight: 3 related: - /influxdb3/core/admin/query-system-data/ + - /influxdb3/core/write-data/ + - /influxdb3/core/query-data/ source: /shared/v3-core-get-started/_index.md +prepend: | + > [!Note] + > InfluxDB 3 Core is purpose-built for real-time data monitoring and recent data. + > InfluxDB 3 Enterprise builds on top of Core with support for historical data + > querying, high availability, read replicas, and more. + > Enterprise will soon unlock + > enhanced security, row-level deletions, an administration UI, and more. + > Learn more about [InfluxDB 3 Enterprise](/influxdb3/enterprise/). --- \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/flight/_index.md b/content/influxdb3/core/reference/client-libraries/flight/_index.md new file mode 100644 index 000000000..5b2060eb5 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/flight/_index.md @@ -0,0 +1,21 @@ +--- +title: Apache Arrow Flight RPC clients +description: > + Flight clients are language-specific drivers that can interact with Flight servers using the Arrow in-memory format and the Flight RPC framework. + View the list of available clients. +weight: 30 +menu: + influxdb3_core: + name: Arrow Flight clients + parent: Client libraries +influxdb3/core/tags: [client libraries, Flight RPC, Flight SQL] +aliases: + - /influxdb3/core/reference/client-libraries/flight-sql/ + - /influxdb3/core/reference/client-libraries/flight-sql/go-flightsql/ + - /influxdb3/core/reference/client-libraries/flight-sql/python-flightsql-dbapi/ +source: /shared/influxdb-client-libraries-reference/flight/_index.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/flight/csharp-flight.md b/content/influxdb3/core/reference/client-libraries/flight/csharp-flight.md new file mode 100644 index 000000000..c6079b41b --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/flight/csharp-flight.md @@ -0,0 +1,18 @@ +--- +title: C# .NET Flight client +description: The C# .NET Flight client integrates with C# .NET scripts and applications to query data stored in InfluxDB. +menu: + influxdb3_core: + name: C# .NET + parent: Arrow Flight clients + identifier: csharp-flight-client +influxdb3/core/tags: [C#, gRPC, SQL, Flight SQL, client libraries] +aliases: + - /influxdb3/core/reference/client-libraries/flight-sql/csharp-flightsql/ +weight: 201 +source: /shared/influxdb-client-libraries-reference/flight/csharp-flight.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/flight/go-flight.md b/content/influxdb3/core/reference/client-libraries/flight/go-flight.md new file mode 100644 index 000000000..3d5e76df0 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/flight/go-flight.md @@ -0,0 +1,20 @@ +--- +title: Go Flight client +description: The Go Flight client integrates with Go scripts and applications to query data stored in InfluxDB. +menu: + influxdb3_core: + name: Go + parent: Arrow Flight clients + identifier: go-flight-client +influxdb3/core/tags: [Flight client, Go, gRPC, SQL, Flight SQL, client libraries] +related: + - /influxdb3/core/reference/client-libraries/v3/go/ +aliases: + - /influxdb3/core/reference/client-libraries/flight-sql/go-flightsql/ +weight: 201 +source: /shared/influxdb-client-libraries-reference/flight/go-flight.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/flight/java-flightsql.md b/content/influxdb3/core/reference/client-libraries/flight/java-flightsql.md new file mode 100644 index 000000000..bb9d9e002 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/flight/java-flightsql.md @@ -0,0 +1,45 @@ +--- +title: Java Flight SQL package +description: The Java Flight SQL client integrates with Java applications to query and retrieve data from Flight database servers using RPC and SQL. +menu: + influxdb3_core: + name: Java Flight SQL + parent: Arrow Flight clients + identifier: java-flightsql-client +influxdb3/core/tags: [Flight client, Java, gRPC, SQL, Flight SQL] +weight: 201 +related: + - /influxdb3/core/reference/client-libraries/v3/java/ +aliases: + - /influxdb3/core/reference/client-libraries/flight-sql/java-flightsql/ +list_code_example: | + ```java + public class Query { + public static void main(String[] args) { + String query = "SELECT * FROM home"; + Location location = Location.forGrpcTls(HOST, 443); + + CredentialCallOption auth = new CredentialCallOption(new BearerCredentialWriter(TOKEN)); + BufferAllocator allocator = new RootAllocator(Long.MAX_VALUE); + + FlightClientMiddleware.Factory f = info -> new FlightClientMiddleware() { + @Override + public void onBeforeSendingHeaders(CallHeaders outgoingHeaders) { + outgoingHeaders.insert(DATABASE_FIELD, DATABASE_NAME); + } + }; + + FlightClient client = FlightClient.builder(allocator, location) + .intercept(f) + .build(); + FlightSqlClient sqlClient = new FlightSqlClient(client); + FlightInfo flightInfo = sqlClient.execute(query, auth); + } + } + ``` +source: /shared/influxdb-client-libraries-reference/flight/java-flightsql.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/flight/python-flight.md b/content/influxdb3/core/reference/client-libraries/flight/python-flight.md new file mode 100644 index 000000000..8803a8a6e --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/flight/python-flight.md @@ -0,0 +1,53 @@ +--- +title: Python Flight client +description: The Python Flight client integrates with Python scripts and applications to query data stored in InfluxDB. +menu: + influxdb3_core: + name: Python + parent: Arrow Flight clients + identifier: python-flight-client +influxdb3/core/tags: [Flight client, Python, gRPC, SQL, Flight SQL, client libraries] +aliases: + - /influxdb3/core/reference/client-libraries/flight-sql/python-flightsql/ +weight: 201 +list_code_example: | + ```py + from pyarrow.flight import FlightClient, Ticket, FlightCallOptions + import json + import pandas + import tabulate + + # Downsampling query groups data into 2-hour bins + sql=""" + SELECT DATE_BIN(INTERVAL '2 hours', + time, + '1970-01-01T00:00:00Z') AS time, + room, + selector_max(temp, time)['value'] AS 'max temp', + selector_min(temp, time)['value'] AS 'min temp', + avg(temp) AS 'average temp' + FROM home + GROUP BY + 1, + room + ORDER BY room, 1""" + + flight_ticket = Ticket(json.dumps({ + "namespace_name": "DATABASE_NAME", + "sql_query": sql, + "query_type": "sql" + })) + + token = (b"authorization", bytes(f"Bearer DATABASE_TOKEN".encode('utf-8'))) + options = FlightCallOptions(headers=[token]) + client = FlightClient(f"grpc+tls://{{< influxdb/host >}}:443") + + reader = client.do_get(flight_ticket, options) + arrow_table = reader.read_all() + ``` +source: /shared/influxdb-client-libraries-reference/flight/python-flight.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/flight/python-flightsql-dbapi.md b/content/influxdb3/core/reference/client-libraries/flight/python-flightsql-dbapi.md new file mode 100644 index 000000000..15732ab31 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/flight/python-flightsql-dbapi.md @@ -0,0 +1,18 @@ +--- +title: Python Flight SQL DBAPI client +description: The Python `flightsql-dbapi` library uses SQL and the Flight SQL protocol to query data stored in an InfluxDB Core database. +menu: + influxdb3_core: + name: Python Flight SQL + parent: Arrow Flight clients + identifier: python-flightsql-client +influxdb3/core/tags: [Flight client, Python, SQL, Flight SQL] +weight: 201 +aliases: + - /influxdb3/core/reference/client-libraries/flight-sql/python-flightsql/ +source: /shared/influxdb-client-libraries-reference/flight/python-flightsql-dbapi.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v1/_index.md b/content/influxdb3/core/reference/client-libraries/v1/_index.md new file mode 100644 index 000000000..17a520d8a --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v1/_index.md @@ -0,0 +1,17 @@ +--- +title: InfluxDB v1 client libraries +description: > + InfluxDB v1 client libraries use the InfluxDB 1.7 API and should be fully compatible with InfluxDB 1.5+. + View the list of available client libraries. +menu: + influxdb3_core: + weight: 201 + name: v1 client libraries + parent: Client libraries +influxdb3/core/tags: [client libraries, API, developer tools] +source: /shared/influxdb-client-libraries-reference/v1/_index.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/_index.md b/content/influxdb3/core/reference/client-libraries/v2/_index.md new file mode 100644 index 000000000..333af86a1 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/_index.md @@ -0,0 +1,33 @@ +--- +title: InfluxDB v2 API client libraries +description: > + InfluxDB v2 client libraries use InfluxDB `/api/v2` endpoints and work with [InfluxDB 2.x API compatibility endpoints](/influxdb/v1/tools/api/#influxdb-2x-api-compatibility-endpoints). + View the list of available client libraries. +weight: 101 +menu: + influxdb3_core: + name: v2 client libraries + parent: Client libraries +influxdb3/core/tags: [client libraries, API, developer tools] +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ + > stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) + > are available that integrate with your code to write and query data stored + > in {{% product-name %}}. + > + > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/core/write-data/) + > and [**querying**](/influxdb3/core/query-data/) data. + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) + > to interact with {{% product-name %}}. + > +source: /shared/influxdb-client-libraries-reference/v2/_index.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/arduino.md b/content/influxdb3/core/reference/client-libraries/v2/arduino.md new file mode 100644 index 000000000..bee4ad606 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/arduino.md @@ -0,0 +1,27 @@ +--- +title: Arduino client library +seotitle: Use the InfluxDB Arduino client library +list_title: Arduino +description: Use the InfluxDB Arduino client library to interact with InfluxDB. +external_url: https://github.com/tobiasschuerg/InfluxDB-Client-for-Arduino +list_note: _– contributed by [tobiasschuerg](https://github.com/tobiasschuerg)_ +menu: + influxdb3_core: + name: Arduino + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/arduino.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/csharp.md b/content/influxdb3/core/reference/client-libraries/v2/csharp.md new file mode 100644 index 000000000..55b6dc8de --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/csharp.md @@ -0,0 +1,26 @@ +--- +title: C# client library +list_title: C# +seotitle: Use the InfluxDB C# client library +description: Use the InfluxDB C# client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-csharp +menu: + influxdb3_core: + name: C# + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/csharp.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/dart.md b/content/influxdb3/core/reference/client-libraries/v2/dart.md new file mode 100644 index 000000000..ff116ac97 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/dart.md @@ -0,0 +1,26 @@ +--- +title: Dart client library +list_title: Dart +seotitle: Use the InfluxDB Dart client library +description: Use the InfluxDB Dart client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-dart +menu: + influxdb3_core: + name: Dart + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/dart.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/go.md b/content/influxdb3/core/reference/client-libraries/v2/go.md new file mode 100644 index 000000000..635470af6 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/go.md @@ -0,0 +1,26 @@ +--- +title: InfluxDB v2 Go client library +list_title: Go +description: > + The InfluxDB v2 Go client library integrates with Go applications to write data to an InfluxDB Core database. +menu: + influxdb3_core: + name: Go + parent: v2 client libraries +influxdb3/core/tags: [client libraries, Go] +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/go.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/java.md b/content/influxdb3/core/reference/client-libraries/v2/java.md new file mode 100644 index 000000000..e0074febd --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/java.md @@ -0,0 +1,26 @@ +--- +title: Java client library +seotitle: Use the InfluxDB Java client library +list_title: Java +description: Use the Java client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-java +menu: + influxdb3_core: + name: Java + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/java.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/javascript/_index.md b/content/influxdb3/core/reference/client-libraries/v2/javascript/_index.md new file mode 100644 index 000000000..53ff3c1d3 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/javascript/_index.md @@ -0,0 +1,30 @@ +--- +title: JavaScript client library for the InfluxDB v2 API +seotitle: InfluxDB v2 JavaScript client library for the InfluxDB v2 API +list_title: JavaScript +description: > + The [InfluxDB v2 JavaScript client library](https://github.com/influxdata/influxdb-client-js) + for Node.js and browsers integrates with the InfluxDB v2 API to write data to an InfluxDB Core cluster. +menu: + influxdb3_core: + name: JavaScript + parent: v2 client libraries +influxdb3/core/tags: [client libraries, JavaScript, NodeJS] +weight: 201 +aliases: + - /influxdb3/core/reference/api/client-libraries/js/ +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/javascript/_index.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/javascript/browser.md b/content/influxdb3/core/reference/client-libraries/v2/javascript/browser.md new file mode 100644 index 000000000..f7f3b7c17 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/javascript/browser.md @@ -0,0 +1,33 @@ +--- +title: InfluxDB v2 JavaScript client library for web browsers +list_title: JavaScript for browsers +description: > + Use the InfluxDB v2 JavaScript client library in browsers and front-end clients to write data to an InfluxDB Core database. +menu: + influxdb3_core: + name: Browsers and web clients + identifier: client_js_browsers + parent: JavaScript +influxdb3/core/tags: [client libraries, JavaScript] +weight: 201 +aliases: + - /influxdb3/core/api-guide/client-libraries/browserjs/write + - /influxdb3/core/api-guide/client-libraries/browserjs/query +related: + - /influxdb3/core/reference/client-libraries/v2/javascript/nodejs/write/ + - /influxdb3/core/api-guide/client-libraries/nodejs/query/ +prepend: | + > [!Warning] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/javascript/browser.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/javascript/nodejs/_index.md b/content/influxdb3/core/reference/client-libraries/v2/javascript/nodejs/_index.md new file mode 100644 index 000000000..91cb8e065 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/javascript/nodejs/_index.md @@ -0,0 +1,30 @@ +--- +title: Node.js JavaScript client library +seotitle: InfluxDB v2 JavaScript client library for Node.js +list_title: Node.js +description: > + The [InfluxDB v2 JavaScript client library](https://github.com/influxdata/influxdb-client-js) + for Node.js integrates with the InfluxDB v2 API to write data to an InfluxDB Core database. +menu: + influxdb3_core: + name: Node.js + parent: JavaScript +influxdb3/core/tags: [client libraries, JavaScript, NodeJS] +weight: 201 +aliases: + - /influxdb3/core/reference/api/client-libraries/nodejs/ +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/javascript/nodejs/_index.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/javascript/nodejs/install.md b/content/influxdb3/core/reference/client-libraries/v2/javascript/nodejs/install.md new file mode 100644 index 000000000..1c270d2bc --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/javascript/nodejs/install.md @@ -0,0 +1,27 @@ +--- +title: Install the InfluxDB v2 JavaScript client library +description: > + Install the Node.js JavaScript client library to write data to an InfluxDB Core database. +menu: + influxdb3_core: + name: Install + parent: Node.js +influxdb3/core/tags: [client libraries, JavaScript] +weight: 100 +aliases: + - /influxdb3/core/reference/api/client-libraries/nodejs/install +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/javascript/nodejs/install.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/javascript/nodejs/write.md b/content/influxdb3/core/reference/client-libraries/v2/javascript/nodejs/write.md new file mode 100644 index 000000000..42dd1ce2e --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/javascript/nodejs/write.md @@ -0,0 +1,30 @@ +--- +title: Write data with the InfluxDB v2 JavaScript client library +list_title: Write data +description: > + The InfluxDB v2 JavaScript client library integrates with Node.js applications to write data to the InfluxDB v2 API. +menu: + influxdb3_core: + name: Write + parent: Node.js +influxdb3/core/tags: [client libraries, JavaScript] +weight: 101 +aliases: + - /influxdb3/core/reference/api/client-libraries/nodejs/write +related: + - /influxdb3/core/write-data/troubleshoot/ +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/javascript/nodejs/write.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/kotlin.md b/content/influxdb3/core/reference/client-libraries/v2/kotlin.md new file mode 100644 index 000000000..91a40c4cc --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/kotlin.md @@ -0,0 +1,26 @@ +--- +title: Kotlin client library +seotitle: Use the Kotlin client library +list_title: Kotlin +description: Use the InfluxDB Kotlin client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-java/tree/master/client-kotlin +menu: + influxdb3_core: + name: Kotlin + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/kotlin.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/php.md b/content/influxdb3/core/reference/client-libraries/v2/php.md new file mode 100644 index 000000000..5c8fe6932 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/php.md @@ -0,0 +1,26 @@ +--- +title: PHP client library +seotitle: Use the InfluxDB PHP client library +list_title: PHP +description: Use the InfluxDB PHP client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-php +menu: + influxdb3_core: + name: PHP + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/php.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/python.md b/content/influxdb3/core/reference/client-libraries/v2/python.md new file mode 100644 index 000000000..e01f1e06f --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/python.md @@ -0,0 +1,31 @@ +--- +title: Python client library +seotitle: Use the InfluxDB Python client library +list_title: Python +description: > + Use the InfluxDB Python client library to interact with InfluxDB. +menu: + influxdb3_core: + name: Python + parent: v2 client libraries +influxdb3/core/tags: [client libraries, python] +aliases: + - /influxdb3/core/reference/api/client-libraries/python/ + - /influxdb3/core/reference/api/client-libraries/python-cl-guide/ + - /influxdb3/core/tools/client-libraries/python/ +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/python.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/r.md b/content/influxdb3/core/reference/client-libraries/v2/r.md new file mode 100644 index 000000000..7f07fa655 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/r.md @@ -0,0 +1,26 @@ +--- +title: R package client library +list_title: R +seotitle: Use the InfluxDB client R package +description: Use the InfluxDB client R package to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-r +menu: + influxdb3_core: + name: R + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/r.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/ruby.md b/content/influxdb3/core/reference/client-libraries/v2/ruby.md new file mode 100644 index 000000000..8fdb35abd --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/ruby.md @@ -0,0 +1,26 @@ +--- +title: Ruby client library +seotitle: Use the InfluxDB Ruby client library +list_title: Ruby +description: Use the InfluxDB Ruby client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-ruby +menu: + influxdb3_core: + name: Ruby + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/ruby.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/scala.md b/content/influxdb3/core/reference/client-libraries/v2/scala.md new file mode 100644 index 000000000..01b7b99e3 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/scala.md @@ -0,0 +1,26 @@ +--- +title: Scala client library +seotitle: Use the InfluxDB Scala client library +list_title: Scala +description: Use the InfluxDB Scala client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-java/tree/master/client-scala +menu: + influxdb3_core: + name: Scala + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/scala.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v2/swift.md b/content/influxdb3/core/reference/client-libraries/v2/swift.md new file mode 100644 index 000000000..08b5c75cd --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v2/swift.md @@ -0,0 +1,26 @@ +--- +title: Swift client library +seotitle: Use the InfluxDB Swift client library +list_title: Swift +description: Use the InfluxDB Swift client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-swift +menu: + influxdb3_core: + name: Swift + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/core/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/swift.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v3/_index.md b/content/influxdb3/core/reference/client-libraries/v3/_index.md new file mode 100644 index 000000000..f3f8544af --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v3/_index.md @@ -0,0 +1,17 @@ +--- +title: InfluxDB 3 API client libraries +description: > + InfluxDB 3 client libraries use InfluxDB HTTP APIs to write data and use [Flight clients](/influxdb3/{{% product-key %}}/reference/client-libraries/flight-sql) to execute SQL and InfluxQL queries. + View the list of available client libraries. +weight: 30 +menu: + influxdb3_core: + name: v3 client libraries + parent: Client libraries +influxdb3/core/tags: [client libraries, API, developer tools] +source: /shared/influxdb-client-libraries-reference/v3/_index.md +--- + + diff --git a/content/influxdb3/core/reference/client-libraries/v3/csharp.md b/content/influxdb3/core/reference/client-libraries/v3/csharp.md new file mode 100644 index 000000000..611c4dce2 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v3/csharp.md @@ -0,0 +1,19 @@ +--- +title: C# .NET client library for InfluxDB 3 +list_title: C# .NET +description: > + The InfluxDB 3 `influxdb3-csharp` C# .NET client library integrates with C# .NET scripts and applications to write and query data stored in an InfluxDB Core database. +external_url: https://github.com/InfluxCommunity/influxdb3-csharp +menu: + influxdb3_core: + name: C# .NET + parent: v3 client libraries + identifier: influxdb3-csharp +influxdb3/core/tags: [C#, gRPC, SQL, Flight SQL, client libraries] +weight: 201 +source: /shared/influxdb-client-libraries-reference/v3/csharp.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v3/go.md b/content/influxdb3/core/reference/client-libraries/v3/go.md new file mode 100644 index 000000000..6d69b559c --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v3/go.md @@ -0,0 +1,20 @@ +--- +title: Go client library for InfluxDB 3 +list_title: Go +description: The InfluxDB 3 `influxdb3-go` Go client library integrates with Go scripts and applications to write and query data stored in an {{% product-name %}} database. +menu: + influxdb3_core: + name: Go + parent: v3 client libraries + identifier: influxdb3-go +influxdb3/core/tags: [Flight client, go, InfluxQL, SQL, Flight, client libraries] +weight: 201 +aliases: + - /influxdb3/core/reference/api/client-libraries/go/ + - /influxdb3/core/tools/client-libraries/go/ +source: /shared/influxdb-client-libraries-reference/v3/go.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v3/java.md b/content/influxdb3/core/reference/client-libraries/v3/java.md new file mode 100644 index 000000000..32044c6f9 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v3/java.md @@ -0,0 +1,18 @@ +--- +title: Java client library for InfluxDB 3 +list_title: Java +description: > + The InfluxDB 3 `influxdb3-java` Java client library integrates with application code to write and query data stored in an InfluxDB Core database. +menu: + influxdb3_core: + name: Java + parent: v3 client libraries + identifier: influxdb3-java +influxdb3/core/tags: [Flight client, Java, gRPC, SQL, Flight SQL, client libraries] +weight: 201 +source: /shared/influxdb-client-libraries-reference/v3/java.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v3/javascript.md b/content/influxdb3/core/reference/client-libraries/v3/javascript.md new file mode 100644 index 000000000..73aa82727 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v3/javascript.md @@ -0,0 +1,22 @@ +--- +title: JavaScript client library for InfluxDB 3 +list_title: JavaScript +description: > + The InfluxDB 3 `influxdb3-js` JavaScript client library integrates with JavaScript scripts and applications to write and query data stored in an InfluxDB Core database. +external_url: https://github.com/InfluxCommunity/influxdb3-js +menu: + influxdb3_core: + name: JavaScript + parent: v3 client libraries + identifier: influxdb3-js +influxdb3/core/tags: [Flight client, JavaScript, gRPC, SQL, Flight SQL, client libraries] +weight: 201 +aliases: + - /influxdb3/core/reference/api/client-libraries/go/ + - /influxdb3/core/tools/client-libraries/go/ +source: /shared/influxdb-client-libraries-reference/v3/javascript.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/reference/client-libraries/v3/python.md b/content/influxdb3/core/reference/client-libraries/v3/python.md new file mode 100644 index 000000000..8a1153437 --- /dev/null +++ b/content/influxdb3/core/reference/client-libraries/v3/python.md @@ -0,0 +1,55 @@ +--- +title: Python client library for InfluxDB 3 +list_title: Python +description: The InfluxDB 3 `influxdb3-python` Python client library integrates with Python scripts and applications to write and query data stored in an InfluxDB Core database. +menu: + influxdb3_core: + name: Python + parent: v3 client libraries + identifier: influxdb3-python +influxdb3/core/tags: [Flight API, python, gRPC, SQL, client libraries] +metadata: [influxdb3-python v0.10.0] +weight: 201 +aliases: + - /influxdb3/core/reference/client-libraries/v3/pyinflux3/ +related: + - /influxdb3/core/query-data/execute-queries/troubleshoot/ +list_code_example: | + + + + + ```python + # Example: Write and query data + + # Write sensor data in batches from a CSV file to a database + client.write_file(file='./data/home-sensor-data.csv', + timestamp_column='time', + tag_columns=["room"]) + + # Execute a query and retrieve data from the last 90 days + table = client.query( + '''SELECT * + FROM home + WHERE time >= now() - INTERVAL '90 days' + ORDER BY time''') + + # This script assumes the client object is correctly configured + # with your database name, token, and host URL. + # After the script runs, the table variable contains the data + # formatted as a PyArrow table. + ``` +source: /shared/influxdb-client-libraries-reference/v3/python.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/write-data/api-client-libraries.md b/content/influxdb3/core/write-data/api-client-libraries.md new file mode 100644 index 000000000..fc44f2e06 --- /dev/null +++ b/content/influxdb3/core/write-data/api-client-libraries.md @@ -0,0 +1,24 @@ +--- +title: Use the HTTP API and client libraries to write data +description: > + Use the `/api/v3/write_lp` HTTP API endpoint and InfluxDB API clients to write points as line protocol data to {{% product-name %}}. +menu: + influxdb3_core: + name: Use the API and client libraries + parent: Write data + identifier: write-api-client-libs +weight: 100 +aliases: + - /influxdb3/core/write-data/client-libraries/ +related: + - /influxdb3/core/reference/syntax/line-protocol/ + - /influxdb3/core/get-started/write/ + - /influxdb3/core/reference/client-libraries/v3/ + - /influxdb3/core/api/v3/#operation/PostWriteLP, /api/v3/write_lp endpoint +source: /shared/influxdb3-write-guides/api-client-libraries.md +--- + + diff --git a/content/influxdb3/core/write-data/best-practices/_index.md b/content/influxdb3/core/write-data/best-practices/_index.md index ddb74b2fa..021d575ca 100644 --- a/content/influxdb3/core/write-data/best-practices/_index.md +++ b/content/influxdb3/core/write-data/best-practices/_index.md @@ -3,7 +3,7 @@ title: Best practices for writing data seotitle: Best practices for writing data to {{< product-name >}} description: > Learn about the recommendations and best practices for writing data to {{< product-name >}}. -weight: 105 +weight: 205 menu: influxdb3_core: name: Best practices diff --git a/content/influxdb3/core/write-data/client-libraries.md b/content/influxdb3/core/write-data/client-libraries.md deleted file mode 100644 index 44b886f13..000000000 --- a/content/influxdb3/core/write-data/client-libraries.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Use InfluxDB client libraries to write data -description: > - Use InfluxDB API clients to write points as line protocol data to {{% product-name %}}. -menu: - influxdb3_core: - name: Use client libraries - parent: Write data - identifier: write-client-libs -weight: 103 -related: - - /influxdb3/core/reference/syntax/line-protocol/ - - /influxdb3/core/get-started/write/ -source: /shared/influxdb3-write-guides/client-libraries.md ---- - - diff --git a/content/influxdb3/core/write-data/compatibility-apis.md b/content/influxdb3/core/write-data/compatibility-apis.md new file mode 100644 index 000000000..bf3631118 --- /dev/null +++ b/content/influxdb3/core/write-data/compatibility-apis.md @@ -0,0 +1,26 @@ +--- +title: Use compatibility APIs and client libraries to write data +description: > + Use HTTP API endpoints compatible with InfluxDB v2 and v1 clients to write + points as line protocol data to {{% product-name %}}. +menu: + influxdb3_core: + name: Use v1 and v2 compatibility APIs + parent: Write data + identifier: write-compatibility-client-libs +weight: 101 +aliases: + - /influxdb3/core/write-data/client-libraries/ +related: + - /influxdb3/core/reference/syntax/line-protocol/ + - /influxdb3/core/get-started/write/ + - /influxdb3/core/reference/client-libraries/v2/ + - /influxdb3/core/api/v3/#operation/PostV2Write, /api/v2/write (v2-compatible) endpoint + - /influxdb3/core/api/v3/#operation/PostV1Write, /write (v1-compatible) endpoint +source: /shared/influxdb3-write-guides/compatibility-apis.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/core/write-data/influxdb3-cli.md b/content/influxdb3/core/write-data/influxdb3-cli.md index 1c69dece8..71049cdd5 100644 --- a/content/influxdb3/core/write-data/influxdb3-cli.md +++ b/content/influxdb3/core/write-data/influxdb3-cli.md @@ -8,7 +8,7 @@ menu: name: Use the influxdb3 CLI parent: Write data identifier: write-influxdb3 -weight: 101 +weight: 105 related: - /influxdb3/core/reference/cli/influxdb3/write/ - /influxdb3/core/reference/syntax/line-protocol/ diff --git a/content/influxdb3/core/write-data/troubleshoot.md b/content/influxdb3/core/write-data/troubleshoot.md index cbd26faeb..427d6585c 100644 --- a/content/influxdb3/core/write-data/troubleshoot.md +++ b/content/influxdb3/core/write-data/troubleshoot.md @@ -1,7 +1,7 @@ --- title: Troubleshoot issues writing data seotitle: Troubleshoot issues writing data to InfluxDB -weight: 106 +weight: 215 description: > Troubleshoot issues writing data. Find response codes for failed writes. diff --git a/content/influxdb3/enterprise/get-started/_index.md b/content/influxdb3/enterprise/get-started/_index.md index 55f130949..adddfedd1 100644 --- a/content/influxdb3/enterprise/get-started/_index.md +++ b/content/influxdb3/enterprise/get-started/_index.md @@ -11,10 +11,12 @@ menu: weight: 3 related: - /influxdb3/enterprise/admin/query-system-data/ + - /influxdb3/enterprise/write-data/ + - /influxdb3/enterprise/query-data/ source: /shared/v3-enterprise-get-started/_index.md --- diff --git a/content/influxdb3/enterprise/reference/client-libraries/_index.md b/content/influxdb3/enterprise/reference/client-libraries/_index.md new file mode 100644 index 000000000..3659e0454 --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/_index.md @@ -0,0 +1,22 @@ +--- +title: InfluxDB API client libraries +description: > + InfluxDB client libraries are language-specific tools that integrate with InfluxDB APIs. + View the list of available client libraries. +list_title: API client libraries +weight: 105 +aliases: + - /influxdb3/enterprise/reference/api/client-libraries/ + - /influxdb3/enterprise/tools/client-libraries/ + - /influxdb3/enterprise/api-guide/client-libraries/ +menu: + influxdb3_enterprise: + name: Client libraries + parent: Reference +influxdb3/enterprise/tags: [client libraries, API, developer tools] +source: /shared/influxdb-client-libraries-reference/_index.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/flight/_index.md b/content/influxdb3/enterprise/reference/client-libraries/flight/_index.md new file mode 100644 index 000000000..c05d9140e --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/flight/_index.md @@ -0,0 +1,21 @@ +--- +title: Apache Arrow Flight RPC clients +description: > + Flight clients are language-specific drivers that can interact with Flight servers using the Arrow in-memory format and the Flight RPC framework. + View the list of available clients. +weight: 30 +menu: + influxdb3_enterprise: + name: Arrow Flight clients + parent: Client libraries +influxdb3/enterprise/tags: [client libraries, Flight RPC, Flight SQL] +aliases: + - /influxdb3/enterprise/reference/client-libraries/flight-sql/ + - /influxdb3/enterprise/reference/client-libraries/flight-sql/go-flightsql/ + - /influxdb3/enterprise/reference/client-libraries/flight-sql/python-flightsql-dbapi/ +source: /shared/influxdb-client-libraries-reference/flight/_index.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/flight/csharp-flight.md b/content/influxdb3/enterprise/reference/client-libraries/flight/csharp-flight.md new file mode 100644 index 000000000..87a87f956 --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/flight/csharp-flight.md @@ -0,0 +1,18 @@ +--- +title: C# .NET Flight client +description: The C# .NET Flight client integrates with C# .NET scripts and applications to query data stored in InfluxDB. +menu: + influxdb3_enterprise: + name: C# .NET + parent: Arrow Flight clients + identifier: csharp-flight-client +influxdb3/enterprise/tags: [C#, gRPC, SQL, Flight SQL, client libraries] +aliases: + - /influxdb3/enterprise/reference/client-libraries/flight-sql/csharp-flightsql/ +weight: 201 +source: /shared/influxdb-client-libraries-reference/flight/csharp-flight.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/flight/go-flight.md b/content/influxdb3/enterprise/reference/client-libraries/flight/go-flight.md new file mode 100644 index 000000000..e3601766b --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/flight/go-flight.md @@ -0,0 +1,20 @@ +--- +title: Go Flight client +description: The Go Flight client integrates with Go scripts and applications to query data stored in InfluxDB. +menu: + influxdb3_enterprise: + name: Go + parent: Arrow Flight clients + identifier: go-flight-client +influxdb3/enterprise/tags: [Flight client, Go, gRPC, SQL, Flight SQL, client libraries] +related: + - /influxdb3/enterprise/reference/client-libraries/v3/go/ +aliases: + - /influxdb3/enterprise/reference/client-libraries/flight-sql/go-flightsql/ +weight: 201 +source: /shared/influxdb-client-libraries-reference/flight/go-flight.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/flight/java-flightsql.md b/content/influxdb3/enterprise/reference/client-libraries/flight/java-flightsql.md new file mode 100644 index 000000000..f853eac79 --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/flight/java-flightsql.md @@ -0,0 +1,45 @@ +--- +title: Java Flight SQL package +description: The Java Flight SQL client integrates with Java applications to query and retrieve data from Flight database servers using RPC and SQL. +menu: + influxdb3_enterprise: + name: Java Flight SQL + parent: Arrow Flight clients + identifier: java-flightsql-client +influxdb3/enterprise/tags: [Flight client, Java, gRPC, SQL, Flight SQL] +weight: 201 +related: + - /influxdb3/enterprise/reference/client-libraries/v3/java/ +aliases: + - /influxdb3/enterprise/reference/client-libraries/flight-sql/java-flightsql/ +list_code_example: | + ```java + public class Query { + public static void main(String[] args) { + String query = "SELECT * FROM home"; + Location location = Location.forGrpcTls(HOST, 443); + + CredentialCallOption auth = new CredentialCallOption(new BearerCredentialWriter(TOKEN)); + BufferAllocator allocator = new RootAllocator(Long.MAX_VALUE); + + FlightClientMiddleware.Factory f = info -> new FlightClientMiddleware() { + @Override + public void onBeforeSendingHeaders(CallHeaders outgoingHeaders) { + outgoingHeaders.insert(DATABASE_FIELD, DATABASE_NAME); + } + }; + + FlightClient client = FlightClient.builder(allocator, location) + .intercept(f) + .build(); + FlightSqlClient sqlClient = new FlightSqlClient(client); + FlightInfo flightInfo = sqlClient.execute(query, auth); + } + } + ``` +source: /shared/influxdb-client-libraries-reference/flight/java-flightsql.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/flight/python-flight.md b/content/influxdb3/enterprise/reference/client-libraries/flight/python-flight.md new file mode 100644 index 000000000..497e62fd2 --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/flight/python-flight.md @@ -0,0 +1,53 @@ +--- +title: Python Flight client +description: The Python Flight client integrates with Python scripts and applications to query data stored in InfluxDB. +menu: + influxdb3_enterprise: + name: Python + parent: Arrow Flight clients + identifier: python-flight-client +influxdb3/enterprise/tags: [Flight client, Python, gRPC, SQL, Flight SQL, client libraries] +aliases: + - /influxdb3/enterprise/reference/client-libraries/flight-sql/python-flightsql/ +weight: 201 +list_code_example: | + ```py + from pyarrow.flight import FlightClient, Ticket, FlightCallOptions + import json + import pandas + import tabulate + + # Downsampling query groups data into 2-hour bins + sql=""" + SELECT DATE_BIN(INTERVAL '2 hours', + time, + '1970-01-01T00:00:00Z') AS time, + room, + selector_max(temp, time)['value'] AS 'max temp', + selector_min(temp, time)['value'] AS 'min temp', + avg(temp) AS 'average temp' + FROM home + GROUP BY + 1, + room + ORDER BY room, 1""" + + flight_ticket = Ticket(json.dumps({ + "namespace_name": "DATABASE_NAME", + "sql_query": sql, + "query_type": "sql" + })) + + token = (b"authorization", bytes(f"Bearer DATABASE_TOKEN".encode('utf-8'))) + options = FlightCallOptions(headers=[token]) + client = FlightClient(f"grpc+tls://{{< influxdb/host >}}:443") + + reader = client.do_get(flight_ticket, options) + arrow_table = reader.read_all() + ``` +source: /shared/influxdb-client-libraries-reference/flight/python-flight.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/flight/python-flightsql-dbapi.md b/content/influxdb3/enterprise/reference/client-libraries/flight/python-flightsql-dbapi.md new file mode 100644 index 000000000..9cd2fc0cd --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/flight/python-flightsql-dbapi.md @@ -0,0 +1,18 @@ +--- +title: Python Flight SQL DBAPI client +description: The Python `flightsql-dbapi` library uses SQL and the Flight SQL protocol to query data stored in an InfluxDB Core database. +menu: + influxdb3_enterprise: + name: Python Flight SQL + parent: Arrow Flight clients + identifier: python-flightsql-client +influxdb3/enterprise/tags: [Flight client, Python, SQL, Flight SQL] +weight: 201 +aliases: + - /influxdb3/enterprise/reference/client-libraries/flight-sql/python-flightsql/ +source: /shared/influxdb-client-libraries-reference/flight/python-flightsql-dbapi.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v1/_index.md b/content/influxdb3/enterprise/reference/client-libraries/v1/_index.md new file mode 100644 index 000000000..d056244f2 --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v1/_index.md @@ -0,0 +1,17 @@ +--- +title: InfluxDB v1 client libraries +description: > + InfluxDB v1 client libraries use the InfluxDB 1.7 API and should be fully compatible with InfluxDB 1.5+. + View the list of available client libraries. +menu: + influxdb3_enterprise: + weight: 201 + name: v1 client libraries + parent: Client libraries +influxdb3/enterprise/tags: [client libraries, API, developer tools] +source: /shared/influxdb-client-libraries-reference/v1/_index.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/_index.md b/content/influxdb3/enterprise/reference/client-libraries/v2/_index.md new file mode 100644 index 000000000..b0e923a20 --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/_index.md @@ -0,0 +1,33 @@ +--- +title: InfluxDB v2 API client libraries +description: > + InfluxDB v2 client libraries use InfluxDB `/api/v2` endpoints and work with [InfluxDB 2.x API compatibility endpoints](/influxdb/v1/tools/api/#influxdb-2x-api-compatibility-endpoints). + View the list of available client libraries. +weight: 101 +menu: + influxdb3_enterprise: + name: v2 client libraries + parent: Client libraries +influxdb3/enterprise/tags: [client libraries, API, developer tools] +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 + > client libraries and the `influx` CLI, _can't query_ data stored in + > {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) + > are available that integrate with your code to write and query data stored + > in {{% product-name %}}. + > + > InfluxDB 3 supports many different tools for [**writing**](/influxdb3/enterprise/write-data/) + > and [**querying**](/influxdb3/enterprise/query-data/) data. + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) + > to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/_index.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/arduino.md b/content/influxdb3/enterprise/reference/client-libraries/v2/arduino.md new file mode 100644 index 000000000..c119df5c5 --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/arduino.md @@ -0,0 +1,27 @@ +--- +title: Arduino client library +seotitle: Use the InfluxDB Arduino client library +list_title: Arduino +description: Use the InfluxDB Arduino client library to interact with InfluxDB. +external_url: https://github.com/tobiasschuerg/InfluxDB-Client-for-Arduino +list_note: _– contributed by [tobiasschuerg](https://github.com/tobiasschuerg)_ +menu: + influxdb3_enterprise: + name: Arduino + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/arduino.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/csharp.md b/content/influxdb3/enterprise/reference/client-libraries/v2/csharp.md new file mode 100644 index 000000000..fdfad71f0 --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/csharp.md @@ -0,0 +1,26 @@ +--- +title: C# client library +list_title: C# +seotitle: Use the InfluxDB C# client library +description: Use the InfluxDB C# client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-csharp +menu: + influxdb3_enterprise: + name: C# + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/csharp.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/dart.md b/content/influxdb3/enterprise/reference/client-libraries/v2/dart.md new file mode 100644 index 000000000..69398f8e1 --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/dart.md @@ -0,0 +1,26 @@ +--- +title: Dart client library +list_title: Dart +seotitle: Use the InfluxDB Dart client library +description: Use the InfluxDB Dart client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-dart +menu: + influxdb3_enterprise: + name: Dart + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/dart.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/go.md b/content/influxdb3/enterprise/reference/client-libraries/v2/go.md new file mode 100644 index 000000000..3dfc6f996 --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/go.md @@ -0,0 +1,27 @@ +--- +title: InfluxDB v2 Go client library +list_title: Go +description: > + The InfluxDB v2 Go client library integrates with Go applications to write data to an InfluxDB Core database. +menu: + influxdb3_enterprise: + name: Go + parent: v2 client libraries +influxdb3/enterprise/tags: [client libraries, Go] +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/go.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/java.md b/content/influxdb3/enterprise/reference/client-libraries/v2/java.md new file mode 100644 index 000000000..321b52399 --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/java.md @@ -0,0 +1,26 @@ +--- +title: Java client library +seotitle: Use the InfluxDB Java client library +list_title: Java +description: Use the Java client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-java +menu: + influxdb3_enterprise: + name: Java + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/java.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/javascript/_index.md b/content/influxdb3/enterprise/reference/client-libraries/v2/javascript/_index.md new file mode 100644 index 000000000..64d6136fd --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/javascript/_index.md @@ -0,0 +1,30 @@ +--- +title: JavaScript client library for the InfluxDB v2 API +seotitle: InfluxDB v2 JavaScript client library for the InfluxDB v2 API +list_title: JavaScript +description: > + The [InfluxDB v2 JavaScript client library](https://github.com/influxdata/influxdb-client-js) + for Node.js and browsers integrates with the InfluxDB v2 API to write data to an InfluxDB Core cluster. +menu: + influxdb3_enterprise: + name: JavaScript + parent: v2 client libraries +influxdb3/enterprise/tags: [client libraries, JavaScript, NodeJS] +weight: 201 +aliases: + - /influxdb3/enterprise/reference/api/client-libraries/js/ +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/javascript/_index.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/javascript/browser.md b/content/influxdb3/enterprise/reference/client-libraries/v2/javascript/browser.md new file mode 100644 index 000000000..037326d13 --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/javascript/browser.md @@ -0,0 +1,33 @@ +--- +title: InfluxDB v2 JavaScript client library for web browsers +list_title: JavaScript for browsers +description: > + Use the InfluxDB v2 JavaScript client library in browsers and front-end clients to write data to an InfluxDB Core database. +menu: + influxdb3_enterprise: + name: Browsers and web clients + identifier: client_js_browsers + parent: JavaScript +influxdb3/enterprise/tags: [client libraries, JavaScript] +weight: 201 +aliases: + - /influxdb3/enterprise/api-guide/client-libraries/browserjs/write + - /influxdb3/enterprise/api-guide/client-libraries/browserjs/query +related: + - /influxdb3/enterprise/reference/client-libraries/v2/javascript/nodejs/write/ + - /influxdb3/enterprise/api-guide/client-libraries/nodejs/query/ +prepend: | + > [!Warning] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/javascript/browser.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/javascript/nodejs/_index.md b/content/influxdb3/enterprise/reference/client-libraries/v2/javascript/nodejs/_index.md new file mode 100644 index 000000000..80ac03e25 --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/javascript/nodejs/_index.md @@ -0,0 +1,30 @@ +--- +title: Node.js JavaScript client library +seotitle: InfluxDB v2 JavaScript client library for Node.js +list_title: Node.js +description: > + The [InfluxDB v2 JavaScript client library](https://github.com/influxdata/influxdb-client-js) + for Node.js integrates with the InfluxDB v2 API to write data to an InfluxDB Core database. +menu: + influxdb3_enterprise: + name: Node.js + parent: JavaScript +influxdb3/enterprise/tags: [client libraries, JavaScript, NodeJS] +weight: 201 +aliases: + - /influxdb3/enterprise/reference/api/client-libraries/nodejs/ +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/javascript/nodejs/_index.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/javascript/nodejs/install.md b/content/influxdb3/enterprise/reference/client-libraries/v2/javascript/nodejs/install.md new file mode 100644 index 000000000..97ea3e77e --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/javascript/nodejs/install.md @@ -0,0 +1,27 @@ +--- +title: Install the InfluxDB v2 JavaScript client library +description: > + Install the Node.js JavaScript client library to write data to an InfluxDB Core database. +menu: + influxdb3_enterprise: + name: Install + parent: Node.js +influxdb3/enterprise/tags: [client libraries, JavaScript] +weight: 100 +aliases: + - /influxdb3/enterprise/reference/api/client-libraries/nodejs/install +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/javascript/nodejs/install.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/javascript/nodejs/write.md b/content/influxdb3/enterprise/reference/client-libraries/v2/javascript/nodejs/write.md new file mode 100644 index 000000000..7b26e54a7 --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/javascript/nodejs/write.md @@ -0,0 +1,30 @@ +--- +title: Write data with the InfluxDB v2 JavaScript client library +list_title: Write data +description: > + The InfluxDB v2 JavaScript client library integrates with Node.js applications to write data to the InfluxDB v2 API. +menu: + influxdb3_enterprise: + name: Write + parent: Node.js +influxdb3/enterprise/tags: [client libraries, JavaScript] +weight: 101 +aliases: + - /influxdb3/enterprise/reference/api/client-libraries/nodejs/write +related: + - /influxdb3/enterprise/write-data/troubleshoot/ +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/javascript/nodejs/write.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/kotlin.md b/content/influxdb3/enterprise/reference/client-libraries/v2/kotlin.md new file mode 100644 index 000000000..4535b295d --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/kotlin.md @@ -0,0 +1,26 @@ +--- +title: Kotlin client library +seotitle: Use the Kotlin client library +list_title: Kotlin +description: Use the InfluxDB Kotlin client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-java/tree/master/client-kotlin +menu: + influxdb3_enterprise: + name: Kotlin + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/kotlin.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/php.md b/content/influxdb3/enterprise/reference/client-libraries/v2/php.md new file mode 100644 index 000000000..a8c202982 --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/php.md @@ -0,0 +1,26 @@ +--- +title: PHP client library +seotitle: Use the InfluxDB PHP client library +list_title: PHP +description: Use the InfluxDB PHP client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-php +menu: + influxdb3_enterprise: + name: PHP + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/php.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/python.md b/content/influxdb3/enterprise/reference/client-libraries/v2/python.md new file mode 100644 index 000000000..866f09145 --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/python.md @@ -0,0 +1,32 @@ +--- +title: Python client library +seotitle: Use the InfluxDB Python client library +list_title: Python +description: > + Use the InfluxDB Python client library to interact with InfluxDB. +menu: + influxdb3_enterprise: + name: Python + parent: v2 client libraries +influxdb3/enterprise/tags: [client libraries, python] +aliases: + - /influxdb3/enterprise/reference/api/client-libraries/python/ + - /influxdb3/enterprise/reference/api/client-libraries/python-cl-guide/ + - /influxdb3/enterprise/tools/client-libraries/python/ +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/python.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/r.md b/content/influxdb3/enterprise/reference/client-libraries/v2/r.md new file mode 100644 index 000000000..d6bd937bc --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/r.md @@ -0,0 +1,26 @@ +--- +title: R package client library +list_title: R +seotitle: Use the InfluxDB client R package +description: Use the InfluxDB client R package to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-r +menu: + influxdb3_enterprise: + name: R + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/r.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/ruby.md b/content/influxdb3/enterprise/reference/client-libraries/v2/ruby.md new file mode 100644 index 000000000..7441e7c1d --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/ruby.md @@ -0,0 +1,26 @@ +--- +title: Ruby client library +seotitle: Use the InfluxDB Ruby client library +list_title: Ruby +description: Use the InfluxDB Ruby client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-ruby +menu: + influxdb3_enterprise: + name: Ruby + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/ruby.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/scala.md b/content/influxdb3/enterprise/reference/client-libraries/v2/scala.md new file mode 100644 index 000000000..fb4883b1a --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/scala.md @@ -0,0 +1,26 @@ +--- +title: Scala client library +seotitle: Use the InfluxDB Scala client library +list_title: Scala +description: Use the InfluxDB Scala client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-java/tree/master/client-scala +menu: + influxdb3_enterprise: + name: Scala + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/scala.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v2/swift.md b/content/influxdb3/enterprise/reference/client-libraries/v2/swift.md new file mode 100644 index 000000000..44ddb9431 --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v2/swift.md @@ -0,0 +1,26 @@ +--- +title: Swift client library +seotitle: Use the InfluxDB Swift client library +list_title: Swift +description: Use the InfluxDB Swift client library to interact with InfluxDB. +external_url: https://github.com/influxdata/influxdb-client-swift +menu: + influxdb3_enterprise: + name: Swift + parent: v2 client libraries +weight: 201 +prepend: | + > [!WARNING] + > #### Use InfluxDB 3 clients to query + > + > InfluxDB 3 supports [compatibility endpoints for _writing data_](/influxdb3/{{% product-key %}}/write-data/compatibility-apis/) using InfluxDB v2 and v1 tools. However, the `/api/v2/query` API endpoint and associated tooling, such as InfluxDB v2 client libraries and the `influx` CLI, _can't query_ data stored in {{% product-name %}}. + > + > [InfluxDB 3 client libraries](/influxdb3/{{% product-key %}}/reference/client-libraries/v3/) are available that integrate with your code to write and query data stored in {{% product-name %}}. + > + > [**Compare tools you can use**](/influxdb3/enterprise/get-started/#tools-to-use) to interact with {{% product-name %}}. +source: /shared/influxdb-client-libraries-reference/v2/swift.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v3/_index.md b/content/influxdb3/enterprise/reference/client-libraries/v3/_index.md new file mode 100644 index 000000000..9bc0e303c --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v3/_index.md @@ -0,0 +1,17 @@ +--- +title: InfluxDB 3 API client libraries +description: > + InfluxDB 3 client libraries use InfluxDB HTTP APIs to write data and use [Flight clients](/influxdb3/{{% product-key %}}/reference/client-libraries/flight-sql) to execute SQL and InfluxQL queries. + View the list of available client libraries. +weight: 30 +menu: + influxdb3_enterprise: + name: v3 client libraries + parent: Client libraries +influxdb3/enterprise/tags: [client libraries, API, developer tools] +source: /shared/influxdb-client-libraries-reference/v3/_index.md +--- + + diff --git a/content/influxdb3/enterprise/reference/client-libraries/v3/csharp.md b/content/influxdb3/enterprise/reference/client-libraries/v3/csharp.md new file mode 100644 index 000000000..080a001bf --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v3/csharp.md @@ -0,0 +1,19 @@ +--- +title: C# .NET client library for InfluxDB 3 +list_title: C# .NET +description: > + The InfluxDB 3 `influxdb3-csharp` C# .NET client library integrates with C# .NET scripts and applications to write and query data stored in an InfluxDB Core database. +external_url: https://github.com/InfluxCommunity/influxdb3-csharp +menu: + influxdb3_enterprise: + name: C# .NET + parent: v3 client libraries + identifier: influxdb3-csharp +influxdb3/enterprise/tags: [C#, gRPC, SQL, Flight SQL, client libraries] +weight: 201 +source: /shared/influxdb-client-libraries-reference/v3/csharp.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v3/go.md b/content/influxdb3/enterprise/reference/client-libraries/v3/go.md new file mode 100644 index 000000000..eb355f8ae --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v3/go.md @@ -0,0 +1,20 @@ +--- +title: Go client library for InfluxDB 3 +list_title: Go +description: The InfluxDB 3 `influxdb3-go` Go client library integrates with Go scripts and applications to write and query data stored in an {{% product-name %}} database. +menu: + influxdb3_enterprise: + name: Go + parent: v3 client libraries + identifier: influxdb3-go +influxdb3/enterprise/tags: [Flight client, go, InfluxQL, SQL, Flight, client libraries] +weight: 201 +aliases: + - /influxdb3/enterprise/reference/api/client-libraries/go/ + - /influxdb3/enterprise/tools/client-libraries/go/ +source: /shared/influxdb-client-libraries-reference/v3/go.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v3/java.md b/content/influxdb3/enterprise/reference/client-libraries/v3/java.md new file mode 100644 index 000000000..691edab5a --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v3/java.md @@ -0,0 +1,18 @@ +--- +title: Java client library for InfluxDB 3 +list_title: Java +description: > + The InfluxDB 3 `influxdb3-java` Java client library integrates with application code to write and query data stored in an InfluxDB Core database. +menu: + influxdb3_enterprise: + name: Java + parent: v3 client libraries + identifier: influxdb3-java +influxdb3/enterprise/tags: [Flight client, Java, gRPC, SQL, Flight SQL, client libraries] +weight: 201 +source: /shared/influxdb-client-libraries-reference/v3/java.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v3/javascript.md b/content/influxdb3/enterprise/reference/client-libraries/v3/javascript.md new file mode 100644 index 000000000..70022e09b --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v3/javascript.md @@ -0,0 +1,22 @@ +--- +title: JavaScript client library for InfluxDB 3 +list_title: JavaScript +description: > + The InfluxDB 3 `influxdb3-js` JavaScript client library integrates with JavaScript scripts and applications to write and query data stored in an InfluxDB Core database. +external_url: https://github.com/InfluxCommunity/influxdb3-js +menu: + influxdb3_enterprise: + name: JavaScript + parent: v3 client libraries + identifier: influxdb3-js +influxdb3/enterprise/tags: [Flight client, JavaScript, gRPC, SQL, Flight SQL, client libraries] +weight: 201 +aliases: + - /influxdb3/enterprise/reference/api/client-libraries/go/ + - /influxdb3/enterprise/tools/client-libraries/go/ +source: /shared/influxdb-client-libraries-reference/v3/javascript.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/reference/client-libraries/v3/python.md b/content/influxdb3/enterprise/reference/client-libraries/v3/python.md new file mode 100644 index 000000000..93607c4bf --- /dev/null +++ b/content/influxdb3/enterprise/reference/client-libraries/v3/python.md @@ -0,0 +1,55 @@ +--- +title: Python client library for InfluxDB 3 +list_title: Python +description: The InfluxDB 3 `influxdb3-python` Python client library integrates with Python scripts and applications to write and query data stored in an InfluxDB Core database. +menu: + influxdb3_enterprise: + name: Python + parent: v3 client libraries + identifier: influxdb3-python +influxdb3/enterprise/tags: [Flight API, python, gRPC, SQL, client libraries] +metadata: [influxdb3-python v0.10.0] +weight: 201 +aliases: + - /influxdb3/enterprise/reference/client-libraries/v3/pyinflux3/ +related: + - /influxdb3/enterprise/query-data/execute-queries/troubleshoot/ +list_code_example: | + + + + + ```python + # Example: Write and query data + + # Write sensor data in batches from a CSV file to a database + client.write_file(file='./data/home-sensor-data.csv', + timestamp_column='time', + tag_columns=["room"]) + + # Execute a query and retrieve data from the last 90 days + table = client.query( + '''SELECT * + FROM home + WHERE time >= now() - INTERVAL '90 days' + ORDER BY time''') + + # This script assumes the client object is correctly configured + # with your database name, token, and host URL. + # After the script runs, the table variable contains the data + # formatted as a PyArrow table. + ``` +source: /shared/influxdb-client-libraries-reference/v3/python.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/write-data/api-client-libraries.md b/content/influxdb3/enterprise/write-data/api-client-libraries.md new file mode 100644 index 000000000..5e51607b5 --- /dev/null +++ b/content/influxdb3/enterprise/write-data/api-client-libraries.md @@ -0,0 +1,24 @@ +--- +title: Use the HTTP API and client libraries to write data +description: > + Use the `/api/v3/write_lp` HTTP API endpoint and InfluxDB API clients to write points as line protocol data to {{% product-name %}}. +menu: + influxdb3_enterprise: + name: Use the API and client libraries + parent: Write data + identifier: write-api-client-libs +weight: 100 +aliases: + - /influxdb3/enterprise/write-data/client-libraries/ +related: + - /influxdb3/enterprise/reference/syntax/line-protocol/ + - /influxdb3/enterprise/get-started/write/ + - /influxdb3/enterprise/reference/client-libraries/v3/ + - /influxdb3/enterprise/api/v3/#operation/PostWriteLP, /api/v3/write_lp endpoint +source: /shared/influxdb3-write-guides/api-client-libraries.md +--- + + diff --git a/content/influxdb3/enterprise/write-data/best-practices/_index.md b/content/influxdb3/enterprise/write-data/best-practices/_index.md index 45f1d8cfb..4b1f90691 100644 --- a/content/influxdb3/enterprise/write-data/best-practices/_index.md +++ b/content/influxdb3/enterprise/write-data/best-practices/_index.md @@ -3,7 +3,7 @@ title: Best practices for writing data seotitle: Best practices for writing data to {{< product-name >}} description: > Learn about the recommendations and best practices for writing data to {{< product-name >}}. -weight: 105 +weight: 205 menu: influxdb3_enterprise: name: Best practices diff --git a/content/influxdb3/enterprise/write-data/client-libraries.md b/content/influxdb3/enterprise/write-data/client-libraries.md deleted file mode 100644 index e4e84824b..000000000 --- a/content/influxdb3/enterprise/write-data/client-libraries.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: Use InfluxDB client libraries to write data -description: > - Use InfluxDB API clients to write points as line protocol data to {{% product-name %}}. -menu: - influxdb3_enterprise: - name: Use client libraries - parent: Write data - identifier: write-client-libs -weight: 103 -related: - - /influxdb3/enterprise/reference/syntax/line-protocol/ - - /influxdb3/enterprise/get-started/write/ -source: /shared/influxdb3-write-guides/client-libraries.md ---- - - diff --git a/content/influxdb3/enterprise/write-data/compatibility-apis.md b/content/influxdb3/enterprise/write-data/compatibility-apis.md new file mode 100644 index 000000000..40b25bde7 --- /dev/null +++ b/content/influxdb3/enterprise/write-data/compatibility-apis.md @@ -0,0 +1,26 @@ +--- +title: Use compatibility APIs and client libraries to write data +description: > + Use HTTP API endpoints compatible with InfluxDB v2 and v1 clients to write + points as line protocol data to {{% product-name %}}. +menu: + influxdb3_enterprise: + name: Use v1 and v2 compatibility APIs + parent: Write data + identifier: write-compatibility-client-libs +weight: 101 +aliases: + - /influxdb3/enterprise/write-data/client-libraries/ +related: + - /influxdb3/enterprise/reference/syntax/line-protocol/ + - /influxdb3/enterprise/get-started/write/ + - /influxdb3/enterprise/reference/client-libraries/v2/ + - /influxdb3/enterprise/api/v3/#operation/PostV2Write, /api/v2/write (v2-compatible) endpoint + - /influxdb3/enterprise/api/v3/#operation/PostV1Write, /write (v1-compatible) endpoint +source: /shared/influxdb3-write-guides/compatibility-apis.md +--- + + \ No newline at end of file diff --git a/content/influxdb3/enterprise/write-data/influxdb3-cli.md b/content/influxdb3/enterprise/write-data/influxdb3-cli.md index d003d5926..bcb2769f6 100644 --- a/content/influxdb3/enterprise/write-data/influxdb3-cli.md +++ b/content/influxdb3/enterprise/write-data/influxdb3-cli.md @@ -8,7 +8,7 @@ menu: name: Use the influxdb3 CLI parent: Write data identifier: write-influxdb3 -weight: 101 +weight: 105 related: - /influxdb3/enterprise/reference/cli/influxdb3/write/ - /influxdb3/enterprise/reference/syntax/line-protocol/ diff --git a/content/influxdb3/enterprise/write-data/troubleshoot.md b/content/influxdb3/enterprise/write-data/troubleshoot.md index 1c75ab0ef..87fe2ac70 100644 --- a/content/influxdb3/enterprise/write-data/troubleshoot.md +++ b/content/influxdb3/enterprise/write-data/troubleshoot.md @@ -1,7 +1,7 @@ --- title: Troubleshoot issues writing data seotitle: Troubleshoot issues writing data to InfluxDB -weight: 106 +weight: 210 description: > Troubleshoot issues writing data. Find response codes for failed writes. diff --git a/content/shared/influxdb-client-libraries-reference/_index.md b/content/shared/influxdb-client-libraries-reference/_index.md new file mode 100644 index 000000000..748b75589 --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/_index.md @@ -0,0 +1,3 @@ +InfluxDB client libraries are language-specific packages that integrate with InfluxDB APIs. + +{{< children depth="999" description="true" >}} diff --git a/content/shared/influxdb-client-libraries-reference/flight/_index.md b/content/shared/influxdb-client-libraries-reference/flight/_index.md new file mode 100644 index 000000000..edf8ffdb6 --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/flight/_index.md @@ -0,0 +1,20 @@ +Flight RPC and Flight SQL clients are language-specific drivers that interact with databases using the Arrow in-memory format and the Flight RPC protocol. +Apache Arrow Flight RPC and Flight SQL protocols define APIs for servers and clients. + +> [!Note] +> #### Use InfluxDB 3 client libraries +> +> We recommend using [InfluxDB 3 client libraries](/influxdb3/version/reference/client-libraries/v3/) for integrating InfluxDB 3 with your application code. +> Client libraries wrap Apache Arrow Flight clients +> and provide convenient methods for [writing](/influxdb3/version/write-data/client-libraries/), [querying](/influxdb3/version/query-data/execute-queries/client-libraries), and processing data stored in {{% product-name %}}. + +**Flight RPC clients** can use SQL or InfluxQL to query data stored in an {{% product-name %}} database. +Using InfluxDB 3's IOx-specific Flight RPC protocol, clients send a single `DoGet()` request to authenticate, query, and retrieve data. + +**Flight SQL clients** use the [Flight SQL protocol](https://arrow.apache.org/docs/format/FlightSql.html) for querying an SQL database server. +They can use SQL to query data stored in an {{% product-name %}} database, but they can't use InfuxQL. + +Clients are maintained by Apache Arrow projects or third-parties. +For specifics about a Flight client, see the client's GitHub repository. + +{{< children >}} diff --git a/content/shared/influxdb-client-libraries-reference/flight/csharp-flight.md b/content/shared/influxdb-client-libraries-reference/flight/csharp-flight.md new file mode 100644 index 000000000..1163b3a2e --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/flight/csharp-flight.md @@ -0,0 +1,12 @@ +[Apache Arrow for C# .NET](https://github.com/apache/arrow/blob/main/csharp/README.md) integrates with C# .NET scripts and applications to query data stored in InfluxDB. + +For more information, see the [C# client example on GitHub](https://github.com/apache/arrow/tree/main/csharp/examples/FlightClientExample). + +> [!Note] +> #### Use InfluxDB 3 client libraries +> +> We recommend using the [`influxdb3-csharp` C# client library](/influxdb3/version/reference/client-libraries/v3/csharp/) for integrating InfluxDB 3 with your C# application code. +> +> [InfluxDB 3 client libraries](/influxdb3/version/reference/client-libraries/v3/) wrap Apache Arrow Flight clients +> and provide convenient methods for [writing](/influxdb3/version/get-started/write/#write-line-protocol-to-influxdb), [querying](/influxdb3/version/get-started/query/#execute-an-sql-query), and processing data stored in {{% product-name %}}. +> Client libraries can query using SQL or InfluxQL. diff --git a/content/shared/influxdb-client-libraries-reference/flight/go-flight.md b/content/shared/influxdb-client-libraries-reference/flight/go-flight.md new file mode 100644 index 000000000..cc1b97109 --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/flight/go-flight.md @@ -0,0 +1,200 @@ +[Apache Arrow for Go](https://pkg.go.dev/github.com/apache/arrow/go/v12) integrates with Go scripts and applications to query data stored in InfluxDB. + +> [!Note] +> #### Use InfluxDB 3 client libraries +> +> We recommend using the [`influxdb3-go` Go client library](/influxdb3/version/reference/client-libraries/v3/go/) for integrating InfluxDB 3 with your Go application code. +> +> [InfluxDB 3 client libraries](/influxdb3/version/reference/client-libraries/v3/) wrap Apache Arrow Flight clients +> and provide convenient methods for [writing](/influxdb3/version/get-started/write/#write-line-protocol-to-influxdb), [querying](/influxdb3/version/get-started/query/#execute-an-sql-query), and processing data stored in {{% product-name %}}. +> Client libraries can query using SQL or InfluxQL. + +## Flight SQL client + +### Example query using Flight SQL + +The following example shows how to use the Arrow Flight SQL client for Go to query an {{% product-name %}} database: + +1. In your editor, open a new file named `query.go` and enter the following sample code: + + ```go + package main + + import ( + "context" + "crypto/x509" + "encoding/json" + "fmt" + "os" + + "github.com/apache/arrow/go/v14/arrow/flight/flightsql" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials" + "google.golang.org/grpc/metadata" + ) + + func dbQuery(ctx context.Context) error { + url := "{{< influxdb/host >}}:443" + + // INFLUX_TOKEN is an environment variable you created for your database READ token + token := os.Getenv("INFLUX_TOKEN") + database := "get-started" + + // Create a gRPC transport + pool, err := x509.SystemCertPool() + if err != nil { + return fmt.Errorf("x509: %s", err) + } + transport := grpc.WithTransportCredentials(credentials.NewClientTLSFromCert(pool, "")) + opts := []grpc.DialOption{ + transport, + } + + // Create query client + client, err := flightsql.NewClient(url, nil, nil, opts...) + if err != nil { + return fmt.Errorf("flightsql: %s", err) + } + + ctx = metadata.AppendToOutgoingContext(ctx, "authorization", "Bearer "+token) + ctx = metadata.AppendToOutgoingContext(ctx, "database", database) + + // Execute query + query := `SELECT + * + FROM + home + WHERE + time >= '2022-01-01T08:00:00Z' + AND time <= '2022-01-01T20:00:00Z'` + + info, err := client.Execute(ctx, query) + if err != nil { + return fmt.Errorf("flightsql flight info: %s", err) + } + reader, err := client.DoGet(ctx, info.Endpoint[0].Ticket) + if err != nil { + return fmt.Errorf("flightsql do get: %s", err) + } + + // Print results as JSON + for reader.Next() { + record := reader.Record() + b, err := json.MarshalIndent(record, "", " ") + if err != nil { + return err + } + fmt.Println("RECORD BATCH") + fmt.Println(string(b)) + + if err := reader.Err(); err != nil { + return fmt.Errorf("flightsql reader: %s", err) + } + } + + return nil + } + + func main() { + if err := dbQuery(context.Background()); err != nil { + fmt.Fprintf(os.Stderr, "error: %v\n", err) + os.Exit(1) + } + } + ``` + + The sample does the following: + + 1. Imports the following packages: + + - `context` + - `crypto/x509` + - `encoding/json` + - `fmt` + - `os` + - `github.com/apache/arrow/go/v14/arrow/flight/flightsql` + - `google.golang.org/grpc` + - `google.golang.org/grpc/credentials` + - `google.golang.org/grpc/metadata` + + 2. Creates a `dbQuery` function that does the following: + + 1. Defines variables for InfluxDB credentials. + + - **`url`**: {{% product-name omit=" Clustered" %}} cluster hostname and port (`:443`) _(no protocol)_ + - **`database`**: the name of the {{% product-name %}} database to query + - **`token`**: a [database token](/influxdb3/version/admin/tokens/database/) with read permission on the specified database. + _For security reasons, we recommend setting this as an environment + variable rather than including the raw token string._ + 2. Defines an `opts` options list that includes a gRPC transport for communicating + with InfluxDB over the _gRPC+TLS_ protocol. + 3. Calls the `flightsql.NewClient()` method with `url` and `opts` to create a new Flight SQL client. + 4. Appends the following InfluxDB credentials as key-value pairs to the outgoing context: + + - **`authorization`**: Bearer + - **`database`**: Database name + + 5. Defines the SQL query to execute. + 6. Calls the `client.execute()` method to send the query request. + 7. Calls the `client.doGet()` method with the _ticket_ from the query response to retrieve result data from the endpoint. + 8. Creates a reader to read the Arrow table returned by the endpoint and print + the results as JSON. + + 3. Creates a `main` module function that executes the `dbQuery` function. + +2. Enter the following commands to install all the necessary packages and run the program to query {{% product-name %}}: + + ```sh + go get ./... + go run ./query.go + ``` + +{{% influxdb/custom-timestamps %}} +{{< expand-wrapper >}} +{{% expand "View program output" %}} +```json +RECORD BATCH +[ + { + "co": 0, + "hum": 35.9, + "room": "Kitchen", + "temp": 21, + "time": "2022-01-01 08:00:00" + }, + { + "co": 0, + "hum": 36.2, + "room": "Kitchen", + "temp": 23, + "time": "2022-01-01 09:00:00" + }, + { + "co": 0, + "hum": 36.1, + "room": "Kitchen", + "temp": 22.7, + "time": "2022-01-01 10:00:00" + }, + { + "co": 0, + "hum": 36, + "room": "Kitchen", + "temp": 22.4, + "time": "2022-01-01 11:00:00" + }, + { + "co": 0, + "hum": 36, + "room": "Kitchen", + "temp": 22.5, + "time": "2022-01-01 12:00:00" + }, + ... +] +``` +{{% /influxdb/custom-timestamps %}} +{{% /expand %}} +{{< /expand-wrapper >}} + +For more information, see the [Go Arrow Flight Client documentation](https://pkg.go.dev/github.com/apache/arrow/go/v14/arrow/flight#Client). diff --git a/content/shared/influxdb-client-libraries-reference/flight/java-flightsql.md b/content/shared/influxdb-client-libraries-reference/flight/java-flightsql.md new file mode 100644 index 000000000..b0a57d52e --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/flight/java-flightsql.md @@ -0,0 +1,470 @@ +[Apache Arrow Flight SQL for Java](https://arrow.apache.org/docs/java/reference/org/apache/arrow/flight/sql/package-summary.html) integrates with Java applications to query and retrieve data from Flight database servers using RPC and SQL. + +> [!Note] +> #### Use InfluxDB 3 client libraries +> +> We recommend using the [`influxdb3-java` Java client library](/influxdb3/version/reference/client-libraries/v3/java/) for integrating InfluxDB 3 with your Java application code. +> +> [InfluxDB 3 client libraries](/influxdb3/version/reference/client-libraries/v3/) wrap Apache Arrow Flight clients +> and provide convenient methods for [writing](/influxdb3/version/get-started/write/#write-line-protocol-to-influxdb), [querying](/influxdb3/version/get-started/query/#execute-an-sql-query), and processing data stored in {{% product-name %}}. +> Client libraries can query using SQL or InfluxQL. + + + +- [Get started using the Java Flight SQL client to query InfluxDB](#get-started-using-the-java-flight-sql-client-to-query-influxdb) + - [Set up InfluxDB](#set-up-influxdb) + - [Install prerequisites](#install-prerequisites) + - [Create the FlightQuery class](#create-the-flightquery-class) + - [Create a query client](#create-a-query-client) + - [Execute a query](#execute-a-query) + - [Retrieve and process Arrow data](#retrieve-and-process-arrow-data) + - [Run the application](#run-the-application) +- [Troubleshoot Arrow Flight requests](#troubleshoot-arrow-flight-requests) + +## Get started using the Java Flight SQL client to query InfluxDB + +Write a Java class for a Flight SQL client that connects to {{% product-name %}}, +executes an SQL query, and retrieves data stored in an {{% product-name %}} database. + +The example uses the [Apache Arrow Java implementation (`org.apache.arrow`)](https://arrow.apache.org/docs/java/index.html) for interacting with Flight database servers like InfluxDB 3. + +- **`org.apache.arrow`**: Provides classes and methods for integrating Java applications with Apache Arrow data and protocols. +- **`org.apache.arrow.flight.sql`**: Provides classes and methods for +interacting with Flight database servers using Arrow Flight RPC and Flight SQL. + +1. [Set up InfluxDB](#set-up-influxdb) +2. [Install prerequisites](#install-prerequisites) +3. [Create the FlightQuery class](#create-the-flightquery-class) +4. [Create a query client](#create-a-query-client) +5. [Execute a query](#execute-a-query) +6. [Retrieve and process Arrow data](#retrieve-and-process-arrow-data) + +To clone or download the example application that you can run with Docker, see the [InfluxCommunity/ArrowFlightClient_Query_Examples repository](https://github.com/InfluxCommunity/ArrowFlightClient_Query_Examples) on GitHub. + +### Set up InfluxDB + +To configure the application for querying {{% product-name %}}, you'll need the following InfluxDB resources: + +- {{% product-name %}} **database** +- {{% product-name %}} **database token** with _read_ permission to the database + +If you don't already have a database token and a database, see how to [set up InfluxDB](/influxdb3/version/get-started/setup/). +If you don't already have data to query, see how to +[write data](/influxdb3/version/get-started/write/) to a database. + +### Install prerequisites + +The following uses Docker and Maven to build and run the Java application and avoid platform-specific dependency problems. + +The example `Dockerfile` installs compatible versions of Maven +and Java JDK in the Docker container, and then runs the Maven commands to download dependencies and compile the application. + +Follow the instructions to download and install Docker for your system: + +- **macOS**: [Install Docker for macOS](https://docs.docker.com/desktop/install/mac-install/) +- **Linux**: [Install Docker for Linux](https://docs.docker.com/desktop/install/linux-install/) + +{{< expand-wrapper >}} +{{% expand "View the Dockerfile" %}} + +```dockerfile +# Use the official Maven image as the base image +FROM maven:3.8.3-openjdk-11 AS build + +# Set the working directory +WORKDIR /app + +# Copy the pom.xml file into the container +COPY pom.xml . + +# Download and cache dependencies +RUN mvn dependency:go-offline + +# Copy the rest of the source code into the container +COPY src/ ./src/ + +# Compile the source code and copy dependencies +RUN mvn compile dependency:copy-dependencies + +# Use the official OpenJDK image as the runtime base image +FROM openjdk:11-jre-slim + +# Set the working directory +WORKDIR /app + +# Copy the compiled classes and dependencies from the build stage +COPY --from=build /app/target/classes ./classes +COPY --from=build /app/target/dependency ./dependency + +# Set ARGs for --build-arg options passed in the build command +ARG DATABASE_FIELD +ARG DATABASE_NAME +ARG HOST +ARG TOKEN + +# Set run-time ENVs from ARGs +ENV DATABASE_FIELD=${DATABASE_FIELD} +ENV DATABASE_NAME=${DATABASE_NAME} +ENV HOST=${HOST} +ENV TOKEN=${TOKEN} + +# Set the entrypoint to run your Java application +ENTRYPOINT ["java", "-cp", "classes:dependency/*", "com.influxdb.examples.FlightExamples"] +``` +{{% /expand %}} + +{{% expand "View the Maven pom.xml" %}} + +```xml + + + 4.0.0 + + com.influxdb + examples + 1.0-SNAPSHOT + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.0 + + + + true + lib/ + com.influxdb.examples.FlightExamples + + + + + + org.apache.maven.plugins + maven-help-plugin + 3.2.0 + + + org.apache.maven.plugins + maven-shade-plugin + 3.4.1 + + + + shade + + + true + + + + + false + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + + + + 1.8 + 1.8 + + + + + org.apache.arrow + flight-sql + 11.0.0 + + + io.netty + netty-all + 4.1.74.Final + + + org.slf4j + slf4j-simple + 1.7.30 + + + + +``` +{{% /expand %}} +{{< /expand-wrapper >}} + +### Create the FlightQuery class + +{{< expand-wrapper >}} +{{% expand "View FlightQuery.java" %}} + +```java +package com.influxdb.examples; + +import org.apache.arrow.flight.auth2.BearerCredentialWriter; +import org.apache.arrow.flight.CallHeaders; +import org.apache.arrow.flight.CallStatus; +import org.apache.arrow.flight.grpc.CredentialCallOption; +import org.apache.arrow.flight.Location; +import org.apache.arrow.flight.FlightClient; +import org.apache.arrow.flight.FlightClientMiddleware; +import org.apache.arrow.flight.FlightInfo; +import org.apache.arrow.flight.FlightStream; +import org.apache.arrow.flight.sql.FlightSqlClient; +import org.apache.arrow.flight.Ticket; +import org.apache.arrow.memory.BufferAllocator; +import org.apache.arrow.memory.RootAllocator; +import org.apache.arrow.vector.VectorSchemaRoot; + +public class FlightQuery { + + /* Get server credentials from environment variables */ + public static final String DATABASE_NAME = System.getenv("DATABASE_NAME"); + public static final String HOST = System.getenv("HOST"); + public static final String TOKEN = System.getenv("TOKEN"); + + public static void main() { + + System.out.println("Query InfluxDB with the Java Flight SQL Client"); + + // Create an interceptor that injects header metadata (database name) in every request. + FlightClientMiddleware.Factory f = info -> new FlightClientMiddleware() { + @Override + public void onBeforeSendingHeaders(CallHeaders outgoingHeaders) { + outgoingHeaders.insert("database", DATABASE_NAME); + } + + @Override + public void onHeadersReceived(CallHeaders incomingHeaders) { + + } + + @Override + public void onCallCompleted(CallStatus status) { + + } + }; + + // Create a gRPC+TLS channel URI with HOST and port 443. + Location location = Location.forGrpcTls(HOST, 443); + + // Set the allowed memory. + BufferAllocator allocator = new RootAllocator(Long.MAX_VALUE); + + // Create a client with the allocator and gRPC channel. + FlightClient client = FlightClient.builder(allocator, location) + .intercept(f) + .build(); + System.out.println("client" + client); + + FlightSqlClient sqlClient = new FlightSqlClient(client); + System.out.println("sqlClient: " + sqlClient); + + // Define the SQL query to execute. + String query = "SELECT * FROM home"; + + /* Construct a bearer credential using TOKEN. + Construct a credentials option using the bearer credential. + */ + CredentialCallOption auth = new CredentialCallOption(new BearerCredentialWriter(TOKEN)); + + /* Execute the query. + If successful, execute returns a FlightInfo object that contains metadata + and an endpoints list. + Each endpoint contains the following: + - A list of addresses where you can retrieve the data. + - A `ticket` value that identifies the data to retrieve. + */ + FlightInfo flightInfo = sqlClient.execute(query, auth); + + // Extract the Flight ticket from the response. + Ticket ticket = flightInfo.getEndpoints().get(0).getTicket(); + + // Pass the ticket to request the Arrow stream data from the endpoint. + final FlightStream stream = sqlClient.getStream(ticket, auth); + + // Process all the Arrow stream data. + while (stream.next()) { + try { + // Get the current vector data from the stream. + final VectorSchemaRoot root = stream.getRoot(); + System.out.println(root.contentToTSVString()); + } catch (Exception e) { + // Handle exceptions. + System.out.println("Error executing FlightSqlClient: " + e.getMessage()); + } + } + try { + // Close the stream and release resources. + stream.close(); + } catch (Exception e) { + // Handle exceptions. + System.out.println("Error closing stream: " + e.getMessage()); + } + + try { + // Close the client + sqlClient.close(); + } catch (Exception e) { + // Handle exceptions. + System.out.println("Error closing client: " + e.getMessage()); + } + } +} +``` + +{{% /expand %}} +{{< /expand-wrapper >}} + +1. In your `/src/main/java` directory, create the `com/influxdb/examples` subdirectories for the `com.influxdb.examples` package. +2. In the `examples` directory from the preceding step, create the `FlightQuery.java` class file. + You should have the following directory structure: + + ``` + PROJECT_ROOT + └──src + └──main + └──java + └──com + └──influxdb + └──examples + └──FlightQuery.java + ``` + +3. In `FlightQuery.java`: + + 1. Add the package name: + + ```java + package com.influxdb.examples; + ``` + + 2. Add `import` statements for the following packages. You'll use classes and methods + from these packages in the remaining steps: + + - `org.apache.arrow.flight.auth2.BearerCredentialWriter` + - `org.apache.arrow.flight.CallHeaders` + - `org.apache.arrow.flight.CallStatus` + - `org.apache.arrow.flight.grpc.CredentialCallOption` + - `org.apache.arrow.flight.Location` + - `org.apache.arrow.flight.FlightClient` + - `org.apache.arrow.flight.FlightClientMiddleware` + - `org.apache.arrow.flight.FlightInfo` + - `org.apache.arrow.flight.FlightStream` + - `org.apache.arrow.flight.sql.FlightSqlClient` + - `org.apache.arrow.flight.Ticket` + - `org.apache.arrow.memory.BufferAllocator` + - `org.apache.arrow.memory.RootAllocator` + - `org.apache.arrow.vector.VectorSchemaRoot` + + 3. Create a `FlightQuery` class. + 4. In the `FlightQuery` class: + + 1. Define constants for server credentials. + - `DATABASE_NAME` + - `HOST` + - `TOKEN` + + _The example `Dockerfile` defines environment variables for + these credentials._ + + 2. Create a `main()` method. + +### Create a query client + +In the `FlightQuery.main()` method, do the following to create an SQL client that can connect to `HOST` and `DATABASE_NAME`: + +1. Construct a _gRPC+TLS_ channel URI with `HOST` and port `443` for communicating with a [gRPC server over TLS](https://grpc.io/docs/guides/auth/#with-server-authentication-ssltls-4). +2. Instantiate `FlightClientMiddleware` and define an event callback + that inserts the following Flight request metadata header property: + + ```json + "database": "DATABASE_NAME" + ``` + +3. Instantiate a `BufferAllocator` that sets the memory allowed for the client. +4. Create a `FlightClient` with the allocator and gRPC channel. +5. Instantiate a `FlightSqlClient` that wraps the `FlightClient` instance. + +### Execute a query + +In the `FlightQuery.main` method: + +1. Instantiate a `CredentialCallOption` with `TOKEN` as a _bearer_ credential. + The result is a credential object that you'll pass in each request to the server. +2. Define a string that contains the SQL query to execute--for example: + + ```java + String query = "SELECT * FROM home"; + ``` + +3. Call the `FlightSqlClient.execute` method with the SQL query and the `CredentialCallOption`. +4. If successful, the `FlightSqlClient.execute` method responds with a `FlightInfo` object that contains metadata and an `endpoints: [...]` list. + Each endpoint contains the following: + + - A list of addresses where you can retrieve the data. + - A `ticket` value that identifies the data to retrieve. +5. Extract the ticket from the response. + +### Retrieve and process Arrow data + +In the `FlightQuery.main()` method, do the following to retrieve the data stream described in the `FlightInfo` response: + +1. Call the `FlightSqlClient.getStream` method with the _ticket_ and the `CredentialCallOption` to fetch the [Arrow stream](https://arrow.apache.org/docs/format/CStreamInterface.html). +2. Call the `FlightStream.getRoot` method to get the current vector data from the stream. +3. Process the data and handle exceptions. The example converts the vector data into tab-separated values and prints the result to `System.out`. + + For more examples using Java to work with Arrow data, see the [Apache Arrow Java Cookbook](https://arrow.apache.org/cookbook/java/). + +4. Finally, close the stream and client. + +### Run the application + +Follow these steps to build and run the application using Docker: + +1. Copy the `Dockerfile` and `pom.xml` to your project root directory. +2. Open a terminal in your project root directory. +3. In your terminal, run the `docker build` command and pass `--build-arg` flags for the server credentials: + + - **`DATABASE_NAME`**: your [{{% product-name %}} database](/influxdb3/version/admin/databases/) + - **`HOST`**: your {{% product-name %}} hostname (URL without the "https://") + - **`TOKEN`**: your [{{% product-name %}} database token](/influxdb3/version/get-started/setup/) with _read_ permission to the database + + + + ```sh + docker build \ + --build-arg DATABASE_NAME=INFLUX_DATABASE \ + --build-arg HOST={{% influxdb/host %}}\ + --build-arg TOKEN=INFLUX_TOKEN \ + -t javaflight . + ``` + + The command builds a Docker image named `javaflight`. + +4. To run the application in a new Docker container, enter the following command: + + + + ```sh + docker run javaflight + ``` + + The output is the query data in TSV-format. + +## Troubleshoot Arrow Flight requests + +For the list of Arrow Flight error response codes, see the [Arrow Flight RPC documentation](https://arrow.apache.org/docs/format/Flight.html#error-handling). + diff --git a/content/shared/influxdb-client-libraries-reference/flight/python-flight.md b/content/shared/influxdb-client-libraries-reference/flight/python-flight.md new file mode 100644 index 000000000..5fa77472c --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/flight/python-flight.md @@ -0,0 +1,108 @@ +[Apache Arrow Python bindings](https://arrow.apache.org/docs/python/index.html) integrate with Python scripts and applications to query data stored in InfluxDB. + +> [!Note] +> #### Use InfluxDB 3 client libraries +> +> We recommend using the [`influxdb3-python` Python client library](/influxdb3/version/reference/client-libraries/v3/python/) for integrating InfluxDB 3 with your Python application code. +> +> [InfluxDB 3 client libraries](/influxdb3/version/reference/client-libraries/v3/) wrap Apache Arrow Flight clients +> and provide convenient methods for [writing](/influxdb3/version/get-started/write/#write-line-protocol-to-influxdb), [querying](/influxdb3/version/get-started/query/#execute-an-sql-query), and processing data stored in {{% product-name %}}. +> Client libraries can query using SQL or InfluxQL. + +The following examples show how to use the `pyarrow.flight` and `pandas` Python modules to query and format data stored in an {{% product-name %}} database: + +{{% code-tabs-wrapper %}} +{{% code-tabs %}} +[SQL](#sql-python) +[InfluxQL](#influxql-python) +{{% /code-tabs %}} + +{{% code-tab-content %}} + +{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} +```py +# Using pyarrow>=12.0.0 FlightClient +from pyarrow.flight import FlightClient, Ticket, FlightCallOptions +import json +import pandas +import tabulate + +# Downsampling query groups data into 2-hour bins +sql=""" + SELECT DATE_BIN(INTERVAL '2 hours', time) AS time, + room, + selector_max(temp, time)['value'] AS 'max temp', + selector_min(temp, time)['value'] AS 'min temp', + avg(temp) AS 'average temp' + FROM home + GROUP BY + 1, + room + ORDER BY room, 1""" + +flight_ticket = Ticket(json.dumps({ + "namespace_name": "DATABASE_NAME", + "sql_query": sql, + "query_type": "sql" +})) + +token = (b"authorization", bytes(f"Bearer DATABASE_TOKEN".encode('utf-8'))) +options = FlightCallOptions(headers=[token]) +client = FlightClient(f"grpc+tls://{{< influxdb/host >}}:443") + +reader = client.do_get(flight_ticket, options) +arrow_table = reader.read_all() +# Use pyarrow and pandas to view and analyze data +data_frame = arrow_table.to_pandas() +print(data_frame.to_markdown()) +``` +{{% /code-placeholders %}} + +{{% /code-tab-content %}} +{{% code-tab-content %}} + +{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} +```py +# Using pyarrow>=12.0.0 FlightClient +from pyarrow.flight import FlightClient, Ticket, FlightCallOptions +import json +import pandas +import tabulate + +# Downsampling query groups data into 2-hour bins +influxql=""" + SELECT FIRST(temp) + FROM home + WHERE room = 'kitchen' + AND time >= now() - 100d + AND time <= now() - 10d + GROUP BY time(2h)""" + +flight_ticket = Ticket(json.dumps({ + "namespace_name": "DATABASE_NAME", + "sql_query": influxql, + "query_type": "influxql" +})) + +token = (b"authorization", bytes(f"Bearer DATABASE_TOKEN".encode('utf-8'))) +options = FlightCallOptions(headers=[token]) +client = FlightClient(f"grpc+tls://{{< influxdb/host >}}:443") + +reader = client.do_get(flight_ticket, options) +arrow_table = reader.read_all() +# Use pyarrow and pandas to view and analyze data +data_frame = arrow_table.to_pandas() +print(data_frame.to_markdown()) +``` +{{% /code-placeholders %}} + +{{% /code-tab-content %}} + +Replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: your {{% product-name %}} database +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + a [database token](/influxdb3/version/admin/tokens/database/) + with sufficient permissions to the specified database + +{{% /code-tabs-wrapper %}} diff --git a/content/shared/influxdb-client-libraries-reference/flight/python-flightsql-dbapi.md b/content/shared/influxdb-client-libraries-reference/flight/python-flightsql-dbapi.md new file mode 100644 index 000000000..2350510c5 --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/flight/python-flightsql-dbapi.md @@ -0,0 +1,157 @@ +The [Python `flightsql-dbapi` Flight SQL DBAPI library](https://github.com/influxdata/flightsql-dbapi) integrates with Python applications using SQL to query data stored in an {{% product-name %}} database. The `flightsql-dbapi` library uses the [Flight SQL protocol](https://arrow.apache.org/docs/format/FlightSql.html) to query and retrieve data. + +> [!Note] +> #### Use InfluxDB 3 client libraries +> +> We recommend using the [`influxdb3-python` Python client library](/influxdb3/version/reference/client-libraries/v3/python/) for integrating InfluxDB 3 with your Python application code. +> +> [InfluxDB 3 client libraries](/influxdb3/version/reference/client-libraries/v3/) wrap Apache Arrow Flight clients +> and provide convenient methods for [writing](/influxdb3/version/get-started/write/#write-line-protocol-to-influxdb), [querying](/influxdb3/version/get-started/query/#execute-an-sql-query), and processing data stored in {{% product-name %}}. +> Client libraries can query using SQL or InfluxQL. + +## Installation + +The [`flightsql-dbapi`](https://github.com/influxdata/flightsql-dbapi) Flight SQL library for Python provides a +[DB API 2](https://peps.python.org/pep-0249/) interface and +[SQLAlchemy](https://www.sqlalchemy.org/) dialect for +[Flight SQL](https://arrow.apache.org/docs/format/FlightSql.html). +Installing `flightsql-dbapi` also installs the [`pyarrow`](https://arrow.apache.org/docs/python/index.html) library that you'll use for working with Arrow data. + +In your terminal, use `pip` to install `flightsql-dbapi`: + +```sh +pip install flightsql-dbapi +``` + +## Importing the module + +The `flightsql-dbapi` package provides the `flightsql` module. From the module, import the `FlightSQLClient` class method: + +```py +from flightsql import FlightSQLClient +``` + +- `flightsql.FlightSQLClient` class: an interface for [initializing +a client](#initialization) and interacting with a Flight SQL server. + +## API reference + +- [Class FlightSQLClient](#class-flightsqlclient) + - [Syntax](#syntax) +- [Initialize a client](#initialize-a-client) + - [Instance methods](#instance-methods) + - [FlightSQLClient.execute](#flightsqlclientexecute) + - [Syntax {#execute-query-syntax}](#syntax-execute-query-syntax) + - [Example {#execute-query-example}](#example-execute-query-example) + - [FlightSQLClient.do_get](#flightsqlclientdo_get) + - [Syntax {#retrieve-data-syntax}](#syntax-retrieve-data-syntax) + - [Example {#retrieve-data-example}](#example-retrieve-data-example) + +## Class FlightSQLClient + +Provides an interface for [initializing +a client](#initialize-a-client) and interacting with a Flight SQL server. + +### Syntax + +```py +__init__(self, host=None, token=None, metadata=None, features=None) +``` + +Initializes and returns a `FlightSQLClient` instance for interacting with the server. + +## Initialize a client + +The following example shows how to use Python with `flightsql-dbapi` +and the _DB API 2_ interface to instantiate a Flight SQL client configured for an InfluxDB database. + +{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} +```py +from flightsql import FlightSQLClient + +# Instantiate a FlightSQLClient configured for a database +client = FlightSQLClient(host='{{< influxdb/host >}}', + token='DATABASE_TOKEN', + metadata={'database': 'DATABASE_NAME'}, + features={'metadata-reflection': 'true'}) +``` +{{% /code-placeholders %}} + +Replace the following: + +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: an + {{% product-name %}} [database token](/influxdb3/version/admin/tokens/#database-tokens) + with read permissions on the databases you want to query +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb3/version/admin/databases/) + +### Instance methods + +### FlightSQLClient.execute + +Sends a Flight SQL RPC request to execute the specified SQL Query. + +#### Syntax {#execute-query-syntax} + +```py +execute(query: str, call_options: Optional[FlightSQLCallOptions] = None) +``` + +#### Example {#execute-query-example} + +```py +# Execute the query +info = client.execute("SELECT * FROM home") +``` + +The response contains a `flight.FlightInfo` object that contains metadata and an `endpoints: [...]` list. Each endpoint contains the following: + +- A list of addresses where you can retrieve query result data. +- A `ticket` value that identifies the data to [retrieve](#retrieve-data-example). + +### FlightSQLClient.do_get + +Passes a Flight ticket (obtained from a `FlightSQLClient.execute` response) and retrieves Arrow data identified by the ticket. +Returns a `pyarrow.flight.FlightStreamReader` for streaming the data. + +#### Syntax {#retrieve-data-syntax} + +```py + do_get(ticket, call_options: Optional[FlightSQLCallOptions] = None) +``` + +#### Example {#retrieve-data-example} + +The following sample shows how to use Python with `flightsql-dbapi` and `pyarrow` to query InfluxDB and retrieve data. + +```py +from flightsql import FlightSQLClient + +# Instantiate a FlightSQLClient configured for a database +client = FlightSQLClient(host='{{< influxdb/host >}}', + token='DATABASE_TOKEN', + metadata={'database': 'DATABASE_NAME'}, + features={'metadata-reflection': 'true'}) + +# Execute the query to retrieve FlightInfo +info = client.execute("SELECT * FROM home") + +# Extract the token for retrieving data +ticket = info.endpoints[0].ticket + +# Use the ticket to request the Arrow data stream. +# Return a FlightStreamReader for streaming the results. +reader = client.do_get(ticket) + +# Read all data to a pyarrow.Table +table = reader.read_all() + +print(table) +``` + +`do_get(ticket)` returns a [`pyarrow.flight.FlightStreamReader`](https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightStreamReader.html) for streaming Arrow [record batches](https://arrow.apache.org/docs/python/data.html#record-batches). + +To read data from the stream, call one of the following `FlightStreamReader` methods: + +- `read_all()`: Read all record batches as a [`pyarrow.Table`](https://arrow.apache.org/docs/python/generated/pyarrow.Table.html). +- `read_chunk()`: Read the next RecordBatch and metadata. +- `read_pandas()`: Read all record batches and convert them to a [`pandas.DataFrame`](https://pandas.pydata.org/docs/reference/frame.html). diff --git a/content/shared/influxdb-client-libraries-reference/v1/_index.md b/content/shared/influxdb-client-libraries-reference/v1/_index.md new file mode 100644 index 000000000..b9a82ceb4 --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v1/_index.md @@ -0,0 +1,94 @@ +InfluxDB client libraries are language-specific tools that integrate with InfluxDB APIs. +Client libraries for InfluxDB v1 work with the InfluxDB 1.7 API and should be fully compatible with InfluxDB 1.5+. + +> [!Note] +> Upgrade to InfluxDB 3 to use new client libraries compatible with InfluxDB write APIs, SQL, and InfluxQL. For more information, see [InfluxDB 3 client libraries](/influxdb3/version/reference/client-libraries/v3/). + +Functionality varies among client libraries. +For specifics about a client library, see the library's GitHub repository. + +## C++ +* [influxdb-cxx](https://github.com/offa/influxdb-cxx) +## Elixir + +* [Instream (instream)](https://github.com/mneudert/instream) +## Erlang + +* [Erlang InfluxDB UDP Writer](https://github.com/palkan/influx_udp) + +* [InfluxDB line encoder](https://github.com/Pouriya-Jahanbakhsh/influxdb_encoderl) +## Go + +* [InfluxDB Client](https://github.com/influxdata/influxdb1-client) +## Haskell + +* [influxdb-haskell](https://github.com/maoe/influxdb-haskell) +## Java + +* [influxdb-java](https://github.com/influxdb/influxdb-java) + +* [Alpakka InfluxDB](https://doc.akka.io/docs/alpakka/current/influxdb.html) + +* [JFlux](https://github.com/nickRm/jflux) +## JavaScript/Node.js + +* [node-influx](https://github.com/node-influx/node-influx) +## Lisp + +* [CL-INFLUXDB](https://github.com/mmaul/cl-influxdb) +## MATLAB + +* [influxdb-matlab](https://github.com/EnricSala/influxdb-matlab) +## .Net + +* [InfluxDB.Client.Net](https://github.com/AdysTech/InfluxDB.Client.Net) + + * Supports .Net and .Net Core +* [InfluxData.Net](https://github.com/pootzko/InfluxData.Net) + +* [InfluxDB Client for .NET](https://github.com/MikaelGRA/InfluxDB.Client) + +* [InfluxClient](https://github.com/danesparza/InfluxClient) +## Perl + +* [AnyEvent::InfluxDB](https://github.com/ajgb/anyevent-influxdb) + +* [InfluxDB-LineProtocol](http://search.cpan.org/~domm/InfluxDB-LineProtocol/) + +* [InfluxDB::HTTP](https://github.com/raphaelthomas/InfluxDB-HTTP) +## PHP + +* [influxdb-php](https://github.com/influxdb/influxdb-php) + +* [InfluxDB PHP SDK (influxdb-php-sdk)](https://github.com/corley/influxdb-php-sdk) +## Python + +* [InfluxDB-Python (influxdb-python)](https://github.com/influxdb/influxdb-python) +## R + +* [influxdbr](https://cran.r-project.org/web/packages/influxdbr/) +## Ruby + +* [influxdb-ruby](https://github.com/influxdb/influxdb-ruby) + +* [Influxer (influxer)](https://github.com/palkan/influxer) +## Rust + +* [Flux (flux)](https://crates.io/crates/flux) + +* [Influent (influent)](https://crates.io/crates/influent) +## Scala + +* [scala-influxdb-client](https://github.com/paulgoldbaum/scala-influxdb-client) + +* [chronicler](https://github.com/fsanaulla/chronicler) + +* [Alpakka InfluxDB](https://doc.akka.io/docs/alpakka/current/influxdb.html) +## Sensu + +* [sensu-influxdb-extension](https://github.com/jhrv/sensu-influxdb-extension) +## SNMP agent + +* [SnmpCollector (snmpcollector)](https://github.com/toni-moreno/snmpcollector) + + * A full featured Generic SNMP data collector with Web Administration Interface for InfluxDB. diff --git a/content/shared/influxdb-client-libraries-reference/v2/_index.md b/content/shared/influxdb-client-libraries-reference/v2/_index.md new file mode 100644 index 000000000..903ad70da --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/_index.md @@ -0,0 +1,10 @@ +## Client libraries for InfluxDB 2.x and 1.8+ + +InfluxDB client libraries are language-specific tools that integrate with InfluxDB APIs. +InfluxDB v2 client libraries use InfluxDB `/api/v2` endpoints and work with [InfluxDB 2.x API compatibility endpoints](/influxdb/v1/tools/api/#influxdb-2x-api-compatibility-endpoints). + +Functionality varies among client libraries. +InfluxDB client libraries are maintained by the InfluxDB community. +For specifics about a client library, see the library's GitHub repository. + +{{< children type="list" depth="999" >}} diff --git a/content/shared/influxdb-client-libraries-reference/v2/arduino.md b/content/shared/influxdb-client-libraries-reference/v2/arduino.md new file mode 100644 index 000000000..19558ab98 --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/arduino.md @@ -0,0 +1,5 @@ +Arduino is an open source hardware and software platform used for building electronics projects. + +The documentation for this client library is available on GitHub. + +Arduino InfluxDB client diff --git a/content/shared/influxdb-client-libraries-reference/v2/csharp.md b/content/shared/influxdb-client-libraries-reference/v2/csharp.md new file mode 100644 index 000000000..123c7c3ff --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/csharp.md @@ -0,0 +1,5 @@ +C# is a general-purpose object-oriented programming language. + +The documentation for this client library is available on GitHub. + +C# InfluxDB client \ No newline at end of file diff --git a/content/shared/influxdb-client-libraries-reference/v2/dart.md b/content/shared/influxdb-client-libraries-reference/v2/dart.md new file mode 100644 index 000000000..57210993b --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/dart.md @@ -0,0 +1,5 @@ +Dart is a programming language created for quick application development for both web and mobile apps. + +The documentation for this client library is available on GitHub. + +Dart InfluxDB client \ No newline at end of file diff --git a/content/shared/influxdb-client-libraries-reference/v2/go.md b/content/shared/influxdb-client-libraries-reference/v2/go.md new file mode 100644 index 000000000..ba76fd220 --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/go.md @@ -0,0 +1,108 @@ +Use the [InfluxDB Go client library](https://github.com/influxdata/influxdb-client-go) to write data to an {{% product-name %}} database. + +This guide presumes some familiarity with Go and InfluxDB. +If just getting started, see [Get started with InfluxDB](/influxdb3/version/get-started/). + +## Before you begin + +1. [Install Go 1.13 or later](https://golang.org/doc/install). +2. Add the client package your to your project dependencies. + + ```sh + # Add InfluxDB Go client package to your project go.mod + go get github.com/influxdata/influxdb-client-go/v2 + ``` +3. Ensure that InfluxDB is running and you can connect to it. + For information about what URL to use to connect to your {{% product-name omit=" Clustered" %}} cluster, contact your InfluxData account representative. + +## Boilerplate for the InfluxDB Go Client Library + +Use the Go library to write and query data from InfluxDB. + +1. In your Go program, import the necessary packages and specify the entry point of your executable program. + + ```go + package main + + import ( + "context" + "fmt" + "time" + + "github.com/influxdata/influxdb-client-go/v2" + ) + ``` + +2. Define variables for your InfluxDB [database](/influxdb3/version/admin/databases/) (bucket), organization (required, but ignored), and [database token](/influxdb3/version/admin/tokens/#database-tokens). + + ```go + bucket := "DATABASE_NAME" + org := "ignored" + token := "DATABASE_TOKEN" + // Store the URL of your InfluxDB instance + url := "https://{{< influxdb/host >}}" + ``` + +3. Create the the InfluxDB Go client and pass in the `url` and `token` parameters. + + ```go + client := influxdb2.NewClient(url, token) + ``` + +4. Create a **write client** with the `WriteAPIBlocking` method and pass in the `org` and `bucket` parameters. + + ```go + writeAPI := client.WriteAPIBlocking(org, bucket) + ``` + +## Write data to InfluxDB with Go + +Use the Go library to write data to InfluxDB. + +1. Create a [point](/influxdb3/version/reference/glossary/#point) and write it to InfluxDB using the `WritePoint` method of the API writer struct. + +2. Close the client to flush all pending writes and finish. + + ```go + p := influxdb2.NewPoint("stat", + map[string]string{"unit": "temperature"}, + map[string]interface{}{"avg": 24.5, "max": 45}, + time.Now()) + writeAPI.WritePoint(context.Background(), p) + client.Close() + ``` + +### Complete example write script + +```go +package main + +import ( + "context" + "fmt" + "time" + + "github.com/influxdata/influxdb-client-go/v2" +) + +func main() { + bucket := "DATABASE_NAME" + org := "ignored" + token := "DATABASE_TOKEN" + // Store the URL of your InfluxDB instance + url := "https://{{< influxdb/host >}}" + // Create new client with default option for server url authenticate by token + client := influxdb2.NewClient(url, token) + // User blocking write client for writes to desired bucket + writeAPI := client.WriteAPIBlocking(org, bucket) + // Create point using full params constructor + p := influxdb2.NewPoint("stat", + map[string]string{"unit": "temperature"}, + map[string]interface{}{"avg": 24.5, "max": 45}, + time.Now()) + // Write point immediately + writeAPI.WritePoint(context.Background(), p) + // Ensures background processes finishes + client.Close() +} +``` diff --git a/content/shared/influxdb-client-libraries-reference/v2/java.md b/content/shared/influxdb-client-libraries-reference/v2/java.md new file mode 100644 index 000000000..bb37b8e7e --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/java.md @@ -0,0 +1,5 @@ +Java is one of the oldest and most popular class-based, object-oriented programming languages. + +The documentation for this client library is available on GitHub. + +Java InfluxDB client \ No newline at end of file diff --git a/content/shared/influxdb-client-libraries-reference/v2/javascript/_index.md b/content/shared/influxdb-client-libraries-reference/v2/javascript/_index.md new file mode 100644 index 000000000..edce4ab42 --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/javascript/_index.md @@ -0,0 +1,4 @@ +The [InfluxDB v2 JavaScript client library](https://github.com/influxdata/influxdb-client-js) +for Node.js and browsers integrates with the InfluxDB v2 API to write data to an {{% product-name omit=" Clustered" %}} cluster. + +{{< children depth="999" >}} diff --git a/content/shared/influxdb-client-libraries-reference/v2/javascript/browser.md b/content/shared/influxdb-client-libraries-reference/v2/javascript/browser.md new file mode 100644 index 000000000..ade16f1b4 --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/javascript/browser.md @@ -0,0 +1,99 @@ +Use the [InfluxDB v2 JavaScript client library](https://github.com/influxdata/influxdb-client-js) in browsers and front-end clients to write data to an {{% product-name %}} database. + +This library supports both front-end and server-side environments and provides the following distributions: + +- ECMAScript modules (ESM) and CommonJS modules (CJS) +- Bundled ESM +- Bundled UMD + +This guide presumes some familiarity with JavaScript, browser environments, and InfluxDB. +If you're just getting started with InfluxDB, see [Get started with InfluxDB](/influxdb/v2/get-started/). +> [!Warning] +> ### Tokens in production applications +> +> {{% api/browser-token-warning %}} + +* [Before you begin](#before-you-begin) +* [Use with module bundlers](#use-with-module-bundlers) +* [Use bundled distributions with browsers and module loaders](#use-bundled-distributions-with-browsers-and-module-loaders) +* [Get started with the example app](#get-started-with-the-example-app) + +## Before you begin + +1. Install [Node.js](https://nodejs.org/en/download/package-manager/) to serve your front-end app. + +2. Ensure that InfluxDB is running and you can connect to it. + For information about what URL to use to connect to your {{% product-name omit=" Clustered" %}} cluster, contact your InfluxData account representative. + +## Use with module bundlers + +If you use a module bundler like Webpack or Parcel, install `@influxdata/influxdb-client-browser`. + +## Use bundled distributions with browsers and module loaders + +1. Configure InfluxDB properties for your script. + + ```html + + ``` + +2. Import modules from the latest client library browser distribution. +`@influxdata/influxdb-client-browser` exports bundled ESM and UMD syntaxes. + + {{< code-tabs-wrapper >}} + {{% code-tabs %}} + [ESM](#import-esm) + [UMD](#import-umd) + {{% /code-tabs %}} + {{% code-tab-content %}} + ```html + + ``` + {{% /code-tab-content %}} + {{% code-tab-content %}} + ```html + + + ``` + {{% /code-tab-content %}} + {{< /code-tabs-wrapper >}} + +After you've imported the client library, you're ready to [get started writing data with the example app](#get-started-with-the-example-app). + +## Get started with the example app + +The client library includes an example browser app that writes to your InfluxDB instance. + +1. Clone the [influxdb-client-js](https://github.com/influxdata/influxdb-client-js) repository. + +2. Navigate to the `examples` directory: + + ```js + cd examples + ``` + +3. Update `./env_browser.js` with your {{% product-name omit=" Clustered" %}} cluster URL, your database name as `bucket`, an arbitrary string as `org`, and your database token. + +4. Run the following command to start the application at [http://localhost:3001/examples/index.html]() + + ```sh + npm run browser + ``` + + `index.html` loads the `env_browser.js` configuration, the client library ESM modules, and the application in your browser. + +For more examples, see how to [write data using the JavaScript client library for Node.js](/influxdb3/version/reference/client-libraries/v2/javascript/nodejs/write/). diff --git a/content/shared/influxdb-client-libraries-reference/v2/javascript/nodejs/_index.md b/content/shared/influxdb-client-libraries-reference/v2/javascript/nodejs/_index.md new file mode 100644 index 000000000..1af8279e2 --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/javascript/nodejs/_index.md @@ -0,0 +1,6 @@ +The [InfluxDB v2 JavaScript client library](https://github.com/influxdata/influxdb-client-js) +integrates with the InfluxDB v2 API to write data from Node.js and browser applications to an {{% product-name %}} database. + +## Use the client library in a Node.js application + +{{< children >}} diff --git a/content/shared/influxdb-client-libraries-reference/v2/javascript/nodejs/install.md b/content/shared/influxdb-client-libraries-reference/v2/javascript/nodejs/install.md new file mode 100644 index 000000000..4ef555809 --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/javascript/nodejs/install.md @@ -0,0 +1,85 @@ +## Install Node.js + +1. Install [Node.js](https://nodejs.org/en/download/package-manager/). + +2. Ensure that InfluxDB is running and you can connect to it. + For information about what URL to use to connect to your {{% product-name omit=" Clustered" %}} cluster, contact your InfluxData account representative. + +3. In your terminal, create a directory for your Node.js project and change to it. + + ```sh + mkdir influx-node-app && cd influx-node-app + ``` + +4. Enter the following command to generate an npm package for your project. + + - `npm`: the package manager included with Node.js + - `-y`: uses defaults for the package and bypasses prompts + + ```sh + npm init -y + ``` + +## Install TypeScript + +Many of the client library examples use [TypeScript](https://www.typescriptlang.org/). +Follow these steps to initialize the TypeScript project: + +1. Install TypeScript and type definitions for Node.js. + + ```sh + npm i -g typescript && npm i --save-dev @types/node + ``` + +2. Enter the following command to create a TypeScript configuration + (`tsconfig.json`) with default values: + + ```sh + tsc --init + ``` + +3. Run the TypeScript compiler. + To recompile your code automatically as you make changes, pass the `--watch, -w` flag to the compiler. + + + + ```sh + tsc --watch + ``` + +## Install dependencies + +Use the `@influxdata/influxdb-client` JavaScript client library to write data in {{% product-name %}}. + +Open a new terminal window and install the `@influxdata/influxdb-client` package for querying and writing data: + + ```sh + npm i --save @influxdata/influxdb-client + ``` + +The `@influxdata/influxdb-client-apis` client library package won't work with {{% product-name %}}. +It only works with InfluxDB v2 management APIs. + +## Configure credentials + +The client examples include an [`env`](https://github.com/influxdata/influxdb-client-js/blob/master/examples/env.js) module for accessing your InfluxDB properties from environment variables or from `env.js`. +The examples use these properties to interact with the InfluxDB API. + +Set environment variables or update `env.js` with your InfluxDB [database](/influxdb3/version/admin/databases/), organization (required, but ignored), [database token](/influxdb3/version/admin/tokens/#database-tokens), and cluster URL. + + ```sh + export INFLUX_URL=https://{{< influxdb/host >}} + export INFLUX_TOKEN=DATABASE_TOKEN + export INFLUX_ORG=ORG_ID + export INFLUX_DATABASE=DATABASE_NAME + ``` + Replace the following: + - **`DATABASE_TOKEN`**: InfluxDB database token + - **`ORG_ID`**: An arbitrary string (InfluxDB ignores this credential, but the client library requires it) + - **`DATABASE_NAME`**: InfluxDB database name + +## Next steps + +Once you've installed the client library and configured credentials, you're ready to [write data](/influxdb3/version/reference/client-libraries/v2/javascript/nodejs/write/) to InfluxDB. + +{{< page-nav next="/influxdb3/version/reference/client-libraries/v2/javascript/nodejs/write/" keepTab=true >}} diff --git a/content/shared/influxdb-client-libraries-reference/v2/javascript/nodejs/write.md b/content/shared/influxdb-client-libraries-reference/v2/javascript/nodejs/write.md new file mode 100644 index 000000000..6daf3997a --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/javascript/nodejs/write.md @@ -0,0 +1,120 @@ +Use the [InfluxDB v2 JavaScript client library](https://github.com/influxdata/influxdb-client-js) to write data from a Node.js environment to InfluxDB. + +The JavaScript client library includes the following convenient features for writing data to InfluxDB: +- Apply default tags to data points. +- Buffer points into batches to optimize data transfer. +- Automatically retry requests on failure. +- Set an optional HTTP proxy address for your network. + +### Before you begin + +- [Install the client library and other dependencies](/influxdb3/version/reference/client-libraries/v2/javascript/nodejs/install/). + +### Write data with the client library + +1. Instantiate a client by calling the `new InfluxDB()` constructor with your InfluxDB URL and database token (environment variables you already set in the [Install section](/influxdb3/version/reference/client-libraries/v2/javascript/nodejs/install/)). + + ```js + import {InfluxDB, Point} from '@influxdata/influxdb-client' + + const influxDB = new InfluxDB({url: process.env.INFLUX_URL, + token: process.env.INFLUX_TOKEN}) + ``` + +2. Use the `getWriteApi()` method of the client to create a **write client**. + Provide your InfluxDB organization ID and database name. + + ```js + const writeApi = influxDB.getWriteApi(process.env.INFLUX_ORG, + process.env.INFLUX_DATABASE) + ``` + +3. To apply one or more [tags](/influxdb3/version/reference/glossary/#tag) to all points, use the `useDefaultTags()` method. + Provide tags as an object of key/value pairs. + + ```js + writeApi.useDefaultTags({region: 'west'}) + ``` + +4. Use the `Point()` constructor to create a [point](/influxdb3/version/reference/glossary/#point). + 1. Call the constructor and provide a [measurement](/influxdb3/version/reference/glossary/#measurement). + 2. To add one or more tags, chain the `tag()` method to the constructor. + Provide a `name` and `value`. + 3. To add a field of type `float`, chain the `floatField()` method to the constructor. + Provide a `name` and `value`. + + ```js + const point1 = new Point('temperature') + .tag('sensor_id', 'TLM010') + .floatField('value', 24.0) + ``` + +5. Use the `writePoint()` method to write the point to your InfluxDB bucket. + Finally, use the `close()` method to flush all pending writes. + The example logs the new data point followed by "WRITE FINISHED" to stdout. + + ```js + writeApi.writePoint(point1) + + writeApi.close().then(() => { + console.log('WRITE FINISHED') + }) + ``` + +### Complete example + +```js +'use strict' +/** @module write + * Writes a data point to InfluxDB using the JavaScript client library with Node.js. +**/ + +import {InfluxDB, Point} from '@influxdata/influxdb-client' + +/** + * Instantiate the InfluxDB client + * with a configuration object. + **/ +const influxDB = new InfluxDB({url: process.env.INFLUX_URL, + token: process.env.INFLUX_TOKEN}) + +/** + * Create a write client from the getWriteApi method. + * Provide your org and database. + **/ +const writeApi = influxDB.getWriteApi(process.env.INFLUX_ORG, + process.env.INFLUX_DATABASE) + +/** + * Apply default tags to all points. + **/ +writeApi.useDefaultTags({region: 'west'}) + +/** + * Create a point and write it to the buffer. + **/ +const point1 = new Point('temperature') + .tag('sensor_id', 'TLM01') + .floatField('value', 24.0) +console.log(` ${point1}`) + +writeApi.writePoint(point1) + +/** + * Flush pending writes and close writeApi. + **/ +writeApi.close().then(() => { + console.log('WRITE FINISHED') +}) +``` + +In your terminal with [environment variables or `env.js` set](/influxdb3/version/reference/client-libraries/v2/javascript/nodejs/install/#configure-credentials), run the following command to execute the JavaScript file: + +```sh +node write.js +``` + +### Response codes + +_For information about **InfluxDB API response codes**, see +[InfluxDB API Write documentation](/influxdb3/version/api/#operation/PostWrite)._ diff --git a/content/shared/influxdb-client-libraries-reference/v2/kotlin.md b/content/shared/influxdb-client-libraries-reference/v2/kotlin.md new file mode 100644 index 000000000..ac96e07c2 --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/kotlin.md @@ -0,0 +1,5 @@ +Kotlin is an open source programming language that runs on the Java Virtual Machine (JVM). + +The documentation for this client library is available on GitHub. + +Kotlin InfluxDB client diff --git a/content/shared/influxdb-client-libraries-reference/v2/php.md b/content/shared/influxdb-client-libraries-reference/v2/php.md new file mode 100644 index 000000000..eeeab55da --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/php.md @@ -0,0 +1,5 @@ +PHP is a popular general-purpose scripting language primarily used for web development. + +The documentation for this client library is available on GitHub. + +PHP InfluxDB client \ No newline at end of file diff --git a/content/shared/influxdb-client-libraries-reference/v2/python.md b/content/shared/influxdb-client-libraries-reference/v2/python.md new file mode 100644 index 000000000..64561345b --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/python.md @@ -0,0 +1,101 @@ +Use the [InfluxDB Python client library](https://github.com/influxdata/influxdb-client-python) to integrate InfluxDB into Python scripts and applications. + +This guide presumes some familiarity with Python and InfluxDB. +If just getting started, see [Get started with InfluxDB](/influxdb3/version/get-started/). + +## Before you begin + +You'll need the following prerequisites: + +1. Install the InfluxDB Python library: + + ```sh + pip install influxdb-client + ``` + +2. InfluxDB Cloud Dedicated cluster URL using the HTTPS protocol--for example: + + ``` + https://{{< influxdb/host >}} + ``` +3. Name of the [database](/influxdb3/version/admin/databases/) to write to. +4. InfluxDB [database token](/influxdb3/version/admin/tokens/#database-tokens) + with permission to write to the database. + _For security reasons, we recommend setting an environment variable to store your token and avoid exposing the raw token value in your script._ + +## Write data to InfluxDB with Python + +Follow the steps to write [line protocol](/influxdb3/version/reference/syntax/line-protocol/) data to an InfluxDB Cloud Dedicated database. + +1. In your editor, create a file for your Python program--for example: `write.py`. +2. In the file, import the InfluxDB client library. + + ```python + import influxdb_client + from influxdb_client.client.write_api import SYNCHRONOUS + import os + ``` + +3. Define variables for your [database name](/influxdb3/version/admin/databases/), organization (required, but ignored), and [database token](/influxdb3/version/admin/tokens/#database-tokens). + + ```python + database = "DATABASE_NAME" + org = "ignored" + # INFLUX_TOKEN is an environment variable you created for your database WRITE token + token = os.getenv('INFLUX_TOKEN') + url="https://{{< influxdb/host >}}" + ``` + +4. To instantiate the client, call the `influxdb_client.InfluxDBClient()` method with the following keyword arguments: `url`, `org`, and `token`. + + ```python + client = influxdb_client.InfluxDBClient( + url=url, + token=token, + org=org + ) + ``` + The `InfluxDBClient` object has a `write_api` method used for configuration. + +5. Instantiate a **write client** by calling the `client.write_api()` method with write configuration options. + + ```python + write_api = client.write_api(write_options=SYNCHRONOUS) + ``` + +6. Create a [point](/influxdb3/version/reference/glossary/#point) object and write it to InfluxDB using the `write` method of the API writer object. The write method requires three parameters: `bucket`, `org`, and `record`. + + ```python + p = influxdb_client.Point("my_measurement").tag("location", "Prague").field("temperature", 25.3) + write_api.write(bucket=database, org=org, record=p) + ``` + +### Complete example write script + +```python +import influxdb_client +from influxdb_client.client.write_api import SYNCHRONOUS +import os + +database = "DATABASE_NAME" +org = "ignored" +# INFLUX_TOKEN is an environment variable you created for your database WRITE token +token = os.getenv('INFLUX_TOKEN') +url="https://{{< influxdb/host >}}" + +client = influxdb_client.InfluxDBClient( + url=url, + token=token, + org=org +) + +# Write script +write_api = client.write_api(write_options=SYNCHRONOUS) + +p = influxdb_client.Point("my_measurement").tag("location", "Prague").field("temperature", 25.3) +write_api.write(bucket=database, org=org, record=p) +``` +## Query data from InfluxDB with Python + +The InfluxDB v2 Python client can't query InfluxDB Cloud Dedicated. +To query your dedicated instance, use a Python [Flight SQL client with gRPC](/influxdb3/version/reference/client-libraries/flight-sql/). diff --git a/content/shared/influxdb-client-libraries-reference/v2/r.md b/content/shared/influxdb-client-libraries-reference/v2/r.md new file mode 100644 index 000000000..e0f240e87 --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/r.md @@ -0,0 +1,5 @@ +R is a programming language and software environment for statistical analysis, reporting, and graphical representation primarily used in data science. + +The documentation for this client library is available on GitHub. + +R InfluxDB client \ No newline at end of file diff --git a/content/shared/influxdb-client-libraries-reference/v2/ruby.md b/content/shared/influxdb-client-libraries-reference/v2/ruby.md new file mode 100644 index 000000000..11beb543e --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/ruby.md @@ -0,0 +1,5 @@ +Ruby is a highly flexible, open-source, object-oriented programming language. + +The documentation for this client library is available on GitHub. + +Ruby InfluxDB client \ No newline at end of file diff --git a/content/shared/influxdb-client-libraries-reference/v2/scala.md b/content/shared/influxdb-client-libraries-reference/v2/scala.md new file mode 100644 index 000000000..9a4c95c6c --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/scala.md @@ -0,0 +1,5 @@ +Scala is a general-purpose programming language that supports both object-oriented and functional programming. + +The documentation for this client library is available on GitHub. + +Scala InfluxDB client \ No newline at end of file diff --git a/content/shared/influxdb-client-libraries-reference/v2/swift.md b/content/shared/influxdb-client-libraries-reference/v2/swift.md new file mode 100644 index 000000000..9b0ed86a6 --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v2/swift.md @@ -0,0 +1,5 @@ +Swift is a programming language created by Apple for building applications across multiple Apple platforms. + +The documentation for this client library is available on GitHub. + +Swift InfluxDB client \ No newline at end of file diff --git a/content/shared/influxdb-client-libraries-reference/v3/_index.md b/content/shared/influxdb-client-libraries-reference/v3/_index.md new file mode 100644 index 000000000..73667bf9b --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v3/_index.md @@ -0,0 +1,24 @@ +## Client libraries for InfluxDB 3 + +InfluxDB 3 client libraries are language-specific packages that work with +and integrate with your application to write to and query data in {{% product-name %}}. +InfluxData and the user community maintain client libraries for developers who want to take advantage of: + +- Idioms for InfluxDB requests, responses, and errors. +- Common patterns in a familiar programming language. +- Faster development and less boilerplate code. + +InfluxDB client libraries provide configurable batch writing of data to InfluxDB HTTP APIs. +They can be used to construct line protocol data and transform data from other formats +to line protocol. + +InfluxDB 3 client libraries can query InfluxDB 3 using the Flight protocol to +execute SQL and InfluxQL queries, request +database information, and retrieve data stored in {{% product-name %}}. + +Additional features may vary among client libraries. + +For specifics about a client library, see the library's GitHub repository. +InfluxDB 3 client libraries are part of the [Influx Community](https://github.com/InfluxCommunity). + +{{< children depth="999" description="true" >}} diff --git a/content/shared/influxdb-client-libraries-reference/v3/csharp.md b/content/shared/influxdb-client-libraries-reference/v3/csharp.md new file mode 100644 index 000000000..2eb62dc3f --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v3/csharp.md @@ -0,0 +1,6 @@ +The InfluxDB 3 [`influxdb3-csharp` C# .NET client library](https://github.com/InfluxCommunity/influxdb3-csharp) integrates with C# .NET scripts and applications +to write and query data stored in an {{% product-name %}} database. + +The documentation for this client library is available on GitHub. + +InfluxDB 3 C# .NET client library diff --git a/content/shared/influxdb-client-libraries-reference/v3/go.md b/content/shared/influxdb-client-libraries-reference/v3/go.md new file mode 100644 index 000000000..5735d04a9 --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v3/go.md @@ -0,0 +1,164 @@ +The InfluxDB 3 [`influxdb3-go` Go client library](https://github.com/InfluxCommunity/influxdb3-go) integrates with Go scripts and applications +to write and query data stored in an {{% product-name %}} database. + +## Installation + +```sh +go get github.com/InfluxCommunity/influxdb3-go/v2 +``` + +## Importing the package + +The `influxdb3-go` client library module provides the `influxdb3` package. + +Import the package: + +```go +import ( + "github.com/InfluxCommunity/influxdb3-go/v2/influxdb3" +) +``` + +## API reference + + + +### Function `New` + +Create a client to interact with InfluxDB. + +#### Syntax + +```go +New(config ClientConfig) +``` + +Initializes and returns a `influxdb3.Client` instance with the following: + +- Configuration and functions for writing to the database. +- A `*flight.Client` and functions for querying the database. + +#### Parameters + +- **`config`**: A `ClientConfig` struct with the following configuration properties: + + - **`Host`** (string): the {{% product-name %}} server URL + - **`Token`** (string): a database token string + - **`Database`** (string): the database to use for writing and querying. + - **`Organization`** (string): _Optional_. The organization name or ID. + - **`HTTPClient`** (`*http.Client`): _Optional_. Specifies a custom HTTP client, TLS configuration, or timeout to use. + - **`WriteOptions`** (`*WriteOptions`): _Optional_. Options passed to the write client for writing to the database. + - **`Headers`** (`http.Header`): _Optional_. Headers to include in all requests. + +#### Examples + +##### Create an InfluxDB client + +{{% code-placeholders "DATABASE_(NAME|TOKEN)" %}} +```go +package main + +import ( + "github.com/InfluxCommunity/influxdb3-go/v2/influxdb3" +) + +func main() { + client, err := influxdb3.New(influxdb3.ClientConfig{ + Host: "https://{{< influxdb/host >}}", + Token: "DATABASE_TOKEN", + Database: "DATABASE_NAME", + }) + + defer func(client *influxdb3.Client) { + err := client.Close() + if err != nil { + panic(err) + } + }(client) + + if(err != nil) { + panic(err) + } +} +``` +{{% /code-placeholders %}} + +Replace the following configuration values: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the InfluxDB [database](/influxdb3/version/admin/databases/) to query +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + an InfluxDB [database token](/influxdb3/version/admin/tokens/#database-tokens) + with _read_ permission on the specified database + +## Class influxdb3.Client + +### Function `Client.Query()` + +Query data from InfluxDB 3 using SQL. + +#### Syntax + +```go +client.Query(ctx context.Context, query string) +``` + +Sends a Flight query request with SQL to InfluxDB. + +Returns the following: + +- A custom iterator (*QueryIterator) for accessing query result data and metadata. +- An error, if any. + +#### Parameters + +- **`ctx`** (`context.Context`): the context to use for the request +- **`query`** (string): the SQL query to execute. + +#### Examples + +##### Query using SQL + +```go +query := `SELECT * + FROM home + WHERE time >= '2022-01-02T08:00:00Z' + AND time <= '2022-01-02T20:00:00Z'` + +iterator, err := client.Query(context.Background(), query) +``` + +### Function `Client.QueryWithOptions()` + +Query data from InfluxDB 3 with query options such as **query type** for querying with InfluxQL. + +#### Syntax + +```go +client.QueryWithOptions(ctx context.Context, options *QueryOptions, query string) +``` + +Sends a query request with the specified query options to InfluxDB. + +Returns the following: + +- A custom iterator (*QueryIterator) for accessing query result data and metadata. +- An error, if any. + +#### Parameters + +- **`ctx`** (`context.Context`): the context to use for the request +- **`options`**: query options (query type, optional database) +- **`query`** (string): the SQL or InfluxQL query to execute. + +#### Examples + +##### Query using InfluxQL + +```go +query := `SELECT * + FROM home + WHERE time >= 1641124000s + AND time <= 1641124000s + 8h` +queryOptions := influxdb3.QueryOptions{QueryType: influxdb3.InfluxQL} +iterator, err := client.QueryWithOptions(context.Background(), &queryOptions, query) +``` diff --git a/content/shared/influxdb-client-libraries-reference/v3/java.md b/content/shared/influxdb-client-libraries-reference/v3/java.md new file mode 100644 index 000000000..1d0721cb1 --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v3/java.md @@ -0,0 +1,343 @@ +The InfluxDB 3 [`influxdb3-java` Java client library](https://github.com/InfluxCommunity/influxdb3-java) integrates +with Java application code to write and query data stored in {{% product-name %}}. + +InfluxDB client libraries provide configurable batch writing of data to {{% product-name %}}. +Use client libraries to construct line protocol data, transform data from other formats +to line protocol, and batch write line protocol data to InfluxDB HTTP APIs. + +InfluxDB 3 client libraries can query {{% product-name %}} using SQL or InfluxQL. +The `influxdb3-java` Java client library wraps the Apache Arrow `org.apache.arrow.flight.FlightClient` +in a convenient InfluxDB 3 interface for executing SQL and InfluxQL queries, requesting +server metadata, and retrieving data from {{% product-name %}} using the Flight protocol with gRPC. + +- [Installation](#installation) + - [Using Maven](#using-maven) + - [Using Gradle](#using-gradle) +- [Importing the client](#importing-the-client) +- [API reference](#api-reference) +- [Classes](#classes) +- [InfluxDBClient interface](#influxdbclient-interface) + - [Initialize with credential parameters](#initialize-with-credential-parameters) + - [InfluxDBClient instance methods](#influxdbclient-instance-methods) + - [InfluxDBClient.writePoint](#influxdbclientwritepoint) + - [InfluxDBClient.query](#influxdbclientquery) +#### Example: write and query data + +The following example shows how to use `influxdb3-java` to write and query data stored in {{% product-name %}}. + +{{% code-placeholders "DATABASE_NAME | DATABASE_TOKEN" %}} + +```java +package com.influxdata.demo; + +import com.influxdb.v3.client.InfluxDBClient; +import com.influxdb.v3.client.Point; +import com.influxdb.v3.client.query.QueryOptions; +import com.influxdb.v3.client.query.QueryType; + +import java.time.Instant; +import java.util.stream.Stream; + +public class HelloInfluxDB { + private static final String HOST_URL = "https://{{< influxdb/host >}}"; // your cluster URL + private static final String DATABASE = "DATABASE_NAME"; // your InfluxDB database name + private static final char[] TOKEN = System.getenv("DATABASE_TOKEN"); // a local environment variable that stores your database token + + // Create a client instance that writes and queries data in your database. + public static void main(String[] args) { + // Instantiate the client with your InfluxDB credentials + try (InfluxDBClient client = InfluxDBClient.getInstance(HOST_URL, TOKEN, DATABASE)) { + writeData(client); + queryData(client); + } + catch (Exception e) { + System.err.println("An error occurred while connecting to InfluxDB!"); + e.printStackTrace(); + } + } + + // Use the Point class to construct time series data. + private static void writeData(InfluxDBClient client) { + Point point = Point.measurement("temperature") + .setTag("location", "London") + .setField("value", 30.01) + .setTimestamp(Instant.now().minusSeconds(10)); + try { + client.writePoint(point); + System.out.println("Data is written to the database."); + } + catch (Exception e) { + System.err.println("Failed to write data to the database."); + e.printStackTrace(); + } + } + + // Use SQL to query the most recent 10 measurements + private static void queryData(InfluxDBClient client) { + System.out.printf("--------------------------------------------------------%n"); + System.out.printf("| %-8s | %-8s | %-30s |%n", "location", "value", "time"); + System.out.printf("--------------------------------------------------------%n"); + + String sql = "select time,location,value from temperature order by time desc limit 10"; + try (Stream stream = client.query(sql)) { + stream.forEach(row -> System.out.printf("| %-8s | %-8s | %-30s |%n", row[1], row[2], row[0])); + } + catch (Exception e) { + System.err.println("Failed to query data from the database."); + e.printStackTrace(); + } + } +} +``` + +{{% cite %}}Source: [suyashcjoshi/SimpleJavaInfluxDB](https://github.com/suyashcjoshi/SimpleJavaInfluxDB/) on GitHub{{% /cite %}} + +{{% /code-placeholders %}} + +Replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: + the name of your {{% product-name %}} + [database](/influxdb3/version/admin/databases/) to read and write data to +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a + local environment variable that stores your + [token](/influxdb3/version/admin/tokens/database/)--the token must have + read and write permissions on the specified database. + +### Run the example to write and query data + +1. Build an executable JAR for the project--for example, using Maven: + + + + ```bash + mvn package + ``` + +2. In your terminal, run the `java` command to write and query data in your database: + + + + ```bash + java \ + --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED \ + -jar target/PROJECT_NAME.jar + ``` + + Include the following in your command: + + - [`--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED`](https://arrow.apache.org/docs/java/install.html#id3): with Java version 9 or later and Apache Arrow version 16 or later, exposes JDK internals for Arrow. + For more options, see the [Apache Arrow Java install documentation](https://arrow.apache.org/docs/java/install.html). + - `-jar target/PROJECT_NAME.jar`: your `.jar` file to run. + +The output is the newly written data from your {{< product-name >}} database. + +## Installation + +Include `com.influxdb.influxdb3-java` in your project dependencies. + +{{< code-tabs-wrapper >}} +{{% code-tabs %}} +[Maven pom.xml](#) +[Gradle dependency script](#) +{{% /code-tabs %}} +{{% code-tab-content %}} +```xml + + com.influxdb + influxdb3-java + RELEASE + +``` +{{% /code-tab-content %}} +{{% code-tab-content %}} + +```groovy +dependencies { + + implementation group: 'com.influxdb', name: 'influxdb3-java', version: 'latest.release' + +} +``` +{{% /code-tab-content %}} +{{< /code-tabs-wrapper >}} + +## Importing the client + +The `influxdb3-java` client library package provides +`com.influxdb.v3.client` classes for constructing, writing, and querying data +stored in {{< product-name >}}. + +## API reference + +- [Interface InfluxDBClient](#interface-influxdbclient) + - [Initialize with credential parameters](#initialize-with-credential-parameters) + - [InfluxDBClient instance methods](#influxdbclient-instance-methods) + - [InfluxDBClient.writePoint](#influxdbclientwritepoint) + - [InfluxDBClient.query](#influxdbclientquery) +## InfluxDBClient interface + +`InfluxDBClient` provides an interface for interacting with InfluxDB APIs for writing and querying data. + +The `InfluxDBClient.getInstance` constructor initializes and returns a client instance with the following: + +- A _write client_ configured for writing to the database. +- An Arrow _Flight client_ configured for querying the database. + +To initialize a client, call `getInstance` and pass your credentials as one of +the following types: + +- [parameters](#initialize-with-credential-parameters) +- a [`ClientConfig`](https://github.com/InfluxCommunity/influxdb3-java/blob/main/src/main/java/com/influxdb/v3/client/config/ClientConfig.java) +- a [database connection string](#initialize-using-a-database-connection-string) + +### Initialize with credential parameters + +{{% code-placeholders "host | database | token" %}} + +```java +static InfluxDBClient getInstance(@Nonnull final String host, + @Nullable final char[] token, + @Nullable final String database) +``` + +{{% /code-placeholders %}} + +- {{% code-placeholder-key %}}`host`{{% /code-placeholder-key %}} (string): The host URL of the InfluxDB instance. +- {{% code-placeholder-key %}}`database`{{% /code-placeholder-key %}} (string): The [database](/influxdb3/version/admin/databases/) to use for writing and querying. +- {{% code-placeholder-key %}}`token`{{% /code-placeholder-key %}} (char array): A [database token](/influxdb3/version/admin/tokens/database/) with read/write permissions. + +#### Example: initialize with credential parameters + +{{% code-placeholders "DATABASE_NAME | DATABASE_TOKEN" %}} + +```java +package com.influxdata.demo; + +import com.influxdb.v3.client.InfluxDBClient; +import com.influxdb.v3.client.Point; +import com.influxdb.v3.client.query.QueryOptions; +import com.influxdb.v3.client.query.QueryType; + +import java.time.Instant; +import java.util.stream.Stream; + +public class HelloInfluxDB { + private static final String HOST_URL = "https://{{< influxdb/host >}}"; + private static final String DATABASE = "DATABASE_NAME"; + private static final char[] TOKEN = System.getenv("DATABASE_TOKEN"); + + // Create a client instance, and then write and query data in InfluxDB. + public static void main(String[] args) { + try (InfluxDBClient client = InfluxDBClient.getInstance(HOST_URL, DATABASE_TOKEN, DATABASE)) { + writeData(client); + queryData(client); + } + catch (Exception e) { + System.err.println("An error occurred while connecting to InfluxDB!"); + e.printStackTrace(); + } + } +} +``` + +{{% /code-placeholders %}} + +Replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: + your {{% product-name %}} [database](/influxdb3/version/admin/databases/) +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a + [database token](/influxdb3/version/admin/tokens/database/) that has + the necessary permissions on the specified database. + +#### Default tags + +To include default [tags](/influxdb3/version/reference/glossary/#tag) in +all written data, pass a `Map` of tag keys and values. + +```java +InfluxDBClient getInstance(@Nonnull final String host, + @Nullable final char[] token, + @Nullable final String database, + @Nullable Map defaultTags) +``` + +### Initialize using a database connection string + +{{% code-placeholders "DATABASE_NAME | API_TOKEN" %}} + +```java +"https://{{< influxdb/host >}}" ++ "?token=DATABASE_TOKEN&database=DATABASE_NAME" +``` + +{{% /code-placeholders %}} + +Replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: + your {{% product-name %}} [database](/influxdb3/version/admin/databases/) +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: a + [database token](/influxdb3/version/admin/tokens/database/) that has + the necessary permissions on the specified database. + +### InfluxDBClient instance methods + +#### InfluxDBClient.writePoint + +To write points as line protocol to a database: + +1. [Initialize the `client`](#initialize-with-credential-parameters)--your + token must have write permission on the specified database. +2. Use the `com.influxdb.v3.client.Point` class to create time series data. +3. Call the `client.writePoint()` method to write points as line protocol in your + database. + +```java + // Use the Point class to construct time series data. + // Call client.writePoint to write the point in your database. + private static void writeData(InfluxDBClient client) { + Point point = Point.measurement("temperature") + .setTag("location", "London") + .setField("value", 30.01) + .setTimestamp(Instant.now().minusSeconds(10)); + try { + client.writePoint(point); + System.out.println("Data written to the database."); + } + catch (Exception e) { + System.err.println("Failed to write data to the database."); + e.printStackTrace(); + } + } +``` + +#### InfluxDBClient.query + +To query data and process the results: + +1. [Initialize the `client`](#initialize-with-credential-parameters)--the + token must have read permission on the database you want to query. +2. Call `client.query()` and provide your SQL query as a string. +3. Use the result stream's built-in iterator to process row data. + +```java + // Query the latest 10 measurements using SQL + private static void queryData(InfluxDBClient client) { + System.out.printf("--------------------------------------------------------%n"); + System.out.printf("| %-8s | %-8s | %-30s |%n", "location", "value", "time"); + System.out.printf("--------------------------------------------------------%n"); + + String sql = "select time,location,value from temperature order by time desc limit 10"; + try (Stream stream = client.query(sql)) { + stream.forEach(row -> System.out.printf("| %-8s | %-8s | %-30s |%n", row[1], row[2], row[0])); + } + catch (Exception e) { + System.err.println("Failed to query data from the database."); + e.printStackTrace(); + } + } +``` + +View the InfluxDB 3 Java client library diff --git a/content/shared/influxdb-client-libraries-reference/v3/javascript.md b/content/shared/influxdb-client-libraries-reference/v3/javascript.md new file mode 100644 index 000000000..a1e298d2d --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v3/javascript.md @@ -0,0 +1,6 @@ +The InfluxDB 3 [`influxdb3-js` JavaScript client library](https://github.com/InfluxCommunity/influxdb3-js) integrates with JavaScript scripts and applications +to write and query data stored in an {{% product-name %}} database. + +The documentation for this client library is available on GitHub. + +InfluxDB 3 JavaScript client library diff --git a/content/shared/influxdb-client-libraries-reference/v3/python.md b/content/shared/influxdb-client-libraries-reference/v3/python.md new file mode 100644 index 000000000..03468e49f --- /dev/null +++ b/content/shared/influxdb-client-libraries-reference/v3/python.md @@ -0,0 +1,921 @@ +The InfluxDB 3 [`influxdb3-python` Python client library](https://github.com/InfluxCommunity/influxdb3-python) +integrates {{% product-name %}} write and query operations with Python scripts and applications. + +InfluxDB client libraries provide configurable batch writing of data to {{% product-name %}}. +Client libraries can be used to construct line protocol data, transform data from other formats +to line protocol, and batch write line protocol data to InfluxDB HTTP APIs. + +InfluxDB 3 client libraries can query {{% product-name %}} using SQL or InfluxQL. +The `influxdb3-python` Python client library wraps the Apache Arrow `pyarrow.flight` client +in a convenient InfluxDB 3 interface for executing SQL and InfluxQL queries, requesting +server metadata, and retrieving data from {{% product-name %}} using the Flight protocol with gRPC. + +> [!Note] +> Code samples in this page use the [Get started home sensor sample data](/influxdb3/version/reference/sample-data/#get-started-home-sensor-data). + +- [Installation](#installation) +- [Importing the module](#importing-the-module) +- [API reference](#api-reference) +- [Classes](#classes) +- [Class InfluxDBClient3](#class-influxdbclient3) + - [Parameters](#parameters) + - [Writing modes](#writing-modes) + - [InfluxDBClient3 instance methods](#influxdbclient3-instance-methods) + - [InfluxDBClient3.write](#influxdbclient3write) + - [InfluxDBClient3.write_file](#influxdbclient3write_file) + - [InfluxDBClient3.query](#influxdbclient3query) + - [InfluxDBClient3.close](#influxdbclient3close) +- [Class Point](#class-point) +- [Class WriteOptions](#class-writeoptions) + - [Parameters](#parameters-4) +- [Functions](#functions) + - [Function write_client_options(\*\*kwargs)](#function-write_client_optionskwargs) + - [Function flight_client_options(\*\*kwargs)](#function-flight_client_optionskwargs) +- [Constants](#constants) +- [Exceptions](#exceptions) + +## Installation + +Install the client library and dependencies using `pip`: + +```bash +pip install influxdb3-python +``` + +## Importing the module + +The `influxdb3-python` client library package provides the `influxdb_client_3` +module. + +Import the module: + +```python +import influxdb_client_3 +``` + +Import specific class methods from the module: + +```python +from influxdb_client_3 import InfluxDBClient3, Point, WriteOptions +``` + +- [`influxdb_client_3.InfluxDBClient3`](#class-influxdbclient3): a class for interacting with InfluxDB +- [`influxdb_client_3.Point`](#class-point): a class for constructing a time series data + point +- `influxdb_client_3.WriteOptions`: a class for configuring client + write options + +## API reference + +The `influxdb_client_3` module includes the following classes and functions. + +- [Classes](#classes) +- [Functions](#functions) +- [Constants](#constants) +- [Exceptions](#exceptions) + +## Classes + +- [Class InfluxDBClient3](#class-influxdbclient3) + - [Parameters](#parameters) + - [Writing modes](#writing-modes) + - [InfluxDBClient3 instance methods](#influxdbclient3-instance-methods) + - [InfluxDBClient3.write](#influxdbclient3write) + - [InfluxDBClient3.write_file](#influxdbclient3write_file) + - [InfluxDBClient3.query](#influxdbclient3query) + - [InfluxDBClient3.close](#influxdbclient3close) +- [Class Point](#class-point) +- [Class WriteOptions](#class-writeoptions) + - [Parameters](#parameters-4) + +## Class InfluxDBClient3 + +Provides an interface for interacting with InfluxDB APIs for writing and querying data. + +The `InfluxDBClient3` constructor initializes and returns a client instance with the following: + +- A singleton _write client_ configured for writing to the database. +- A singleton _Flight client_ configured for querying the database. + +### Parameters + +- **`host`** (string): The host URL of the InfluxDB instance. +- **`database`** (string): The database to use for writing and querying. +- **`token`** (string): A database token with read/write permissions. +- _Optional_ **`write_client_options`** (dict): Options to use when writing to InfluxDB. + If `None`, writes are [synchronous](#synchronous-writing). +- _Optional_ **`flight_client_options`** (dict): Options to use when querying InfluxDB. + +### Writing modes + +When writing data, the client uses one of the following modes: + +- [Synchronous writing](#synchronous-writing) +- [Batch writing](#batch-writing) +- Asynchronous writing: Deprecated + +#### Synchronous writing + +Default. When no `write_client_options` are provided during the initialization of `InfluxDBClient3`, writes are synchronous. +When writing data in synchronous mode, the client immediately tries to write the provided data to InfluxDB, doesn't retry failed requests, and doesn't invoke response callbacks. + +##### Example: initialize a client with synchronous (non-batch) defaults + +The following example initializes a client for writing and querying data in an {{% product-name %}} database. +Given that `write_client_options` isn't specified, the client uses the default [synchronous writing](#synchronous-writing) mode. + +{{% code-placeholders "DATABASE_(NAME|TOKEN)" %}} + + + + +```python +from influxdb_client_3 import InfluxDBClient3 + +client = InfluxDBClient3(host=f"{{< influxdb/host >}}", + database=f"DATABASE_NAME", + token=f"DATABASE_TOKEN") +``` + +{{% /code-placeholders %}} + +Replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb3/version/admin/databases/) +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + an {{% product-name %}} [database token](/influxdb3/version/admin/tokens/#database-tokens) + with read/write permissions on the specified database + +To explicitly specify synchronous mode, create a client with `write_options=SYNCHRONOUS`--for example: + +{{% code-placeholders "DATABASE_(NAME|TOKEN)" %}} + + + + +```python +from influxdb_client_3 import InfluxDBClient3, write_client_options, SYNCHRONOUS + +wco = write_client_options(write_options=SYNCHRONOUS) + +client = InfluxDBClient3(host=f"{{< influxdb/host >}}", + database=f"DATABASE_NAME", + token=f"DATABASE_TOKEN", + write_client_options=wco, + flight_client_options=None) +``` + +{{% /code-placeholders %}} + +Replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb3/version/admin/databases/) +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + an {{% product-name %}} [database token](/influxdb3/version/admin/tokens/#database-tokens) + with write permissions on the specified database + +#### Batch writing + +Batch writing is particularly useful for efficient bulk data operations. +Options include setting batch size, flush intervals, retry intervals, and more. + +Batch writing groups multiple writes into a single request to InfluxDB. +In batching mode, the client adds the record or records to a batch, and then schedules the batch for writing to InfluxDB. +The client writes the batch to InfluxDB after reaching `write_client_options.batch_size` or `write_client_options.flush_interval`. +If a write fails, the client reschedules the write according to the `write_client_options` retry options. + +##### Configuring write client options + +Use `WriteOptions` and `write_client_options` to configure batch writing and response handling for the client: + +1. Instantiate `WriteOptions`. To use batch defaults, call the constructor without specifying parameters. +2. Call `write_client_options` and use the `write_options` parameter to specify the `WriteOptions` instance from the preceding step. + Specify callback parameters (success, error, and retry) to invoke functions on success or error. +3. Instantiate `InfluxDBClient3` and use the `write_client_options` parameter to specify the `dict` output from the preceding step. + +##### Example: initialize a client using batch defaults and callbacks + +The following example shows how to use batch mode with defaults and +specify callback functions for the response status (success, error, or retryable error). + +{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} + + + + +```python +from influxdb_client_3 import(InfluxDBClient3, + write_client_options, + WriteOptions, + InfluxDBError) + +status = None + +# Define callbacks for write responses +def success(self, data: str): + status = "Success writing batch: data: {data}" + assert status.startswith('Success'), f"Expected {status} to be success" + +def error(self, data: str, err: InfluxDBError): + status = f"Error writing batch: config: {self}, data: {data}, error: {err}" + assert status.startswith('Success'), f"Expected {status} to be success" +def retry(self, data: str, err: InfluxDBError): + status = f"Retry error writing batch: config: {self}, data: {data}, error: {err}" + assert status.startswith('Success'), f"Expected {status} to be success" + +# Instantiate WriteOptions for batching +write_options = WriteOptions() +wco = write_client_options(success_callback=success, + error_callback=error, + retry_callback=retry, + write_options=write_options) + +# Use the with...as statement to ensure the file is properly closed and resources +# are released. +with InfluxDBClient3(host=f"{{< influxdb/host >}}", + database=f"DATABASE_NAME", + token=f"DATABASE_TOKEN", + write_client_options=wco) as client: + + client.write_file(file='./data/home-sensor-data.csv', + timestamp_column='time', tag_columns=["room"], write_precision='s') +``` + +{{% /code-placeholders %}} + +Replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb3/version/admin/databases/) +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + an {{% product-name %}} [database token](/influxdb3/version/admin/tokens/#database-tokens) + with write permissions on the specified database + +### InfluxDBClient3 instance methods + +### InfluxDBClient3.write + +Writes a record or a list of records to InfluxDB. + +#### Parameters + +- **`record`** (_record_ or list): A record or list of records to write. A record can be a `Point` object, a dict that represents a point, a line protocol string, or a `DataFrame`. +- **`database`** (string): The database to write to. Default is to write to the database specified for the client. +- **`**kwargs`\*\*: Additional write options--for example: + - **`write_precision`** (string): _Optional_. Default is `"ns"`. + Specifies the [precision](/influxdb3/version/reference/glossary/#precision) (`"ms"`, `"s"`, `"us"`, `"ns"`) for timestamps in `record`. + - **`write_client_options`** (dict): _Optional_. + Specifies callback functions and options for [batch writing](#batch-writing) mode. + To generate the `dict`, use the [`write_client_options` function](#function-write_client_optionskwargs). + +#### Example: write a line protocol string + +{{% influxdb/custom-timestamps %}} +{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} + + + + +```python +from influxdb_client_3 import InfluxDBClient3 + +point = "home,room=Living\\ Room temp=21.1,hum=35.9,co=0i 1641024000" + +client = InfluxDBClient3(host=f"{{< influxdb/host >}}", + database=f"DATABASE_NAME", + token=f"DATABASE_TOKEN") + +client.write(record=point, write_precision="s") +``` + +The following sample code executes an SQL query to retrieve the point: + + + +```python +# Execute an SQL query +table = client.query(query='''SELECT room + FROM home + WHERE temp=21.1 + AND time=from_unixtime(1641024000)''') +# table is a pyarrow.Table +room = table[0][0] +assert f"{room}" == 'Living Room', f"Expected {room} to be Living Room" +``` + +{{% /code-placeholders %}} +{{% /influxdb/custom-timestamps %}} + +Replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb3/version/admin/databases/) +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + an {{% product-name %}} [database token](/influxdb3/version/admin/tokens/#database-tokens) + with write permissions on the specified database + +#### Example: write data using points + +The `influxdb_client_3.Point` class provides an interface for constructing a data +point for a measurement and setting fields, tags, and the timestamp for the point. +The following example shows how to create a `Point` object, and then write the +data to InfluxDB. + +{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} + + + + +```python +from influxdb_client_3 import Point, InfluxDBClient3 + +point = Point("home").tag("room", "Kitchen").field("temp", 21.5).field("hum", .25) +client = InfluxDBClient3(host=f"{{< influxdb/host >}}", + database=f"DATABASE_NAME", + token=f"DATABASE_TOKEN") +client.write(point) +``` + + + +The following sample code executes an InfluxQL query to retrieve the written data: + +```python +# Execute an InfluxQL query +table = client.query(query='''SELECT DISTINCT(temp) as val + FROM home + WHERE temp > 21.0 + AND time >= now() - 10m''', language="influxql") +# table is a pyarrow.Table +df = table.to_pandas() +assert 21.5 in df['val'].values, f"Expected value in {df['val']}" +``` + +{{% /code-placeholders %}} + +Replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb3/version/admin/databases/) +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + an {{% product-name %}} [database token](/influxdb3/version/admin/tokens/#database-tokens) + with write permissions on the specified database + +##### Example: write data using a dict + +`InfluxDBClient3` can serialize a dictionary object into line protocol. +If you pass a `dict` to `InfluxDBClient3.write`, the client expects the `dict` to have the +following _point_ attributes: + +- **measurement** (string): the measurement name +- **tags** (dict): a dictionary of tag key-value pairs +- **fields** (dict): a dictionary of field key-value pairs +- **time**: the [timestamp](/influxdb3/version/reference/glossary/#timestamp) for the record + +The following example shows how to define a `dict` that represents a point, and then write the +data to InfluxDB. + +{{% influxdb/custom-timestamps %}} +{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} + + + + +```python +from influxdb_client_3 import InfluxDBClient3 + +# Using point dictionary structure +points = { + "measurement": "home", + "tags": {"room": "Kitchen", "sensor": "K001"}, + "fields": {"temp": 72.2, "hum": 36.9, "co": 4}, + "time": 1641067200 + } + +client = InfluxDBClient3(host=f"{{< influxdb/host >}}", + database=f"DATABASE_NAME", + token=f"DATABASE_TOKEN") + +client.write(record=points, write_precision="s") +``` + +{{% /code-placeholders %}} +{{% /influxdb/custom-timestamps %}} + +Replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb3/version/admin/databases/) +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + an {{% product-name %}} [database token](/influxdb3/version/admin/tokens/#database-tokens) + with write permissions on the specified database + +### InfluxDBClient3.write_file + +Writes data from a file to InfluxDB. +Execution is synchronous. + +#### Parameters + +- **`file`** (string): A path to a file containing records to write to InfluxDB. + The filename must end with one of the following supported extensions. + For more information about encoding and formatting data, see the documentation for each supported format: + + - `.feather`: [Feather](https://arrow.apache.org/docs/python/feather.html) + - `.parquet`: [Parquet](https://arrow.apache.org/docs/python/parquet.html) + - `.csv`: [Comma-separated values](https://arrow.apache.org/docs/python/csv.html) + - `.json`: [JSON](https://pandas.pydata.org/docs/reference/api/pandas.read_json.html) + - `.orc`: [ORC](https://arrow.apache.org/docs/python/orc.html) + +- **`measurement_name`** (string): Defines the measurement name for records in the file. + The specified value takes precedence over `measurement` and `iox::measurement` columns in the file. + If no value is specified for the parameter, and a `measurement` column exists in the file, the `measurement` column value is used for the measurement name. + If no value is specified for the parameter, and no `measurement` column exists, the `iox::measurement` column value is used for the measurement name. +- **`tag_columns`** (list): Tag column names. + Columns not included in the list and not specified by another parameter are assumed to be fields. +- **`timestamp_column`** (string): The name of the column that contains timestamps. Default is `'time'`. +- **`database`** (`str`): The database to write to. Default is to write to the database specified for the client. +- **`file_parser_options`** (callable): A function for providing additional arguments to the file parser. +- **`**kwargs`**: Additional options to pass to the `WriteAPI`--for example: + - **`write_precision`** (string): _Optional_. Default is `"ns"`. + Specifies the [precision](/influxdb3/version/reference/glossary/#precision) (`"ms"`, `"s"`, `"us"`, `"ns"`) for timestamps in `record`. + - **`write_client_options`** (dict): _Optional_. + Specifies callback functions and options for [batch writing](#batch-writing) mode. + To generate the `dict`, use the [`write_client_options` function](#function-write_client_optionskwargs). + +#### Example: use batch options when writing file data + +The following example shows how to specify customized write options for batching, retries, and response callbacks, +and how to write data from CSV and JSON files to InfluxDB: + +{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} + + + + +```python +from influxdb_client_3 import(InfluxDBClient3, write_client_options, + WritePrecision, WriteOptions, InfluxDBError) + +# Define the result object +result = { + 'config': None, + 'status': None, + 'data': None, + 'error': None +} + +# Define callbacks for write responses +def success_callback(self, data: str): + result['config'] = self + result['status'] = 'success' + result['data'] = data + + assert result['data'] != None, f"Expected {result['data']}" + print("Successfully wrote data: {result['data']}") + +def error_callback(self, data: str, exception: InfluxDBError): + result['config'] = self + result['status'] = 'error' + result['data'] = data + result['error'] = exception + + assert result['status'] == "success", f"Expected {result['error']} to be success for {result['config']}" + +def retry_callback(self, data: str, exception: InfluxDBError): + result['config'] = self + result['status'] = 'retry_error' + result['data'] = data + result['error'] = exception + + assert result['status'] == "success", f"Expected {result['status']} to be success for {result['config']}" + +write_options = WriteOptions(batch_size=500, + flush_interval=10_000, + jitter_interval=2_000, + retry_interval=5_000, + max_retries=5, + max_retry_delay=30_000, + exponential_base=2) +wco = write_client_options(success_callback=success_callback, + error_callback=error_callback, + retry_callback=retry_callback, + write_options=write_options) + +with InfluxDBClient3(host=f"{{< influxdb/host >}}", + database=f"DATABASE_NAME", + token=f"DATABASE_TOKEN", + write_client_options=wco) as client: + + client.write_file(file='./data/home-sensor-data.csv', timestamp_column='time', + tag_columns=["room"], write_precision='s') + + client.write_file(file='./data/home-sensor-data.json', timestamp_column='time', + tag_columns=["room"], write_precision='s') +``` + +{{% /code-placeholders %}} + +Replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb3/version/admin/databases/) +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + an {{% product-name %}} [database token](/influxdb3/version/admin/tokens/#database-tokens) + with write permissions on the specified database + +### InfluxDBClient3.query + +Sends a Flight request to execute the specified SQL or InfluxQL query. +Returns all data in the query result as an Arrow table ([`pyarrow.Table`](https://arrow.apache.org/docs/python/generated/pyarrow.Table.html) instance). + +#### Parameters + +- **`query`** (string): the SQL or InfluxQL to execute. +- **`language`** (string): the query language used in the `query` parameter--`"sql"` or `"influxql"`. Default is `"sql"`. +- **`mode`** (string): Specifies the output to return from the [`pyarrow.flight.FlightStreamReader`](https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightStreamReader.html#pyarrow.flight.FlightStreamReader). + Default is `"all"`. + - `all`: Read the entire contents of the stream and return it as a [`pyarrow.Table`](https://arrow.apache.org/docs/python/generated/pyarrow.Table.html). + - `chunk`: Read the next message (a `FlightStreamChunk`) and return `data` and `app_metadata`. + Returns `null` if there are no more messages. + - `pandas`: Read the contents of the stream and return it as a [`pandas.DataFrame`](https://pandas.pydata.org/pandas-docs/stable/reference/frame.html). + - `reader`: Convert the `FlightStreamReader` into a [`pyarrow.RecordBatchReader`](https://arrow.apache.org/docs/python/generated/pyarrow.RecordBatchReader.html#pyarrow-recordbatchreader). + - `schema`: Return the schema for all record batches in the stream. +- **`**kwargs`**: [`FlightCallOptions`](https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightCallOptions.html#pyarrow.flight.FlightCallOptions) + +#### Example: query using SQL + +{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} + + + + +```python +from influxdb_client_3 import InfluxDBClient3 + +client = InfluxDBClient3(host=f"{{< influxdb/host >}}", + database=f"DATABASE_NAME", + token=f"DATABASE_TOKEN") + +table = client.query("SELECT * from home WHERE time >= now() - INTERVAL '90 days'") + +# Filter columns. +print(table.select(['room', 'temp'])) + +# Use PyArrow to aggregate data. +print(table.group_by('hum').aggregate([])) +``` + +{{% /code-placeholders %}} + +In the examples, replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of your {{% product-name %}} [database](/influxdb3/version/admin/databases/) +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + an {{% product-name %}} [database token](/influxdb3/version/admin/tokens/#database-tokens) + with read permission on the specified database + +#### Example: query using InfluxQL + +{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} + + + + +```python +from influxdb_client_3 import InfluxDBClient3 + +client = InfluxDBClient3(host=f"{{< influxdb/host >}}", + database=f"DATABASE_NAME", + token=f"DATABASE_TOKEN") +query = "SELECT * from home WHERE time >= -90d" +table = client.query(query=query, language="influxql") + +# Filter columns. +print(table.select(['room', 'temp'])) +``` + +{{% /code-placeholders %}} + +##### Example: read all data from the stream and return a pandas DataFrame + +{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} + + + + +```python +from influxdb_client_3 import InfluxDBClient3 + +client = InfluxDBClient3(host=f"{{< influxdb/host >}}", + database=f"DATABASE_NAME", + token=f"DATABASE_TOKEN") +query = "SELECT * from home WHERE time >= now() - INTERVAL '90 days'" +pd = client.query(query=query, mode="pandas") +# Print the pandas DataFrame formatted as a Markdown table. +print(pd.to_markdown()) +``` + +{{% /code-placeholders %}} + +##### Example: view the schema for all batches in the stream + +{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} + + + + +```python +from influxdb_client_3 import InfluxDBClient3 + +client = InfluxDBClient3(host=f"{{< influxdb/host >}}", + database=f"DATABASE_NAME", + token=f"DATABASE_TOKEN") +table = client.query("""SELECT * + from home + WHERE time >= now() - INTERVAL '90 days'""") + +# View the table schema. +print(table.schema) +``` + +{{% /code-placeholders %}} + +##### Example: retrieve the result schema and no data + +{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} + + + + +```python +from influxdb_client_3 import InfluxDBClient3 + +client = InfluxDBClient3(host=f"{{< influxdb/host >}}", + database=f"DATABASE_NAME", + token=f"DATABASE_TOKEN") +query = "SELECT * from home WHERE time >= now() - INTERVAL '90 days'" +schema = client.query(query=query, mode="schema") +print(schema) +``` + +{{% /code-placeholders %}} + +##### Specify a timeout + +Pass `timeout=` for [`FlightCallOptions`](https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightCallOptions.html#pyarrow.flight.FlightCallOptions) to use a custom timeout. + +{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} + + + + +```python +from influxdb_client_3 import InfluxDBClient3 + +client = InfluxDBClient3(host=f"{{< influxdb/host >}}", + database=f"DATABASE_NAME", + token=f"DATABASE_TOKEN") +query = "SELECT * from home WHERE time >= now() - INTERVAL '90 days'" +client.query(query=query, timeout=5) +``` + +{{% /code-placeholders %}} + +### InfluxDBClient3.close + +Sends all remaining records from the batch to InfluxDB, +and then closes the underlying write client and Flight client to release resources. + +#### Example: close a client + +{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} + + + + +```python +from influxdb_client_3 import InfluxDBClient3 + +client = InfluxDBClient3(host=f"{{< influxdb/host >}}", + database=f"DATABASE_NAME", + token=f"DATABASE_TOKEN") +client.close() +``` + +{{% /code-placeholders %}} + +## Class Point + +Provides an interface for constructing a time series data +point for a measurement, and setting fields, tags, and timestamp. + + + + +```python +from influxdb_client_3 import Point +point = Point("home").tag("room", "Living Room").field("temp", 72) +``` + +See how to [write data using points](#example-write-data-using-points). + +## Class WriteOptions + +Provides an interface for constructing options that customize batch writing behavior, such as batch size and retry. + + + + +```python +from influxdb_client_3 import WriteOptions + +write_options = WriteOptions(batch_size=500, + flush_interval=10_000, + jitter_interval=2_000, + retry_interval=5_000, + max_retries=5, + max_retry_delay=30_000, + exponential_base=2) +``` + +See how to [use batch options for writing data](#example-use-batch-options-when-writing-file-data). + +### Parameters + +- **`batch_size`**: Default is `1000`. +- **`flush_interval`**: Default is `1000`. +- **`jitter_interval`**: Default is `0`. +- **`retry_interval`**: Default is `5000`. +- **`max_retries`**: Default is `5`. +- **`max_retry_delay`**: Default is `125000`. +- **`max_retry_time`**: Default is `180000`. +- **`exponential_base`**: Default is `2`. +- **`max_close_wait`**: Default is `300000`. +- **`write_scheduler`**: Default is `ThreadPoolScheduler(max_workers=1)`. + +## Functions + +- [influxdb_client_3.write_client_options](#function-write_client_optionskwargs) +- [influxdb_client_3.flight_client_options](#function-flight_client_optionskwargs) + +### Function write_client_options(\*\*kwargs) + +Returns a `dict` with the specified write client options. + +#### Parameters + +The function takes the following keyword arguments: + +- **`write_options`** ([`WriteOptions`](#class-writeoptions)): Specifies whether the client writes data using synchronous mode or batching mode. If using batching mode, the client uses the specified batching options. +- **`point_settings`** (dict): Default tags that the client will add to each point when writing the data to InfluxDB. +- **`success_callback`** (callable): If using batching mode, a function to call after data is written successfully to InfluxDB (HTTP status `204`) +- **`error_callback`** (callable): if using batching mode, a function to call if data is not written successfully (the response has a non-`204` HTTP status) +- **`retry_callback`** (callable): if using batching mode, a function to call if the request is a retry (using batching mode) and data is not written successfully + +#### Example: instantiate options for batch writing + +```python +from influxdb_client_3 import write_client_options, WriteOptions +from influxdb_client_3.write_client.client.write_api import WriteType + +def success(): + print("Success") +def error(): + print("Error") +def retry(): + print("Retry error") + +write_options = WriteOptions() +wco = write_client_options(success_callback=success, + error_callback=error, + retry_callback=retry, + write_options=write_options) + +assert wco['success_callback'] +assert wco['error_callback'] +assert wco['retry_callback'] +assert wco['write_options'].write_type == WriteType.batching +``` + +#### Example: instantiate options for synchronous writing + +```python +from influxdb_client_3 import write_client_options, SYNCHRONOUS +from influxdb_client_3.write_client.client.write_api import WriteType + +wco = write_client_options(write_options=SYNCHRONOUS) + +assert wco['write_options'].write_type == WriteType.synchronous +``` + +### Function flight_client_options(\*\*kwargs) + +Returns a `dict` with the specified [FlightClient](https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightClient.html) parameters. + +#### Parameters + +- `kwargs`: keyword arguments for [`pyarrow.flight.FlightClient`](https://arrow.apache.org/docs/python/generated/pyarrow.flight.FlightClient.html) parameters + +#### Example: specify the root certificate path + +{{% code-placeholders "DATABASE_NAME|DATABASE_TOKEN" %}} + + + + +```python +from influxdb_client_3 import InfluxDBClient3, flight_client_options +import certifi + +fh = open(certifi.where(), "r") +cert = fh.read() +fh.close() + +client = InfluxDBClient3(host=f"{{< influxdb/host >}}", + database=f"DATABASE_NAME", + token=f"DATABASE_TOKEN", + flight_client_options=flight_client_options(tls_root_certs=cert)) +``` + +{{% /code-placeholders %}} + +Replace the following: + +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: + the name of your {{% product-name %}} [database](/influxdb3/version/admin/databases/) +- {{% code-placeholder-key %}}`DATABASE_TOKEN`{{% /code-placeholder-key %}}: + an {{% product-name %}} [database token](/influxdb3/version/admin/tokens/#database-tokens) + with read permission on the specified database + +## Constants + +- `influxdb_client_3.SYNCHRONOUS`: Represents synchronous write mode +- `influxdb_client_3.WritePrecision`: Enum class that represents write precision + +## Exceptions + +- `influxdb_client_3.InfluxDBError`: Exception class raised for InfluxDB-related errors diff --git a/content/shared/influxdb3-write-guides/client-libraries.md b/content/shared/influxdb3-write-guides/api-client-libraries.md similarity index 68% rename from content/shared/influxdb3-write-guides/client-libraries.md rename to content/shared/influxdb3-write-guides/api-client-libraries.md index 4a23bcf53..5be1f203a 100644 --- a/content/shared/influxdb3-write-guides/client-libraries.md +++ b/content/shared/influxdb3-write-guides/api-client-libraries.md @@ -1,5 +1,128 @@ + Use the `/api/v3/write_lp` HTTP API endpoint and InfluxDB v3 API clients to write points as line protocol data to {{% product-name %}}. -Use InfluxDB 3 client libraries to construct data as time series points, and +- [Use the /api/v3/write\_lp endpoint](#use-the-apiv3write_lp-endpoint) + - [Example: write data using the /api/v3 HTTP API](#example-write-data-using-the-apiv3-http-api) + - [Write responses](#write-responses) + - [Use no\_sync for immediate write responses](#use-no_sync-for-immediate-write-responses) +- [Use API client libraries](#use-api-client-libraries) + - [Construct line protocol](#construct-line-protocol) + - [Set up your project](#set-up-your-project) + +## Use the /api/v3/write_lp endpoint + +{{% product-name %}} adds the `/api/v3/write_lp` endpoint. + +{{}} + +This endpoint accepts the same line protocol syntax as [previous versions](/influxdb3/version/write-data/compatibility-apis/), +and supports the following parameters: + +- `?accept_partial=`: Accept or reject partial writes (default is `true`). +- `?no_sync=`: Control when writes are acknowledged: + - `no_sync=true`: Acknowledge writes before WAL persistence completes. + - `no_sync=false`: Acknowledges writes after WAL persistence completes (default). +- `?precision=`: Specify the precision of the timestamp. The default is nanosecond precision. + +For more information about the parameters, see [Write data](/influxdb3/version/write-data/). + +InfluxData provides supported InfluxDB 3 client libraries that you can integrate with your code +to construct data as time series points, and then write them as line protocol to an {{% product-name %}} database. +For more information, see how to [use InfluxDB client libraries to write data](/influxdb3/version/write-data/client-libraries/). + +### Example: write data using the /api/v3 HTTP API + +The following examples show how to write data using `curl` and the `/api/3/write_lp` HTTP endpoint. +To show the difference between accepting and rejecting partial writes, line `2` in the example contains a string value (`"hi"`) for a float field (`temp`). + +#### Partial write of line protocol occurred + +With `accept_partial=true` (default): + +```bash +curl -v "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors&precision=auto" \ + --data-raw 'home,room=Sunroom temp=96 +home,room=Sunroom temp="hi"' +``` + +The response is the following: + +``` +< HTTP/1.1 400 Bad Request +... +{ + "error": "partial write of line protocol occurred", + "data": [ + { + "original_line": "home,room=Sunroom temp=hi", + "line_number": 2, + "error_message": "invalid column type for column 'temp', expected iox::column_type::field::float, got iox::column_type::field::string" + } + ] +} +``` + +Line `1` is written and queryable. +Line `2` is rejected. +The response is an HTTP error (`400`) status, and the response body contains the error message `partial write of line protocol occurred` with details about the problem line. + +#### Parsing failed for write_lp endpoint + +With `accept_partial=false`: + +```bash +curl -v "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors&precision=auto&accept_partial=false" \ + --data-raw 'home,room=Sunroom temp=96 +home,room=Sunroom temp="hi"' +``` + +The response is the following: + +``` +< HTTP/1.1 400 Bad Request +... +{ + "error": "parsing failed for write_lp endpoint", + "data": { + "original_line": "home,room=Sunroom temp=hi", + "line_number": 2, + "error_message": "invalid column type for column 'temp', expected iox::column_type::field::float, got iox::column_type::field::string" + } +} +``` + +InfluxDB rejects all points in the batch. +The response is an HTTP error (`400`) status, and the response body contains `parsing failed for write_lp endpoint` and details about the problem line. + +For more information about the ingest path and data flow, see [Data durability](/influxdb3/version/reference/internals/durability/). + +### Write responses + +By default, InfluxDB acknowledges writes after flushing the WAL file to the Object store (occurring every second). +For high write throughput, you can send multiple concurrent write requests. + +### Use no_sync for immediate write responses + +To reduce the latency of writes, use the `no_sync` write option, which acknowledges writes _before_ WAL persistence completes. +When `no_sync=true`, InfluxDB validates the data, writes the data to the WAL, and then immediately responds to the client, without waiting for persistence to the Object store. + +Using `no_sync=true` is best when prioritizing high-throughput writes over absolute durability. + +- Default behavior (`no_sync=false`): Waits for data to be written to the Object store before acknowledging the write. Reduces the risk of data loss, but increases the latency of the response. +- With `no_sync=true`: Reduces write latency, but increases the risk of data loss in case of a crash before WAL persistence. + +#### Immediate write using the HTTP API + +The `no_sync` parameter controls when writes are acknowledged--for example: + +```bash +curl "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto&no_sync=true" \ + --data-raw "home,room=Sunroom temp=96" +``` + +## Use API client libraries + +Use InfluxDB 3 client libraries that integrate with your code to construct data +as time series points, and then write them as line protocol to an {{% product-name %}} database. - [Construct line protocol](#construct-line-protocol) @@ -7,7 +130,7 @@ then write them as line protocol to an {{% product-name %}} database. - [Set up your project](#set-up-your-project) - [Construct points and write line protocol](#construct-points-and-write-line-protocol) -## Construct line protocol +### Construct line protocol With a [basic understanding of line protocol](/influxdb3/version/write-data/#line-protocol), you can construct line protocol data and write it to {{% product-name %}}. @@ -18,7 +141,7 @@ Client library `write` methods let you provide data as raw line protocol or as program creates the data you write to InfluxDB, use the client library `Point` interface to take advantage of type safety in your program. -### Example home schema +#### Example home schema Consider a use case where you collect data from sensors in your home. Each sensor collects temperature, humidity, and carbon monoxide readings. @@ -41,7 +164,7 @@ To collect this data, use the following schema: The following example shows how to construct and write points that follow the `home` schema. -## Set up your project +### Set up your project After setting up {{< product-name >}} and your project, you should have the following: @@ -179,7 +302,7 @@ The following steps set up a Python project using the {{% /tab-content %}} {{< /tabs-wrapper >}} -## Construct points and write line protocol +#### Construct points and write line protocol Client libraries provide one or more `Point` constructor methods. Some libraries support language-native data structures, such as Go's `struct`, for creating @@ -197,7 +320,7 @@ points. 1. Create a file for your module--for example: `main.go`. -1. In `main.go`, enter the following sample code: +2. In `main.go`, enter the following sample code: ```go package main @@ -274,7 +397,7 @@ points. } ``` -1. To run the module and write the data to your {{% product-name %}} database, +3. To run the module and write the data to your {{% product-name %}} database, enter the following command in your terminal: @@ -285,13 +408,14 @@ points. -{{% /tab-content %}} {{% tab-content %}} +{{% /tab-content %}} +{{% tab-content %}} 1. Create a file for your module--for example: `write-points.js`. -1. In `write-points.js`, enter the following sample code: +2. In `write-points.js`, enter the following sample code: ```js // write-points.js @@ -349,7 +473,7 @@ points. writePoints(); ``` -1. To run the module and write the data to your {{\< product-name >}} database, +3. To run the module and write the data to your {{\< product-name >}} database, enter the following command in your terminal: @@ -360,13 +484,14 @@ points. - {{% /tab-content %}} {{% tab-content %}} + {{% /tab-content %}} + {{% tab-content %}} 1. Create a file for your module--for example: `write-points.py`. -1. In `write-points.py`, enter the following sample code to write data in +2. In `write-points.py`, enter the following sample code to write data in batching mode: ```python @@ -424,7 +549,7 @@ points. client.write(points, write_precision='s') ``` -1. To run the module and write the data to your {{< product-name >}} database, +3. To run the module and write the data to your {{< product-name >}} database, enter the following command in your terminal: diff --git a/content/shared/influxdb3-write-guides/compatibility-apis.md b/content/shared/influxdb3-write-guides/compatibility-apis.md new file mode 100644 index 000000000..eec64c67a --- /dev/null +++ b/content/shared/influxdb3-write-guides/compatibility-apis.md @@ -0,0 +1,28 @@ + +Use compatibility APIs when you need to migrate existing InfluxDB v1 or v2 write +workloads to InfluxDB 3.x. +The `/api/v2/write` (v2-compatible) and `/write` (v1-compatible) HTTP API +endpoints work with InfluxDB [client libraries](/influxdb3/version/reference/client-libraries/), [Telegraf](/telegraf/v1/), and third-party integrations +to write points as line protocol data to {{% product-name %}}. + +> [!Note] +> #### Compatibility APIs differ from native APIs +> +> Keep in mind that the compatibility APIs differ from the v1 and v2 APIs in previous versions in the following ways: +> +> - Tags in a table (measurement) are _immutable_ +> - A tag and a field can't have the same name within a table. + +## InfluxDB v2 compatibility + +The `/api/v2/write` InfluxDB v2 compatibility endpoint provides backwards compatibility with clients that can write data to InfluxDB OSS v2.x and Cloud 2 (TSM). + +{{}} + + +## InfluxDB v1 compatibility + +The `/write` InfluxDB v1 compatibility endpoint provides backwards compatibility with clients that can write data to InfluxDB v1.x. + +{{}} + diff --git a/content/shared/influxdb3-write-guides/influxdb3-cli.md b/content/shared/influxdb3-write-guides/influxdb3-cli.md index 9b69bbbc6..6e95dc048 100644 --- a/content/shared/influxdb3-write-guides/influxdb3-cli.md +++ b/content/shared/influxdb3-write-guides/influxdb3-cli.md @@ -5,10 +5,18 @@ to write line protocol data to {{< product-name >}}. - [Construct line protocol](#construct-line-protocol) - [Write the line protocol to InfluxDB](#write-the-line-protocol-to-influxdb) +> [!Note] +> #### Use the API for batching and higher-volume writes +> +> The `influxdb3` CLI lets you quickly get started writing data to {{< product-name >}}. +> For batching and higher-volume write workloads, use +> [API client libraries](/influxdb3/version/write-data/api/#use-api-client-libraries) +> or [Telegraf](/influxdb3/version/write-data/use-telegraf/). + ## Construct line protocol With a [basic understanding of line protocol](/influxdb3/version/write-data/#line-protocol), -you can now construct line protocol and write data to {{< product-name >}}. +you can construct data in line protocol format and write it to {{< product-name >}}. Consider a use case where you collect data from sensors in your home. Each sensor collects temperature, humidity, and carbon monoxide readings. To collect this data, use the following schema: @@ -22,7 +30,7 @@ To collect this data, use the following schema: - `co`: carbon monoxide in parts per million (integer) - **timestamp**: Unix timestamp in _second_ precision -The following line protocol represent the schema described above: +The following line protocol represents the schema described above: {{% influxdb/custom-timestamps %}} diff --git a/content/shared/v3-core-get-started/_index.md b/content/shared/v3-core-get-started/_index.md index 54f98b154..2e1031b9f 100644 --- a/content/shared/v3-core-get-started/_index.md +++ b/content/shared/v3-core-get-started/_index.md @@ -1,13 +1,3 @@ -> [!Note] -> InfluxDB 3 Core is purpose-built for real-time data monitoring and recent data. -> InfluxDB 3 Enterprise builds on top of Core with support for historical data -> querying, high availability, read replicas, and more. -> Enterprise will soon unlock -> enhanced security, row-level deletions, an administration UI, and more. -> Learn more about [InfluxDB 3 Enterprise](/influxdb3/enterprise/). - -## Get started with {{% product-name %}} - InfluxDB is a database built to collect, process, transform, and store event and time series data, and is ideal for use cases that require real-time ingest and fast query response times to build user interfaces, monitoring, and automation solutions. Common use cases include: @@ -47,8 +37,9 @@ This guide covers InfluxDB 3 Core (the open source release), including the follo * [Install and startup](#install-and-startup) * [Data Model](#data-model) -* [Write data to the database](#write-data) -* [Query the database](#query-the-database) +* [Tools to use](#tools-to-use) +* [Write data](#write-data) +* [Query data](#query-data) * [Last values cache](#last-values-cache) * [Distinct values cache](#distinct-values-cache) * [Python plugins and the processing engine](#python-plugins-and-the-processing-engine) @@ -225,23 +216,6 @@ For more information about server options, use the CLI help: influxdb3 serve --help ``` -> [!Important] -> #### Stopping the Docker container -> -> Currently, a bug prevents using `Ctrl-c` to stop an InfluxDB 3 container. -> Use the `docker kill` command to stop the container: -> -> 1. Enter the following command to find the container ID: -> -> ```bash -> docker ps -a -> ``` -> 2. Enter the command to stop the container: -> -> ```bash -> docker kill -> ``` - ### Data model The database server contains logical databases, which have tables, which have columns. Compared to previous versions of InfluxDB you can think of a database as a `bucket` in v2 or as a `db/retention_policy` in v1. A `table` is equivalent to a `measurement`, which has columns that can be of type `tag` (a string dictionary), `int64`, `float64`, `uint64`, `bool`, or `string` and finally every table has a `time` column that is a nanosecond precision timestamp. @@ -251,6 +225,32 @@ This is the sort order used for all Parquet files that get created. When you cre Tags should hold unique identifying information like `sensor_id`, or `building_id` or `trace_id`. All other data should be kept in fields. You will be able to add fast last N value and distinct value lookups later for any column, whether it is a field or a tag. +### Tools to use + +The following table compares tools that you can use to interact with {{% product-name %}}. +This tutorial covers many of the recommended tools. + +| Tool | Administration | Write | Query | +| :------------------------------------------------------------------------------------------------ | :----------------------: | :----------------------: | :----------------------: | +| [Chronograf](/chronograf/v1/) | - | - | **{{< icon "check" >}}** | +| `influx` CLI | - | - | - | +| [`influxdb3` CLI](#influxdb3-cli){{< req text="\* " color="magenta" >}} | **{{< icon "check" >}}** | **{{< icon "check" >}}** | **{{< icon "check" >}}** | +| `influxctl` CLI | - | - | - | +| [InfluxDB HTTP API](#influxdb-http-api){{< req text="\* " color="magenta" >}} | **{{< icon "check" >}}** | **{{< icon "check" >}}** | **{{< icon "check" >}}** | +| InfluxDB user interface | - | - | - | +| [InfluxDB 3 client libraries](/influxdb3/version/reference/client-libraries/v3/) | - | **{{< icon "check" >}}** | **{{< icon "check" >}}** | +| [InfluxDB v2 client libraries](/influxdb3/version/reference/client-libraries/v2/) | - | **{{< icon "check" >}}** | - | +| [InfluxDB v1 client libraries](/influxdb3/version/reference/client-libraries/v1/) | - | **{{< icon "check" >}}** | **{{< icon "check" >}}** | +| [InfluxDB 3 Processing engine](#python-plugins-and-the-processing-engine){{< req text="\* " color="magenta" >}} | | **{{< icon "check" >}}** | **{{< icon "check" >}}** | +| [Telegraf](/telegraf/v1/) | - | **{{< icon "check" >}}** | - | +| **Third-party tools** | | | | +| Flight SQL clients | - | - | **{{< icon "check" >}}** | +| [Grafana](/influxdb3/version/visualize-data/grafana/) | - | - | **{{< icon "check" >}}** | + +{{< caption >}} +{{< req type="key" text="Covered in this guide" color="magenta" >}} +{{< /caption >}} + ### Write data InfluxDB is a schema-on-write database. You can start writing data and InfluxDB creates the logical database, tables, and their schemas on the fly. @@ -264,35 +264,9 @@ Subsequent requests can add new fields on-the-fly, but can't add new tags. > The system persists data to Parquet files for historical analysis with [InfluxDB 3 Enterprise](/influxdb3/enterprise/get-started/) or third-party tools. > For extended historical queries and optimized data organization, consider using [InfluxDB 3 Enterprise](/influxdb3/enterprise/get-started/). -{{% product-name %}} provides three write API endpoints that respond to HTTP `POST` requests: - -#### /api/v3/write_lp endpoint - -{{% product-name %}} adds the `/api/v3/write_lp` endpoint. - -{{}} - -This endpoint accepts the same line protocol syntax as previous versions, -and supports the `?accept_partial=` parameter, which -lets you accept or reject partial writes (default is `true`). - -#### /api/v2/write InfluxDB v2 compatibility endpoint - -Provides backwards compatibility with clients that can write data to InfluxDB OSS v2.x and Cloud 2 (TSM). -{{}} - -#### /write InfluxDB v1 compatibility endpoint - -Provides backwards compatibility for clients that can write data to InfluxDB v1.x -{{}} - -Keep in mind that these compatibility APIs differ from the v1 and v2 APIs in previous versions in the following ways: - -- Tags in a table (measurement) are _immutable_ -- A tag and a field can't have the same name within a table. - -#### Write line protocol +#### Write data in line protocol syntax +{{% product-name %}} accepts data in [line protocol](/influxdb3/core/reference/syntax/line-protocol/) syntax. The following code block is an example of time series data in [line protocol](/influxdb3/core/reference/syntax/line-protocol/) syntax: - `cpu`: the table name. @@ -300,7 +274,7 @@ The following code block is an example of time series data in [line protocol](/i - `val`, `usage_percent`, `status`: the fields. A field set is a comma-separated list of key/value pairs. - timestamp: If you don't specify a timestamp, InfluxData uses the time when data is written. The default precision is a nanosecond epoch. - To specify a different precision, pass the `precision` query parameter. + To specify a different precision, pass the `precision` parameter in your CLI command or API request. ``` cpu,host=Alpha,region=us-west,application=webserver val=1i,usage_percent=20.5,status="OK" @@ -311,37 +285,82 @@ cpu,host=Bravo,region=us-central,application=database val=5i,usage_percent=80.5, cpu,host=Alpha,region=us-west,application=webserver val=6i,usage_percent=25.3,status="Warn" ``` +### Write data using the CLI + +To quickly get started writing data, you can use the `influxdb3` CLI. +For batching and higher-volume write workloads, we recommend using the [HTTP API](#write-data-using-the-http-api). + ##### Example: write data using the influxdb3 CLI If you save the preceding line protocol to a file (for example, `server_data`), then you can use the `influxdb3` CLI to write the data--for example: ```bash -influxdb3 write --database mydb --file server_data +influxdb3 write \ + --database mydb \ + --file server_data \ + --precision ns + --accept-partial \ ``` +### Write data using the HTTP API + +{{% product-name %}} provides three write API endpoints that respond to HTTP `POST` requests. +The `/api/v3/write_lp` endpoint is the recommended endpoint for writing data and +provides additional options for controlling write behavior. + +If you need to write data using InfluxDB v1.x or v2.x tools, use the compatibility API endpoints. + +{{% tabs-wrapper %}} +{{% tabs %}} +[/api/v3/write_lp](#) +[v2 compatibility](#) +[v1 compatibility](#) +{{% /tabs %}} +{{% tab-content %}} + +{{% product-name %}} adds the `/api/v3/write_lp` endpoint. + +{{}} + +This endpoint accepts the same line protocol syntax as previous versions, +and supports the following parameters: + +- `?accept_partial=`: Accept or reject partial writes (default is `true`). +- `?no_sync=`: Control when writes are acknowledged: + - `no_sync=true`: Acknowledge writes before WAL persistence completes. + - `no_sync=false`: Acknowledges writes after WAL persistence completes (default). +- `?precision=`: Specify the precision of the timestamp. The default is nanosecond precision. + +For more information about the parameters, see [Write data](/influxdb3/core/write-data/). + + ##### Example: write data using the /api/v3 HTTP API The following examples show how to write data using `curl` and the `/api/3/write_lp` HTTP endpoint. -To show the difference between accepting and rejecting partial writes, line `2` in the example contains a `string` value for a `float` field (`temp=hi`). +To show the difference between accepting and rejecting partial writes, line `2` in the example contains a `string` value (`"hi"`) for a `float` field (`temp`). ###### Partial write of line protocol occurred -With `accept_partial=true`: +With `accept_partial=true` (default): + +```bash +curl -v "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors&precision=auto" \ + --data-raw 'home,room=Sunroom temp=96 +home,room=Sunroom temp="hi"' +``` + +The response is the following: ``` -* upload completely sent off: 59 bytes < HTTP/1.1 400 Bad Request -< transfer-encoding: chunked -< date: Wed, 15 Jan 2025 19:35:36 GMT -< -* Connection #0 to host localhost left intact +... { "error": "partial write of line protocol occurred", "data": [ { - "original_line": "dquote> home,room=Sunroom temp=hi", + "original_line": "home,room=Sunroom temp=hi", "line_number": 2, - "error_message": "No fields were provided" + "error_message": "invalid column type for column 'temp', expected iox::column_type::field::float, got iox::column_type::field::string" } ] } @@ -356,24 +375,21 @@ With `accept_partial=false`: ```bash curl -v "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors&precision=auto&accept_partial=false" \ - --data-raw "home,room=Sunroom temp=96 -home,room=Sunroom temp=hi" + --data-raw 'home,room=Sunroom temp=96 +home,room=Sunroom temp="hi"' ``` The response is the following: ``` < HTTP/1.1 400 Bad Request -< transfer-encoding: chunked -< date: Wed, 15 Jan 2025 19:28:27 GMT -< -* Connection #0 to host localhost left intact +... { "error": "parsing failed for write_lp endpoint", "data": { "original_line": "home,room=Sunroom temp=hi", "line_number": 2, - "error_message": "No fields were provided" + "error_message": "invalid column type for column 'temp', expected iox::column_type::field::float, got iox::column_type::field::string" } } ``` @@ -382,6 +398,42 @@ InfluxDB rejects all points in the batch. The response is an HTTP error (`400`) status, and the response body contains `parsing failed for write_lp endpoint` and details about the problem line. For more information about the ingest path and data flow, see [Data durability](/influxdb3/version/reference/internals/durability/). + +{{% /tab-content %}} +{{% tab-content %}} + +The `/api/v2/write` InfluxDB v2 compatibility endpoint provides backwards compatibility with clients that can write data to InfluxDB OSS v2.x and Cloud 2 (TSM). + +{{}} + +{{% /tab-content %}} + +{{% tab-content %}} + +The `/write` InfluxDB v1 compatibility endpoint provides backwards compatibility for clients that can write data to InfluxDB v1.x. + +{{}} + + +{{% /tab-content %}} +{{% /tabs-wrapper %}} + +#### Write data using InfluxDB client libraries + +InfluxData provides supported InfluxDB 3 client libraries that you can integrate with your code +to construct data as time series points, and then write them as line protocol to an {{% product-name %}} database. +For more information, see how to [use InfluxDB client libraries to write data](/influxdb3/version/write-data/api-client-libraries/). + +{{% product-name %}} supports the InfluxDB v2.x and v1.x compatibility APIs for +writing data with tools such as InfluxDB v2 and v1 client libraries and Telegraf. + +> [!Note] +> #### Compatibility APIs differ from native APIs +> +> Keep in mind that the compatibility APIs differ from the v1 and v2 APIs in previous versions in the following ways: +> +> - Tags in a table (measurement) are _immutable_ +> - A tag and a field can't have the same name within a table. #### Write responses @@ -403,7 +455,7 @@ Using `no_sync=true` is best when prioritizing high-throughput writes over absol The `no_sync` parameter controls when writes are acknowledged--for example: ```bash -curl "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto&no_sync=true" \ +curl "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors&precision=auto&no_sync=true" \ --data-raw "home,room=Sunroom temp=96" ``` diff --git a/content/shared/v3-enterprise-get-started/_index.md b/content/shared/v3-enterprise-get-started/_index.md index b9a821005..e3ca0c59f 100644 --- a/content/shared/v3-enterprise-get-started/_index.md +++ b/content/shared/v3-enterprise-get-started/_index.md @@ -1,5 +1,3 @@ -## Get started with {{% product-name %}} - InfluxDB is a database built to collect, process, transform, and store event and time series data, and is ideal for use cases that require real-time ingest and fast query response times to build user interfaces, monitoring, and automation solutions. Common use cases include: @@ -37,8 +35,9 @@ This guide covers Enterprise as well as InfluxDB 3 Core, including the following * [Install and startup](#install-and-startup) * [Data Model](#data-model) -* [Write data to the database](#write-data) -* [Query the database](#query-the-database) +* [Tools to use](#tools-to-use) +* [Write data](#write-data) +* [Query data](#query-data) * [Last values cache](#last-values-cache) * [Distinct values cache](#distinct-values-cache) * [Python plugins and the processing engine](#python-plugins-and-the-processing-engine) @@ -222,23 +221,6 @@ For more information about server options, use the CLI help: influxdb3 serve --help ``` -> [!Important] -> #### Stopping the Docker container -> -> Currently, a bug prevents using `Ctrl-c` to stop an InfluxDB 3 container. -> Use the `docker kill` command to stop the container: -> -> 1. Enter the following command to find the container ID: -> -> ```bash -> docker ps -a -> ``` -> 2. Enter the command to stop the container: -> -> ```bash -> docker kill -> ``` - #### Licensing When starting {{% product-name %}} for the first time, it prompts you to enter an email address for verification. You will receive an email with a verification link. @@ -255,49 +237,56 @@ This is the sort order used for all Parquet files that get created. When you cre Tags should hold unique identifying information like `sensor_id`, or `building_id` or `trace_id`. All other data should be kept in fields. You will be able to add fast last N value and distinct value lookups later for any column, whether it is a field or a tag. +### Tools to use + +The following table compares tools that you can use to interact with {{% product-name %}}. +This tutorial covers many of the recommended tools. + +| Tool | Administration | Write | Query | +| :------------------------------------------------------------------------------------------------ | :----------------------: | :----------------------: | :----------------------: | +| [Chronograf](/chronograf/v1/) | - | - | **{{< icon "check" >}}** | +| `influx` CLI | - | - | - | +| [`influxdb3` CLI](#influxdb3-cli){{< req text="\* " color="magenta" >}} | **{{< icon "check" >}}** | **{{< icon "check" >}}** | **{{< icon "check" >}}** | +| `influxctl` CLI | - | - | - | +| [InfluxDB HTTP API](#influxdb-http-api){{< req text="\* " color="magenta" >}} | **{{< icon "check" >}}** | **{{< icon "check" >}}** | **{{< icon "check" >}}** | +| InfluxDB user interface | - | - | - | +| [InfluxDB 3 client libraries](/influxdb3/version/reference/client-libraries/v3/) | - | **{{< icon "check" >}}** | **{{< icon "check" >}}** | +| [InfluxDB v2 client libraries](/influxdb3/version/reference/client-libraries/v2/) | - | **{{< icon "check" >}}** | - | +| [InfluxDB v1 client libraries](/influxdb3/version/reference/client-libraries/v1/) | - | **{{< icon "check" >}}** | **{{< icon "check" >}}** | +| [InfluxDB 3 Processing engine](#python-plugins-and-the-processing-engine){{< req text="\* " color="magenta" >}} | | **{{< icon "check" >}}** | **{{< icon "check" >}}** | +| [Telegraf](/telegraf/v1/) | - | **{{< icon "check" >}}** | - | +| **Third-party tools** | | | | +| Flight SQL clients | - | - | **{{< icon "check" >}}** | +| [Grafana](/influxdb3/version/visualize-data/grafana/) | - | - | **{{< icon "check" >}}** | + +{{< caption >}} +{{< req type="key" text="Covered in this guide" color="magenta" >}} +{{< /caption >}} + ### Write data InfluxDB is a schema-on-write database. You can start writing data and InfluxDB creates the logical database, tables, and their schemas on the fly. After a schema is created, InfluxDB validates future write requests against it before accepting the data. Subsequent requests can add new fields on-the-fly, but can't add new tags. -{{% product-name %}} provides three write API endpoints that respond to HTTP `POST` requests: +> [!Note] +> #### Core is optimized for recent data +> +> {{% product-name %}} is optimized for recent data but accepts writes from any time period. +> The system persists data to Parquet files for historical analysis with [InfluxDB 3 Enterprise](/influxdb3/enterprise/get-started/) or third-party tools. +> For extended historical queries and optimized data organization, consider using [InfluxDB 3 Enterprise](/influxdb3/enterprise/get-started/). -#### /api/v3/write_lp endpoint +#### Write data in line protocol syntax -{{% product-name %}} adds the `/api/v3/write_lp` endpoint. - -{{}} - -This endpoint accepts the same line protocol syntax as previous versions, -and supports the `?accept_partial=` parameter, which -lets you accept or reject partial writes (default is `true`). - -#### /api/v2/write InfluxDB v2 compatibility endpoint - -Provides backwards compatibility with clients that can write data to InfluxDB OSS v2.x and Cloud 2 (TSM). -{{}} - -#### /write InfluxDB v1 compatibility endpoint - -Provides backwards compatibility for clients that can write data to InfluxDB v1.x -{{}} - -Keep in mind that these compatibility APIs differ from the v1 and v2 APIs in previous versions in the following ways: - -- Tags in a table (measurement) are _immutable_ -- A tag and a field can't have the same name within a table. - -#### Write line protocol - -The following code block is an example of time series data in [line protocol](/influxdb3/core/reference/syntax/line-protocol/) syntax: +{{% product-name %}} accepts data in [line protocol](/influxdb3/version/reference/syntax/line-protocol/) syntax. +The following code block is an example of time series data in [line protocol](/influxdb3/version/reference/syntax/line-protocol/) syntax: - `cpu`: the table name. - `host`, `region`, `applications`: the tags. A tag set is an ordered, comma-separated list of key/value pairs where the values are strings. - `val`, `usage_percent`, `status`: the fields. A field set is a comma-separated list of key/value pairs. - timestamp: If you don't specify a timestamp, InfluxData uses the time when data is written. The default precision is a nanosecond epoch. - To specify a different precision, pass the `precision` query parameter. + To specify a different precision, pass the `precision` parameter in your CLI command or API request. ``` cpu,host=Alpha,region=us-west,application=webserver val=1i,usage_percent=20.5,status="OK" @@ -308,37 +297,82 @@ cpu,host=Bravo,region=us-central,application=database val=5i,usage_percent=80.5, cpu,host=Alpha,region=us-west,application=webserver val=6i,usage_percent=25.3,status="Warn" ``` +### Write data using the CLI + +To quickly get started writing data, you can use the `influxdb3` CLI. +For batching and higher-volume write workloads, we recommend using the [HTTP API](#write-data-using-the-http-api). + ##### Example: write data using the influxdb3 CLI If you save the preceding line protocol to a file (for example, `server_data`), then you can use the `influxdb3` CLI to write the data--for example: ```bash -influxdb3 write --database mydb --file server_data +influxdb3 write \ + --database mydb \ + --file server_data \ + --precision ns + --accept-partial \ ``` +### Write data using the HTTP API + +{{% product-name %}} provides three write API endpoints that respond to HTTP `POST` requests. +The `/api/v3/write_lp` endpoint is the recommended endpoint for writing data and +provides additional options for controlling write behavior. + +If you need to write data using InfluxDB v1.x or v2.x tools, use the compatibility API endpoints. + +{{% tabs-wrapper %}} +{{% tabs %}} +[/api/v3/write_lp](#) +[v2 compatibility](#) +[v1 compatibility](#) +{{% /tabs %}} +{{% tab-content %}} + +{{% product-name %}} adds the `/api/v3/write_lp` endpoint. + +{{}} + +This endpoint accepts the same line protocol syntax as previous versions, +and supports the following parameters: + +- `?accept_partial=`: Accept or reject partial writes (default is `true`). +- `?no_sync=`: Control when writes are acknowledged: + - `no_sync=true`: Acknowledge writes before WAL persistence completes. + - `no_sync=false`: Acknowledges writes after WAL persistence completes (default). +- `?precision=`: Specify the precision of the timestamp. The default is nanosecond precision. + +For more information about the parameters, see [Write data](/influxdb3/core/write-data/). + + ##### Example: write data using the /api/v3 HTTP API The following examples show how to write data using `curl` and the `/api/3/write_lp` HTTP endpoint. -To show the difference between accepting and rejecting partial writes, line `2` in the example contains a `string` value for a `float` field (`temp=hi`). +To show the difference between accepting and rejecting partial writes, line `2` in the example contains a `string` value (`"hi"`) for a `float` field (`temp`). ###### Partial write of line protocol occurred -With `accept_partial=true`: +With `accept_partial=true` (default): + +```bash +curl -v "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors&precision=auto" \ + --data-raw 'home,room=Sunroom temp=96 +home,room=Sunroom temp="hi"' +``` + +The response is the following: ``` -* upload completely sent off: 59 bytes < HTTP/1.1 400 Bad Request -< transfer-encoding: chunked -< date: Wed, 15 Jan 2025 19:35:36 GMT -< -* Connection #0 to host localhost left intact +... { "error": "partial write of line protocol occurred", "data": [ { - "original_line": "dquote> home,room=Sunroom temp=hi", + "original_line": "home,room=Sunroom temp=hi", "line_number": 2, - "error_message": "No fields were provided" + "error_message": "invalid column type for column 'temp', expected iox::column_type::field::float, got iox::column_type::field::string" } ] } @@ -353,24 +387,21 @@ With `accept_partial=false`: ```bash curl -v "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors&precision=auto&accept_partial=false" \ - --data-raw "home,room=Sunroom temp=96 -home,room=Sunroom temp=hi" + --data-raw 'home,room=Sunroom temp=96 +home,room=Sunroom temp="hi"' ``` The response is the following: ``` < HTTP/1.1 400 Bad Request -< transfer-encoding: chunked -< date: Wed, 15 Jan 2025 19:28:27 GMT -< -* Connection #0 to host localhost left intact +... { "error": "parsing failed for write_lp endpoint", "data": { "original_line": "home,room=Sunroom temp=hi", "line_number": 2, - "error_message": "No fields were provided" + "error_message": "invalid column type for column 'temp', expected iox::column_type::field::float, got iox::column_type::field::string" } } ``` @@ -378,17 +409,43 @@ The response is the following: InfluxDB rejects all points in the batch. The response is an HTTP error (`400`) status, and the response body contains `parsing failed for write_lp endpoint` and details about the problem line. -### Data flow +For more information about the ingest path and data flow, see [Data durability](/influxdb3/version/reference/internals/durability/). + +{{% /tab-content %}} +{{% tab-content %}} + +The `/api/v2/write` InfluxDB v2 compatibility endpoint provides backwards compatibility with clients that can write data to InfluxDB OSS v2.x and Cloud 2 (TSM). -The figure below shows how written data flows through the database. +{{}} + +{{% /tab-content %}} -{{< img-hd src="/img/influxdb/influxdb-3-write-path.png" alt="Write Path for InfluxDB 3 Core & Enterprise" />}} +{{% tab-content %}} + +The `/write` InfluxDB v1 compatibility endpoint provides backwards compatibility for clients that can write data to InfluxDB v1.x. -1. **Incoming writes**: The system validates incoming data and stores it in the write buffer (in memory). If [`no_sync=true`](#no-sync-write-option), the server sends a response to acknowledge the write. -2. **WAL flush**: Every second (default), the system flushes the write buffer to the Write-Ahead Log (WAL) for persistence in the Object store. If [`no_sync=false`](#no-sync-write-option) (default), the server sends a response to acknowledge the write. -3. **Query availability**: After WAL persistence completes, data moves to the queryable buffer where it becomes available for queries. By default, the server keeps up to 900 WAL files (15 minutes of data) buffered. -4. **Long-term storage in Parquet**: Every ten minutes (default), the system persists the oldest data from the queryable buffer to the Object store in Parquet format. InfluxDB keeps the remaining data (the most recent 5 minutes) in memory. -5. **In-memory cache**: InfluxDB puts Parquet files into an in-memory cache so that queries against the most recently persisted data don't have to go to object storage. +{{}} + + +{{% /tab-content %}} +{{% /tabs-wrapper %}} + +#### Write data using InfluxDB client libraries + +InfluxData provides supported InfluxDB 3 client libraries that you can integrate with your code +to construct data as time series points, and then write them as line protocol to an {{% product-name %}} database. +For more information, see how to [use InfluxDB client libraries to write data](/influxdb3/version/write-data/api-client-libraries/). + +{{% product-name %}} supports the InfluxDB v2.x and v1.x compatibility APIs for +writing data with tools such as InfluxDB v2 and v1 client libraries and Telegraf. + +> [!Note] +> #### Compatibility APIs differ from native APIs +> +> Keep in mind that the compatibility APIs differ from the v1 and v2 APIs in previous versions in the following ways: +> +> - Tags in a table (measurement) are _immutable_ +> - A tag and a field can't have the same name within a table. #### Write responses @@ -410,7 +467,7 @@ Using `no_sync=true` is best when prioritizing high-throughput writes over absol The `no_sync` parameter controls when writes are acknowledged--for example: ```bash -curl "http://localhost:8181/api/v3/write_lp?db=sensors&precision=auto&no_sync=true" \ +curl "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors&precision=auto&no_sync=true" \ --data-raw "home,room=Sunroom temp=96" ```