From 3999b37e4083bd49cf303964310bd564f367caca Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Mon, 8 May 2023 08:46:59 -0500 Subject: [PATCH] Fix cleanup api (#4922) * fix(serverless): remove 'delete' mentions from '/write'. * fix(serverless): replace bucket-name metadata key with database * fix(dedicated): update API and client library links * fix(dedicated): replace iox-namespace-name metadata key with database --- api-docs/cloud-serverless/ref.yml | 6 +++--- content/influxdb/cloud-dedicated/get-started/query.md | 2 +- content/influxdb/cloud-dedicated/get-started/write.md | 4 ++-- .../query-data/execute-queries/flight-sql/python.md | 8 ++++---- .../query-data/execute-queries/flight-sql/superset.md | 6 +++--- .../cloud-dedicated/query-data/tools/grafana.md | 2 +- .../cloud-dedicated/query-data/tools/pandas.md | 6 +++--- .../cloud-dedicated/query-data/tools/pyarrow.md | 4 ++-- .../query-data/execute-queries/flight-sql/python.md | 8 ++++---- .../query-data/execute-queries/flight-sql/superset.md | 8 ++++---- .../cloud-serverless/query-data/tools/grafana.md | 10 +++++----- .../cloud-serverless/query-data/tools/pandas.md | 6 +++--- .../cloud-serverless/query-data/tools/pyarrow.md | 4 ++-- 13 files changed, 37 insertions(+), 37 deletions(-) diff --git a/api-docs/cloud-serverless/ref.yml b/api-docs/cloud-serverless/ref.yml index e3a220509..313263d83 100644 --- a/api-docs/cloud-serverless/ref.yml +++ b/api-docs/cloud-serverless/ref.yml @@ -15292,12 +15292,12 @@ paths: 1. Validates the request and queues the write. 2. If queued, responds with _success_ (HTTP `2xx` status code); _error_ otherwise. - 3. Handles the delete asynchronously and reaches eventual consistency. + 3. Handles the write asynchronously and reaches eventual consistency. - To ensure that InfluxDB Cloud handles writes and deletes in the order you request them, + To ensure that InfluxDB Cloud handles writes in the order you request them, wait for a success response (HTTP `2xx` status code) before you send the next request. - Because writes and deletes are asynchronous, your change might not yet be readable + Because writes are asynchronous, your change might not yet be readable when you receive the response. #### InfluxDB OSS diff --git a/content/influxdb/cloud-dedicated/get-started/query.md b/content/influxdb/cloud-dedicated/get-started/query.md index 56e5f68a2..e46c8a8cd 100644 --- a/content/influxdb/cloud-dedicated/get-started/query.md +++ b/content/influxdb/cloud-dedicated/get-started/query.md @@ -413,7 +413,7 @@ func dbQuery(ctx context.Context) error { } ctx = metadata.AppendToOutgoingContext(ctx, "authorization", "Bearer "+token) - ctx = metadata.AppendToOutgoingContext(ctx, "iox-namespace-name", database) + ctx = metadata.AppendToOutgoingContext(ctx, "database", database) // Execute query query := `SELECT diff --git a/content/influxdb/cloud-dedicated/get-started/write.md b/content/influxdb/cloud-dedicated/get-started/write.md index a225c845b..57688dadd 100644 --- a/content/influxdb/cloud-dedicated/get-started/write.md +++ b/content/influxdb/cloud-dedicated/get-started/write.md @@ -22,10 +22,10 @@ related: InfluxDB provides many different options for ingesting or writing data, including the following: -- [InfluxDB HTTP API (v1 and v2)](/influxdb/cloud-serverless/reference/api/) +- [InfluxDB HTTP API (v1 and v2)](/influxdb/cloud-dedicated/primers/api/) - [`influx` CLI (v1 and v2)](/influxdb/cloud-dedicated/reference/cli/influx/) - [Telegraf](/{{< latest "telegraf" >}}/) -- [InfluxDB client libraries](/influxdb/cloud-dedicated/api-guide/client-libraries/) +- [InfluxDB client libraries](/influxdb/cloud-dedicated/reference/client-libraries/) - etc. This tutorial walks you through the fundamental of using **line protocol** to write diff --git a/content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/python.md b/content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/python.md index aac69db72..5b5b18ece 100644 --- a/content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/python.md +++ b/content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/python.md @@ -20,7 +20,7 @@ list_code_example: | client = FlightSQLClient(host='cluster-id.influxdb.io', token='INFLUX_READ_WRITE_TOKEN', - metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + metadata={'database': 'INFLUX_DATABASE'}, features={'metadata-reflection': 'true'}) info = client.execute("SELECT * FROM home") @@ -207,7 +207,7 @@ and the _DB API 2_ interface to instantiate a Flight SQL client configured for a # Instantiate a FlightSQLClient configured for your database client = FlightSQLClient(host='cluster-id.influxdb.io', token='INFLUX_READ_WRITE_TOKEN', - metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + metadata={'database': 'INFLUX_DATABASE'}, features={'metadata-reflection': 'true'}) ``` @@ -235,7 +235,7 @@ from flightsql import FlightSQLClient client = FlightSQLClient(host='cluster-id.influxdb.io', token='INFLUX_READ_WRITE_TOKEN', - metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + metadata={'database': 'INFLUX_DATABASE'}, features={'metadata-reflection': 'true'}) # Execute the query @@ -271,7 +271,7 @@ from flightsql import FlightSQLClient # Instantiate a FlightSQLClient configured for a database client = FlightSQLClient(host='cluster-id.influxdb.io', token='INFLUX_READ_WRITE_TOKEN', - metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + metadata={'database': 'INFLUX_DATABASE'}, features={'metadata-reflection': 'true'}) # Execute the query to retrieve FlightInfo diff --git a/content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/superset.md b/content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/superset.md index 1e59f0bd6..65e352d2d 100644 --- a/content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/superset.md +++ b/content/influxdb/cloud-dedicated/query-data/execute-queries/flight-sql/superset.md @@ -214,17 +214,17 @@ With Superset running, you're ready to [log in](#log-in-to-superset) and set up **Query parameters** - - **`?iox-namespace-name`**: URL-encoded InfluxDB [database name](/influxdb/cloud-dedicated/admin/databases/list/) + - **`?database`**: URL-encoded InfluxDB [database name](/influxdb/cloud-dedicated/admin/databases/list/) - **`?token`**: InfluxDB [API token](/influxdb/cloud-dedicated/get-started/setup/) with `READ` access to the specified database {{< code-callout "<(domain|port|database-name|token)>" >}} {{< code-callout "cluster-id\.influxdb\.io|443|example-database|example-token" >}} ```sh # Syntax -datafusion+flightsql://:?iox-namespace-name=&token= +datafusion+flightsql://:?database=&token= # Example -datafusion+flightsql://cluster-id.influxdb.io:443?iox-namespace-name=example-database&token=example-token +datafusion+flightsql://cluster-id.influxdb.io:443?database=example-database&token=example-token ``` {{< /code-callout >}} {{< /code-callout >}} diff --git a/content/influxdb/cloud-dedicated/query-data/tools/grafana.md b/content/influxdb/cloud-dedicated/query-data/tools/grafana.md index 1ba031245..e40b35f30 100644 --- a/content/influxdb/cloud-dedicated/query-data/tools/grafana.md +++ b/content/influxdb/cloud-dedicated/query-data/tools/grafana.md @@ -139,7 +139,7 @@ query InfluxDB Cloud Dedicated: InfluxDB Cloud Serverless requires your **database name**: - - **Key**: `iox-namespace-name` + - **Key**: `database` - **Value**: Database name 7. Click **Save & test**. diff --git a/content/influxdb/cloud-dedicated/query-data/tools/pandas.md b/content/influxdb/cloud-dedicated/query-data/tools/pandas.md index 3fd544a74..a7109b91a 100644 --- a/content/influxdb/cloud-dedicated/query-data/tools/pandas.md +++ b/content/influxdb/cloud-dedicated/query-data/tools/pandas.md @@ -78,7 +78,7 @@ The following steps use Python, `flightsql-dbapi`, and `pyarrow` to query Influx client = FlightSQLClient(host='cluster-id.influxdb.io', token='INFLUX_READ_WRITE_TOKEN', - metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + metadata={'database': 'INFLUX_DATABASE'}, features={'metadata-reflection': 'true'}) info = client.execute("SELECT * FROM home") @@ -127,7 +127,7 @@ import pandas client = FlightSQLClient(host='cluster-id.influxdb.io', token='INFLUX_READ_WRITE_TOKEN', - metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + metadata={'database': 'INFLUX_DATABASE'}, features={'metadata-reflection': 'true'}) info = client.execute("SELECT * FROM home") @@ -155,7 +155,7 @@ import pandas client = FlightSQLClient(host='cluster-id.influxdb.io', token='INFLUX_READ_WRITE_TOKEN', - metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + metadata={'database': 'INFLUX_DATABASE'}, features={'metadata-reflection': 'true'}) info = client.execute("SELECT * FROM home") diff --git a/content/influxdb/cloud-dedicated/query-data/tools/pyarrow.md b/content/influxdb/cloud-dedicated/query-data/tools/pyarrow.md index f227c2fbb..bc779fa06 100644 --- a/content/influxdb/cloud-dedicated/query-data/tools/pyarrow.md +++ b/content/influxdb/cloud-dedicated/query-data/tools/pyarrow.md @@ -60,7 +60,7 @@ The following example shows how to use Python with `flightsql-dbapi` and `pyarro # Instantiate a FlightSQLClient configured for a database client = FlightSQLClient(host='cluster-id.influxdb.io', token='INFLUX_READ_WRITE_TOKEN', - metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + metadata={'database': 'INFLUX_DATABASE'}, features={'metadata-reflection': 'true'}) # Execute the query to retrieve FlightInfo @@ -107,7 +107,7 @@ from flightsql import FlightSQLClient client = FlightSQLClient(host='cluster-id.influxdb.io', token='INFLUX_READ_WRITE_TOKEN', - metadata={'iox-namespace-name': 'INFLUX_DATABASE'}, + metadata={'database': 'INFLUX_DATABASE'}, features={'metadata-reflection': 'true'}) info = client.execute('SELECT * FROM home') diff --git a/content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/python.md b/content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/python.md index a27a0863f..f062c2483 100644 --- a/content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/python.md +++ b/content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/python.md @@ -20,7 +20,7 @@ list_code_example: | client = FlightSQLClient(host='cloud2.influxdata.com', token='INFLUX_READ_WRITE_TOKEN', - metadata={'bucket-name': 'BUCKET_NAME'}, + metadata={'database': 'BUCKET_NAME'}, features={'metadata-reflection': 'true'}) info = client.execute("SELECT * FROM home") @@ -204,7 +204,7 @@ and the _DB API 2_ interface to instantiate a Flight SQL client configured for a # Instantiate a FlightSQLClient configured for your bucket client = FlightSQLClient(host='cloud2.influxdata.com', token='INFLUX_READ_WRITE_TOKEN', - metadata={'bucket-name': 'BUCKET_NAME'}, + metadata={'database': 'BUCKET_NAME'}, features={'metadata-reflection': 'true'}) ``` @@ -232,7 +232,7 @@ from flightsql import FlightSQLClient client = FlightSQLClient(host='cloud2.influxdata.com', token='INFLUX_READ_WRITE_TOKEN', - metadata={'bucket-name': 'BUCKET_NAME'}, + metadata={'database': 'BUCKET_NAME'}, features={'metadata-reflection': 'true'}) # Execute the query @@ -273,7 +273,7 @@ from flightsql import FlightSQLClient # Instantiate a FlightSQLClient configured for a bucket client = FlightSQLClient(host='cloud2.influxdata.com', token='INFLUX_READ_WRITE_TOKEN', - metadata={'bucket-name': 'BUCKET_NAME'}, + metadata={'database': 'BUCKET_NAME'}, features={'metadata-reflection': 'true'}) # Execute the query to retrieve FlightInfo diff --git a/content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/superset.md b/content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/superset.md index fc33aecea..d72dcb610 100644 --- a/content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/superset.md +++ b/content/influxdb/cloud-serverless/query-data/execute-queries/flight-sql/superset.md @@ -214,17 +214,17 @@ With Superset running, you're ready to [log in](#log-in-to-superset) and set up **Query parameters** - - **`?bucket-name`**: URL-encoded InfluxDB [bucket name](influxdb/cloud-serverless/admin/buckets/view-buckets/) + - **`?database`**: URL-encoded InfluxDB [bucket name](influxdb/cloud-serverless/admin/buckets/view-buckets/) - **`?token`**: InfluxDB [API token](/influxdb/cloud-serverless/get-started/setup/) with `READ` access to the specified bucket - {{< code-callout "<(domain|port|bucket-name|token)>" >}} + {{< code-callout "<(domain|port|database|token)>" >}} {{< code-callout "us-east-1-1\.aws\.cloud2\.influxdata\.com|443|example-bucket|example-token" >}} ```sh # Syntax -datafusion+flightsql://:?bucket-name=&token= +datafusion+flightsql://:?database=&token= # Example -datafusion+flightsql://us-east-1-1.aws.cloud2.influxdata.com:443?bucket-name=example-bucket&token=example-token +datafusion+flightsql://us-east-1-1.aws.cloud2.influxdata.com:443?database=example-bucket&token=example-token ``` {{< /code-callout >}} {{< /code-callout >}} diff --git a/content/influxdb/cloud-serverless/query-data/tools/grafana.md b/content/influxdb/cloud-serverless/query-data/tools/grafana.md index 0996cfa21..3a0a17f60 100644 --- a/content/influxdb/cloud-serverless/query-data/tools/grafana.md +++ b/content/influxdb/cloud-serverless/query-data/tools/grafana.md @@ -32,6 +32,8 @@ to query InfluxDB with the Flight SQL protocol. - [Install Grafana or login to Grafana Cloud](#install-grafana-or-login-to-grafana-cloud) - [Install the FlightSQL plugin](#install-the-flightsql-plugin) + - [Use grafana-cli](#use-grafana-cli) + - [Use the Grafana UI](#use-the-grafana-ui) - [Create and configure a FlightSQL datasource](#create-and-configure-a-flightsql-datasource) - [Query InfluxDB with Grafana](#query-influxdb-with-grafana) - [Build visualizations with Grafana](#build-visualizations-with-grafana) @@ -118,12 +120,10 @@ Grafana Cloud instance. - **Require TLS/SSL**: Enable this toggle. 6. Add connection **MetaData**. - Provide optional key-value pairs to send to your Flight SQL client. - - InfluxDB Cloud Serverless requires your **bucket name** or **bucket-id**: + InfluxDB Cloud Serverless requires _one_ of the following key-value pairs: - - **Key**: `bucket-name` or `bucket-id` - - **Value**: Bucket name or bucket ID + - **Key**: `database`, **Value**: Bucket name + - **Key**: `bucket-id`, **Value**: Bucket ID 7. Click **Save & test**. diff --git a/content/influxdb/cloud-serverless/query-data/tools/pandas.md b/content/influxdb/cloud-serverless/query-data/tools/pandas.md index a4b781f45..e8f2508c8 100644 --- a/content/influxdb/cloud-serverless/query-data/tools/pandas.md +++ b/content/influxdb/cloud-serverless/query-data/tools/pandas.md @@ -78,7 +78,7 @@ The following steps use Python, `flightsql-dbapi`, and `pyarrow` to query Influx client = FlightSQLClient(host='cloud2.influxdata.com', token='INFLUX_READ_WRITE_TOKEN', - metadata={'bucket-name': 'INFLUX_BUCKET'}, + metadata={'database': 'INFLUX_BUCKET'}, features={'metadata-reflection': 'true'}) info = client.execute("SELECT * FROM home") @@ -127,7 +127,7 @@ import pandas client = FlightSQLClient(host='cloud2.influxdata.com', token='INFLUX_READ_WRITE_TOKEN', - metadata={'bucket-name': 'INFLUX_BUCKET'}, + metadata={'database': 'INFLUX_BUCKET'}, features={'metadata-reflection': 'true'}) info = client.execute("SELECT * FROM home") @@ -155,7 +155,7 @@ import pandas client = FlightSQLClient(host='cloud2.influxdata.com', token='INFLUX_READ_WRITE_TOKEN', - metadata={'bucket-name': 'INFLUX_BUCKET'}, + metadata={'database': 'INFLUX_BUCKET'}, features={'metadata-reflection': 'true'}) info = client.execute("SELECT * FROM home") diff --git a/content/influxdb/cloud-serverless/query-data/tools/pyarrow.md b/content/influxdb/cloud-serverless/query-data/tools/pyarrow.md index 08818a6a1..5e0069f31 100644 --- a/content/influxdb/cloud-serverless/query-data/tools/pyarrow.md +++ b/content/influxdb/cloud-serverless/query-data/tools/pyarrow.md @@ -61,7 +61,7 @@ The following example shows how to use Python with `flightsql-dbapi` and `pyarro # Instantiate a FlightSQLClient configured for a bucket client = FlightSQLClient(host='cloud2.influxdata.com', token='INFLUX_READ_WRITE_TOKEN', - metadata={'bucket-name': 'BUCKET_NAME'}, + metadata={'database': 'BUCKET_NAME'}, features={'metadata-reflection': 'true'}) # Execute the query to retrieve FlightInfo @@ -108,7 +108,7 @@ from flightsql import FlightSQLClient client = FlightSQLClient(host='cloud2.influxdata.com', token='INFLUX_READ_WRITE_TOKEN', - metadata={'bucket-name': 'BUCKET_NAME'}, + metadata={'database': 'BUCKET_NAME'}, features={'metadata-reflection': 'true'}) info = client.execute('SELECT * FROM home')