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
pull/4927/head
Jason Stirnaman 2023-05-08 08:46:59 -05:00 committed by GitHub
parent 5a3dce0f26
commit 3999b37e40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 37 additions and 37 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 "&lt;(domain|port|database-name|token)&gt;" >}}
{{< code-callout "cluster-id\.influxdb\.io|443|example-database|example-token" >}}
```sh
# Syntax
datafusion+flightsql://<domain>:<port>?iox-namespace-name=<database-name>&token=<token>
datafusion+flightsql://<domain>:<port>?database=<database-name>&token=<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 >}}

View File

@ -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**.

View File

@ -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")

View File

@ -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')

View File

@ -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

View File

@ -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 "&lt;(domain|port|bucket-name|token)&gt;" >}}
{{< code-callout "&lt;(domain|port|database|token)&gt;" >}}
{{< code-callout "us-east-1-1\.aws\.cloud2\.influxdata\.com|443|example-bucket|example-token" >}}
```sh
# Syntax
datafusion+flightsql://<domain>:<port>?bucket-name=<bucket-name>&token=<token>
datafusion+flightsql://<domain>:<port>?database=<database>&token=<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 >}}

View File

@ -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**.

View File

@ -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")

View File

@ -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')