Merge branch 'master' into docs/5837-Enterprise-updates

pull/5844/head
Jason Stirnaman 2025-02-21 09:00:36 -06:00 committed by GitHub
commit 2fee2eb1ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 509 additions and 59 deletions

View File

@ -150,7 +150,6 @@ The following precisions are available:
##### Query a non-default retention policy
<!--test:setup
```sh
service influxdb start && \
influx setup \
@ -160,7 +159,6 @@ influx setup \
--bucket BUCKET_NAME \
--force || true
```
-->
```sh

View File

@ -123,7 +123,6 @@ The following precisions are available:
##### Write data using basic authentication
<!--test:setup
```sh
service influxdb start && \
influx setup \
@ -133,7 +132,6 @@ influx setup \
--bucket BUCKET_NAME \
--force || true
```
-->
{{% oss-only %}}

View File

@ -66,7 +66,7 @@ To use the SHA checksum to verify the downloaded file, do the following:
the **SHA256:** checksum value.
2. Compute the SHA checksum of the downloaded file and compare it to the
published checksum--for example, enter the following command in your terminal.
published checksum--for example, enter the following command in your terminal:
<!--test:actual
```bash
@ -77,11 +77,11 @@ To use the SHA checksum to verify the downloaded file, do the following:
<!--pytest-codeblocks:cont-->
{{% code-placeholders "9cb54d3940c37a8c2a908458543e629412505cc71db55094147fd39088b99c6c" %}}
{{% code-placeholders "8d7872013cad3524fb728ca8483d0adc30125ad1af262ab826dcf5d1801159cf" %}}
```bash
# Use 2 spaces to separate the checksum from the filename
echo "9cb54d3940c37a8c2a908458543e629412505cc71db55094147fd39088b99c6c influxdb2-{{< latest-patch >}}_linux_amd64.tar.gz" \
echo "8d7872013cad3524fb728ca8483d0adc30125ad1af262ab826dcf5d1801159cf influxdb2-{{< latest-patch >}}_linux_amd64.tar.gz" \
| sha256sum --check -
```
@ -89,7 +89,7 @@ echo "9cb54d3940c37a8c2a908458543e629412505cc71db55094147fd39088b99c6c influxdb
Replace the following:
- {{% code-placeholder-key %}}`9cb54d3940c37a8c2a908458543e629412505cc71db55094147fd39088b99c6c`{{% /code-placeholder-key %}}:
- {{% code-placeholder-key %}}`8d7872013cad3524fb728ca8483d0adc30125ad1af262ab826dcf5d1801159cf`{{% /code-placeholder-key %}}:
the **SHA256:** checksum value that you copied from the downloads page
If the checksums match, the output is the following; otherwise, an error message.
@ -162,12 +162,10 @@ gpg: key 7C3D57159FC2F927: public key "InfluxData Package Signing Key <support@i
following in your terminal:
<!--test:setup
```sh
curl --silent --location --output-dir ~/Downloads -O \
"https://download.influxdata.com/influxdb/releases/influxdb2-{{< latest-patch >}}_darwin_amd64.tar.gz" \
```
-->
```sh
@ -252,11 +250,11 @@ brew install influxdb
2. {{< req text="Recommended:" color="magenta" >}}: Verify the integrity of the download--for example, enter the
following command in your terminal:
{{% code-placeholders "964e1de641a43a0e1743aa5ead243e935a05631ba0bc570fb8bff486542173c1" %}}
{{% code-placeholders "224926fd77736a364cf28128f18927dda00385f0b6872a108477246a1252ae1b" %}}
```sh
# Use 2 spaces to separate the checksum from the filename
echo "964e1de641a43a0e1743aa5ead243e935a05631ba0bc570fb8bff486542173c1 influxdb2-{{< latest-patch >}}_darwin_amd64.tar.gz" \
echo "224926fd77736a364cf28128f18927dda00385f0b6872a108477246a1252ae1b influxdb2-{{< latest-patch >}}_darwin_amd64.tar.gz" \
| shasum --algorithm 256 --quiet --check -
```
@ -264,7 +262,7 @@ echo "964e1de641a43a0e1743aa5ead243e935a05631ba0bc570fb8bff486542173c1 influxdb
Replace the following:
- {{% code-placeholder-key %}}`964e1de641a43a0e1743aa5ead243e935a05631ba0bc570fb8bff486542173c1`{{% /code-placeholder-key %}}: the SHA checksum from the [downloads page](https://www.influxdata.com/downloads/#telegraf)
- {{% code-placeholder-key %}}`224926fd77736a364cf28128f18927dda00385f0b6872a108477246a1252ae1b`{{% /code-placeholder-key %}}: the SHA checksum from the [downloads page](https://www.influxdata.com/downloads/#telegraf)
3. Unpackage the InfluxDB binary.

View File

@ -35,7 +35,6 @@ Use the [`influx server-config` command](/influxdb/v2/reference/cli/influx/serve
to retrieve your runtime server configuration.
<!--test:setup
```sh
service influxdb start && \
influx setup \
@ -45,7 +44,6 @@ influx setup \
--bucket BUCKET_NAME \
--force || true
```
-->
```sh
@ -2748,7 +2746,7 @@ storage-wal-max-concurrent-writes = 0
### storage-wal-max-write-delay
Maximum amount of time a write request to the WAL directory will wait when the
the [maximum number of concurrent active writes to the WAL directory](#storage-wal-max-concurrent-writes)
[maximum number of concurrent active writes to the WAL directory](#storage-wal-max-concurrent-writes)
has been met. Set to `0` to disable the timeout.
**Default:** `10m`

View File

@ -11,5 +11,6 @@ source: /shared/influxdb3-admin/_index.md
---
<!--
The content of this file is located at content/shared/influxdb3-admin/_index.md
The content of this file is located at
// SOURCE content/shared/influxdb3-admin/_index.md
-->

View File

@ -0,0 +1,23 @@
---
title: Query system data
description: |
Query system tables to see data related
to the server, queries, and tables in an {{% product-name %}} instance.
Use the HTTP SQL query API to retrieve information about your database server
and table schemas.
menu:
influxdb3_core:
name: Query system data
parent: Administer InfluxDB
weight: 3
influxdb3/core/tags: [query, api, system information, schemas]
related:
- /influxdb3/core/query-data/sql/
- /influxdb3/core/query-data/execute-queries/
source: /shared/influxdb3-admin/query-system-data/_index.md
---
<!--
The content of this page is at
// SOURCE content/shared/influxdb3-admin/query-system-data/_index.md
-->

View File

@ -9,9 +9,12 @@ menu:
influxdb3_core:
name: Get started
weight: 3
related:
- /influxdb3/core/admin/query-system-data/
source: /shared/v3-core-get-started/_index.md
---
<!--
The content of this page is at /shared/v3-core-get-started/_index.md
The content of this page is at
// SOURCE content/shared/v3-core-get-started/_index.md
-->

View File

@ -44,7 +44,8 @@ Use the InfluxDB 3 quick install script to install {{< product-name >}} on
{{< product-name >}} package on your local machine:
```bash
curl -O https://www.influxdata.com/d/install_influxdb3.sh && sh install_influxdb3.sh
curl -O https://www.influxdata.com/d/install_influxdb3.sh \
&& sh install_influxdb3.sh
```
2. Verify that installation completed successfully:
@ -93,18 +94,10 @@ source ~/.zshrc
[sha256](https://dl.influxdata.com/influxdb/snapshots/influxdb3-core_x86_64-unknown-linux-gnu.tar.gz.sha256)
- [InfluxDB 3 Core • Linux (x86) • MUSL](https://download.influxdata.com/influxdb/snapshots/influxdb3-core_x86_64-unknown-linux-musl.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/snapshots/influxdb3-core_x86_64-unknown-linux-musl.tar.gz.sha256)
- [InfluxDB 3 Core • Linux (ARM) • GNU](https://download.influxdata.com/influxdb/snapshots/influxdb3-core_aarch64-unknown-linux-gnu.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/snapshots/influxdb3-core_aarch64-unknown-linux-gnu.tar.gz.sha256)
- [InfluxDB 3 Core • Linux (ARM) • MUSL](https://download.influxdata.com/influxdb/snapshots/influxdb3-core_aarch64-unknown-linux-musl.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/snapshots/influxdb3-core_aarch64-unknown-linux-musl.tar.gz)
<!--------------------------------- END LINUX --------------------------------->
{{% /tab-content %}}
@ -139,9 +132,28 @@ source ~/.zshrc
Use the `influxdb3-core` Docker image to deploy {{< product-name >}} in a
Docker container.
The image is available for x86_64 (AMD64) and ARM64 architectures.
```bash
docker pull quay.io/influxdb/influxdb3-core:latest
```
Docker automatically pulls the appropriate image for your system architecture.
You can also explicitly specify the architecture by using platform-specific tags:
```bash
# For x86_64/AMD64
docker pull \
--platform linux/amd64 \
quay.io/influxdb/influxdb3-core:latest
```
```bash
# For ARM64
docker pull \
--platform linux/arm64 \
quay.io/influxdb/influxdb3-core:latest
```
{{< page-nav next="/influxdb3/core/get-started/" nextText="Get started with InfluxDB 3 Core" >}}

View File

@ -4,7 +4,7 @@ description: Use the Python processing engine to trigger and execute custom code
menu:
influxdb3_core:
name: Processing Engine and Python Plugins
weight: 2
weight: 4
influxdb3/core/tags: []
source: /shared/v3-core-plugins/_index.md
---

View File

@ -0,0 +1,29 @@
---
title: Use the InfluxDB v3 HTTP query API
seotitle: Use SQL or InfluxQL and InfluxDB v3 HTTP query API
list_title: Use the v3 query API
description: >
Use SQL or InfluxQL and the InfluxDB v3 HTTP query API to query data in {{< product-name >}}.
weight: 301
menu:
influxdb3_core:
parent: Execute queries
name: Use the v3 query API
influxdb3/core/tags: [query, influxql, sql, python]
metadata: [InfluxQL, SQL]
related:
- /influxdb3/core/api-compatibility/v1/
list_code_example: |
```sh
curl --get http://{{< influxdb/host >}}/api/v3/query_sql \
--header "Authorization: Token DATABASE_TOKEN" \
--data-urlencode "db=DATABASE_NAME" \
--data-urlencode "q=SELECT * FROM home"
```
source: /shared/influxdb3-query-guides/execute-queries/influxdb3-api.md
---
<!--
The content for this page is at
// SOURCE content/shared/influxdb3-query-guides/execute-queries/influxdb3-api.md
-->

View File

@ -0,0 +1,23 @@
---
title: Query system data
description: |
Query system tables to see data related
to the server, queries, and tables in an {{% product-name %}} instance.
Use the HTTP SQL query API to retrieve information about your database server
and table schemas.
menu:
influxdb3_enterprise:
name: Query system data
parent: Administer InfluxDB
weight: 3
influxdb3/enterprise/tags: [query, api, system information, schemas]
related:
- /influxdb3/enterprise/query-data/sql/
- /influxdb3/enterprise/query-data/execute-queries/
source: /shared/influxdb3-admin/query-system-data/_index.md
---
<!--
The content of this page is at
// SOURCE content/shared/influxdb3-admin/query-system-data/_index.md
-->

View File

@ -9,9 +9,12 @@ menu:
influxdb3_enterprise:
name: Get started
weight: 3
related:
- /influxdb3/enterprise/admin/query-system-data/
source: /shared/v3-enterprise-get-started/_index.md
---
<!--
The content of this page is at /shared/v3-enterprise-get-started/_index.md
The content of this page is at
// SOURCE content/shared/v3-core-get-started/_index.md
-->

View File

@ -44,7 +44,8 @@ Use the InfluxDB 3 quick install script to install {{< product-name >}} on
{{< product-name >}} package on your local machine:
```bash
curl -O https://www.influxdata.com/d/install_influxdb3.sh && sh install_influxdb3.sh enterprise
curl -O https://www.influxdata.com/d/install_influxdb3.sh \
&& sh install_influxdb3.sh enterprise
```
2. Verify that installation completed successfully:
@ -93,18 +94,10 @@ source ~/.zshrc
[sha256](https://dl.influxdata.com/influxdb/snapshots/influxdb3-enterprise_x86_64-unknown-linux-gnu.tar.gz.sha256)
- [InfluxDB 3 Enterprise • Linux (x86) • MUSL](https://download.influxdata.com/influxdb/snapshots/influxdb3-enterprise_x86_64-unknown-linux-musl.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/snapshots/influxdb3-enterprise_x86_64-unknown-linux-musl.tar.gz.sha256)
- [InfluxDB 3 Enterprise • Linux (ARM) • GNU](https://download.influxdata.com/influxdb/snapshots/influxdb3-enterprise_aarch64-unknown-linux-gnu.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/snapshots/influxdb3-enterprise_aarch64-unknown-linux-gnu.tar.gz.sha256)
- [InfluxDB 3 Enterprise • Linux (ARM) • MUSL](https://download.influxdata.com/influxdb/snapshots/influxdb3-enterprise_aarch64-unknown-linux-musl.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/snapshots/influxdb3-enterprise_aarch64-unknown-linux-musl.tar.gz)
<!--------------------------------- END LINUX --------------------------------->
{{% /tab-content %}}
@ -139,9 +132,28 @@ source ~/.zshrc
Use the `influxdb3-enterprise` Docker image to deploy {{< product-name >}} in a
Docker container.
The image is available for x86_64 (AMD64) and ARM64 architectures.
```bash
docker pull quay.io/influxdb/influxdb3-enterprise:latest
```
{{< page-nav next="/influxdb3/enterprise/get-started/" nextText="Get started with InfluxDB 3 Enterprise" >}}
Docker automatically pulls the appropriate image for your system architecture.
You can also explicitly specify the architecture by using platform-specific tags:
```bash
# For x86_64/AMD64
docker pull \
--platform linux/amd64 \
quay.io/influxdb/influxdb3-enterprise:latest
```
```bash
# For ARM64
docker pull \
--platform linux/arm64 \
quay.io/influxdb/influxdb3-enterprise:latest
```
{{< page-nav next="/influxdb3/core/get-started/" nextText="Get started with InfluxDB 3 Enterprise" >}}

View File

@ -4,7 +4,7 @@ description: Use the Python processing engine to trigger and execute custom code
menu:
influxdb3_enterprise:
name: Processing Engine and Python Plugins
weight: 2
weight: 4
influxdb3/enterprise/tags: []
source: /shared/v3-core-plugins/_index.md
---

View File

@ -5,7 +5,7 @@ list_title: Use the v1 query API and InfluxQL
description: >
Use the InfluxDB v1 HTTP query API to query data in {{< product-name >}}
with InfluxQL.
weight: 302
weight: 303
menu:
influxdb3_enterprise:
parent: Execute queries

View File

@ -0,0 +1,29 @@
---
title: Use the InfluxDB v3 HTTP query API
seotitle: Use SQL or InfluxQL and InfluxDB v3 HTTP query API
list_title: Use the v3 query API
description: >
Use SQL or InfluxQL and the InfluxDB v3 HTTP query API to query data in {{< product-name >}}.
weight: 301
menu:
influxdb3_enterprise:
parent: Execute queries
name: Use the v3 query API
influxdb3/enterprise/tags: [query, influxql, sql, python]
metadata: [InfluxQL, SQL]
related:
- /influxdb3/enterprise/api-compatibility/v1/
list_code_example: |
```sh
curl --get http://{{< influxdb/host >}}/api/v3/query_sql \
--header "Authorization: Token DATABASE_TOKEN" \
--data-urlencode "db=DATABASE_NAME" \
--data-urlencode "q=SELECT * FROM home"
```
source: /shared/influxdb3-query-guides/execute-queries/influxdb3-api.md
---
<!--
The content for this page is at
// SOURCE content/shared/influxdb3-query-guides/execute-queries/influxdb3-api.md
-->

View File

@ -0,0 +1,136 @@
<!--Shortcode-->
{{% product-name %}} stores data related to the database server, queries, and tables in _system tables_.
You can query the system tables for information about your running server, databases, and and table schemas.
## Query system tables
- [Use the HTTP query API](#use-the-http-query-api)
- [Examples](#examples)
- [Show tables](#show-tables)
- [View column information for a table](#view-column-information-for-a-table)
### Use the HTTP query API
Use the HTTP API `/api/v3/query_sql` endpoint to retrieve system information about your database server and table schemas in {{% product-name %}}.
To execute a query, send a `GET` or `POST` request to the endpoint:
- `GET`: Pass parameters in the URL query string (for simple queries)
- `POST`: Pass parameters in a JSON object (for complex queries and readability in your code)
Include the following parameters:
- `q`: _({{< req >}})_ The SQL query to execute.
- `db`: _({{< req >}})_ The database to execute the query against.
- `params`: A JSON object containing parameters to be used in a _parameterized query_.
- `format`: The format of the response (`json`, `jsonl`, `csv`, `pretty`, or `parquet`).
JSONL (`jsonl`) is preferred because it streams results back to the client.
`pretty` is for human-readable output. Default is `json`.
#### Examples
> [!Note]
> #### system\_ sample data
>
> In examples, tables with `"table_name":"system_` are user-created tables for CPU, memory, disk,
> network, and other resource statistics collected and written
> by the user--for example, using the `psutil` Python library or
> [Telegraf](/telegraf/v1/get-started/) to collect
> and write system metrics to an InfluxDB 3 database.
##### Show tables
The following example sends a `GET` request that executes a `show tables` query
to retrieve all user-created
tables (`"table_schema":"iox"`), system tables, and information schema tables
for a database:
```bash
curl "http://{{< influxdb/host >}}/api/v3/query_sql?db=mydb&format=jsonl&q=show%20tables"
```
The response body contains the following JSONL:
```jsonl
{"table_catalog":"public","table_schema":"iox","table_name":"system_cpu","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_cpu_cores","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_memory","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_memory_faults","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_disk_usage","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_disk_io","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_disk_performance","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_network","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"system","table_name":"distinct_caches","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"system","table_name":"last_caches","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"system","table_name":"parquet_files","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"system","table_name":"processing_engine_plugins","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"system","table_name":"processing_engine_triggers","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"system","table_name":"queries","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"information_schema","table_name":"tables","table_type":"VIEW"}
{"table_catalog":"public","table_schema":"information_schema","table_name":"views","table_type":"VIEW"}
{"table_catalog":"public","table_schema":"information_schema","table_name":"columns","table_type":"VIEW"}
{"table_catalog":"public","table_schema":"information_schema","table_name":"df_settings","table_type":"VIEW"}
{"table_catalog":"public","table_schema":"information_schema","table_name":"schemata","table_type":"VIEW"}
```
A table has one of the following `table_schema` values:
- `iox`: tables created by the user of the database.
- `system`: tables used by the system to show information about the running database server.
Some of these tables show stored information such as configurations,
while others, such as the `queries` table, hold ephemeral state in memory.
- `information_schema`: views that show schema information for tables in the database.
#### View column information for a table
The following query sends a `POST` request that executes an SQL query to
retrieve information about columns in the sample `system_swap` table schema:
_Note: when you send a query in JSON, you must escape single quotes
that surround field names._
```bash
curl "http://localhost:8181/api/v3/query_sql" \
--header "Content-Type: application/json" \
--json '{
"db": "mydb",
"q": "SELECT * FROM information_schema.columns WHERE table_schema = '"'iox'"' AND table_name = '"'system_swap'"'",
"format": "jsonl"
}'
```
The output is the following:
```jsonl
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","column_name":"free","ordinal_position":0,"is_nullable":"YES","data_type":"UInt64"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","column_name":"host","ordinal_position":1,"is_nullable":"NO","data_type":"Dictionary(Int32, Utf8)"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","column_name":"percent","ordinal_position":2,"is_nullable":"YES","data_type":"Float64","numeric_precision":24,"numeric_precision_radix":2}
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","column_name":"sin","ordinal_position":3,"is_nullable":"YES","data_type":"UInt64"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","column_name":"sout","ordinal_position":4,"is_nullable":"YES","data_type":"UInt64"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","column_name":"time","ordinal_position":5,"is_nullable":"NO","data_type":"Timestamp(Nanosecond, None)"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","column_name":"total","ordinal_position":6,"is_nullable":"YES","data_type":"UInt64"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","column_name":"used","ordinal_position":7,"is_nullable":"YES","data_type":"UInt64"}
```
#### Recently executed queries
To view recently executed queries, query the `queries` system table:
```bash
curl "http://localhost:8181/api/v3/query_sql" \
--header "Content-Type: application/json" \
--json '{
"db": "mydb",
"q": "SELECT * FROM system.queries LIMIT 2",
"format": "jsonl"
}'
```
The output is similar to the following:
```jsonl
{"id":"cdd63409-1822-4e65-8e3a-d274d553dbb3","phase":"success","issue_time":"2025-01-20T17:01:40.690067","query_type":"sql","query_text":"show tables","partitions":0,"parquet_files":0,"plan_duration":"PT0.032689S","permit_duration":"PT0.000202S","execute_duration":"PT0.000223S","end2end_duration":"PT0.033115S","compute_duration":"P0D","max_memory":0,"success":true,"running":false,"cancelled":false}
{"id":"47f8d312-5e75-4db2-837a-6fcf94c09927","phase":"success","issue_time":"2025-01-20T17:02:32.627782","query_type":"sql","query_text":"show tables","partitions":0,"parquet_files":0,"plan_duration":"PT0.000583S","permit_duration":"PT0.000015S","execute_duration":"PT0.000063S","end2end_duration":"PT0.000662S","compute_duration":"P0D","max_memory":0,"success":true,"running":false,"cancelled":false}
```

View File

@ -0,0 +1,193 @@
Use the InfluxDB 3 HTTP query API to query data in {{< product-name >}}.
The API provides `GET` and `POST` endpoints for querying data and system information using SQL or InfluxQL.
> [!Note]
> #### Query using gRPC or HTTP
>
> InfluxDB 3 supports HTTP and Flight (gRPC) query APIs.
> For more information about using Flight, see the [InfluxDB 3 (`influxdb3-`) client libraries](https://github.com/InfluxCommunity/).
The examples below use **cURL** to send HTTP requests to the InfluxDB 3 HTTP API,
but you can use any HTTP client.
- [Query using SQL and the HTTP API](#query-using-sql-and-the-http-api)
- [Query using InfluxQL and the HTTP API](#query-using-influxql-and-the-http-api)
## Query using SQL and the HTTP API
Use the `/api/v3/query_sql` endpoint with the `GET` or `POST` request methods.
- `GET`: Pass parameters in the URL query string (for simple queries)
- `POST`: Pass parameters in a JSON object (for complex queries and readability in your code)
Include the following parameters:
- `q`: _({{< req >}})_ The **SQL** query to execute.
- `db`: _({{< req >}})_ The database to execute the query against.
- `params`: A JSON object containing parameters to be used in a _parameterized query_.
- `format`: The format of the response (`json`, `jsonl`, `csv`, `pretty`, or `parquet`).
JSONL (`jsonl`) is preferred because it streams results back to the client.
`pretty` is for human-readable output. Default is `json`.
### Example: Query passing URL-encoded parameters
The following example sends an HTTP `GET` request with a URL-encoded SQL query:
```bash
curl -v "http://{{< influxdb/host >}}/api/v3/query_sql?db=servers&q=select+*+from+cpu+limit+5"
```
### Example: Query passing JSON parameters
The following example sends an HTTP `POST` request with parameters in a JSON payload:
```bash
curl http://{{< influxdb/host >}}/api/v3/query_sql \
--data '{"db": "server", "q": "select * from cpu limit 5"}'
```
### Query system information
Use the HTTP API `/api/v3/query_sql` endpoint to retrieve system information
about your database server and table schemas in {{% product-name %}}.
#### Examples
> [!Note]
> #### system\_ sample data
>
> In examples, tables with `"table_name":"system_` are user-created tables for CPU, memory, disk,
> network, and other resource statistics collected and written
> by the user--for example, using the `psutil` Python library or
> [Telegraf](https://docs.influxdata.com/telegraf/v1/get-started/) to collect
> and write system metrics to an InfluxDB 3 database.
##### Show tables
The following example sends a `GET` request that executes a `show tables` query
to retrieve all user-created
tables (`"table_schema":"iox"`), system tables, and information schema tables
for a database:
```bash
curl "http://{{< influxdb/host >}}/api/v3/query_sql?db=mydb&format=jsonl&q=show%20tables"
```
The response body contains the following JSONL:
```jsonl
{"table_catalog":"public","table_schema":"iox","table_name":"system_cpu","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_cpu_cores","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_memory","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_memory_faults","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_disk_usage","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_disk_io","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_disk_performance","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_network","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"system","table_name":"distinct_caches","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"system","table_name":"last_caches","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"system","table_name":"parquet_files","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"system","table_name":"processing_engine_plugins","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"system","table_name":"processing_engine_triggers","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"system","table_name":"queries","table_type":"BASE TABLE"}
{"table_catalog":"public","table_schema":"information_schema","table_name":"tables","table_type":"VIEW"}
{"table_catalog":"public","table_schema":"information_schema","table_name":"views","table_type":"VIEW"}
{"table_catalog":"public","table_schema":"information_schema","table_name":"columns","table_type":"VIEW"}
{"table_catalog":"public","table_schema":"information_schema","table_name":"df_settings","table_type":"VIEW"}
{"table_catalog":"public","table_schema":"information_schema","table_name":"schemata","table_type":"VIEW"}
```
A table has one of the following `table_schema` values:
- `iox`: tables created by the user of the database.
- `system`: tables used by the system to show information about the running database server.
Some of these tables show stored information such as configurations,
while others, such as the `queries` table, hold ephemeral state in memory.
- `information_schema`: views that show schema information for tables in the database.
#### View column information for a table
The following query sends a `POST` request that executes an SQL query to
retrieve information about columns in the sample `system_swap` table schema:
_Note: when you send a query in JSON, you must escape single quotes
that surround field names._
```bash
curl "http://localhost:8181/api/v3/query_sql" \
--header "Content-Type: application/json" \
--json '{
"db": "mydb",
"q": "SELECT * FROM information_schema.columns WHERE table_schema = '"'iox'"' AND table_name = '"'system_swap'"'",
"format": "jsonl"
}'
```
The output is similar to the following:
```jsonl
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","column_name":"free","ordinal_position":0,"is_nullable":"YES","data_type":"UInt64"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","column_name":"host","ordinal_position":1,"is_nullable":"NO","data_type":"Dictionary(Int32, Utf8)"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","column_name":"percent","ordinal_position":2,"is_nullable":"YES","data_type":"Float64","numeric_precision":24,"numeric_precision_radix":2}
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","column_name":"sin","ordinal_position":3,"is_nullable":"YES","data_type":"UInt64"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","column_name":"sout","ordinal_position":4,"is_nullable":"YES","data_type":"UInt64"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","column_name":"time","ordinal_position":5,"is_nullable":"NO","data_type":"Timestamp(Nanosecond, None)"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","column_name":"total","ordinal_position":6,"is_nullable":"YES","data_type":"UInt64"}
{"table_catalog":"public","table_schema":"iox","table_name":"system_swap","column_name":"used","ordinal_position":7,"is_nullable":"YES","data_type":"UInt64"}
```
#### Recently executed queries
To view recently executed queries, query the `queries` system table:
```bash
curl "http://localhost:8181/api/v3/query_sql" \
--header "Content-Type: application/json" \
--json '{
"db": "mydb",
"q": "SELECT * FROM system.queries LIMIT 2",
"format": "jsonl"
}'
```
The output is similar to the following:
```jsonl
{"id":"cdd63409-1822-4e65-8e3a-d274d553dbb3","phase":"success","issue_time":"2025-01-20T17:01:40.690067","query_type":"sql","query_text":"show tables","partitions":0,"parquet_files":0,"plan_duration":"PT0.032689S","permit_duration":"PT0.000202S","execute_duration":"PT0.000223S","end2end_duration":"PT0.033115S","compute_duration":"P0D","max_memory":0,"success":true,"running":false,"cancelled":false}
{"id":"47f8d312-5e75-4db2-837a-6fcf94c09927","phase":"success","issue_time":"2025-01-20T17:02:32.627782","query_type":"sql","query_text":"show tables","partitions":0,"parquet_files":0,"plan_duration":"PT0.000583S","permit_duration":"PT0.000015S","execute_duration":"PT0.000063S","end2end_duration":"PT0.000662S","compute_duration":"P0D","max_memory":0,"success":true,"running":false,"cancelled":false}
```
## Query using InfluxQL and the HTTP API
Use the `/api/v3/query_influxql` endpoint with the `GET` or `POST` request methods.
- `GET`: Pass parameters in the URL query string (for simple queries)
- `POST`: Pass parameters in a JSON object (for complex queries and readability in your code)
Include the following parameters:
- `q`: _({{< req >}})_ The **InfluxQL** query to execute.
- `db`: _({{< req >}})_ The database to execute the query against.
- `params`: A JSON object containing parameters to be used in a _parameterized query_.
- `format`: The format of the response (`json`, `jsonl`, `csv`, `pretty`, or `parquet`).
JSONL (`jsonl`) is preferred because it streams results back to the client.
`pretty` is for human-readable output. Default is `json`.
### Example: Query passing URL-encoded parameters
The following example sends an HTTP `GET` request with a URL-encoded InfluxQL query:
```bash
curl -v "http://{{< influxdb/host >}}/api/v3/query_influxql?db=servers&q=select+*+from+cpu+limit+5"
```
### Example: Query passing JSON parameters
The following example sends an HTTP `POST` request with parameters in a JSON payload:
```bash
curl http://{{< influxdb/host >}}/api/v3/query_influxql \
--data '{"db": "server", "q": "select * from cpu limit 5"}'
```

View File

@ -241,7 +241,7 @@ ORDER BY
### Ambiguous reference to unqualified field
If a column exists on both sides of the join and is used in in the `SELECT`,
If a column exists on both sides of the join and is used in the `SELECT`,
`ON`, `WHERE`, `HAVING`, `GROUP BY`, or `ORDER BY` clause, you must use a
[fully-qualified reference](#fully-qualified-reference). For example, if both
sides of the join have a `time` column and you want to explicitly select a

View File

@ -62,7 +62,7 @@ This guide covers InfluxDB 3 Core (the open source release), including the follo
{{% tabs %}}
[Linux or macOS](#linux-or-macos)
[Windows](#windows)
[Docker (x86)](#docker-x86)
[Docker](#docker)
{{% /tabs %}}
{{% tab-content %}}
<!--------------- BEGIN LINUX AND MACOS -------------->
@ -75,15 +75,9 @@ curl -O https://www.influxdata.com/d/install_influxdb3.sh \
Or, download and install [build artifacts](/influxdb3/core/install/#download-influxdb-3-core-binaries):
- [Linux | x86 | musl](https://dl.influxdata.com/influxdb/snapshots/influxdb3-core_x86_64-unknown-linux-musl.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/snapshots/influxdb3-core_x86_64-unknown-linux-musl.tar.gz.sha256)
- [Linux | x86 | gnu](https://dl.influxdata.com/influxdb/snapshots/influxdb3-core_x86_64-unknown-linux-gnu.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/snapshots/influxdb3-core_x86_64-unknown-linux-gnu.tar.gz.sha256)
- [Linux | ARM | musl](https://dl.influxdata.com/influxdb/snapshots/influxdb3-core_aarch64-unknown-linux-musl.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/snapshots/influxdb3-core_aarch64-unknown-linux-musl.tar.gz.sha256)
- [Linux | ARM | gnu](https://dl.influxdata.com/influxdb/snapshots/influxdb3-core_aarch64-unknown-linux-gnu.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/snapshots/influxdb3-core_aarch64-unknown-linux-gnu.tar.gz.sha256)
@ -107,7 +101,10 @@ Download and install the {{% product-name %}} [Windows (x86) binary](https://dl.
{{% tab-content %}}
<!--------------- BEGIN DOCKER -------------->
Pull the [`influxdb3-core` image](https://quay.io/repository/influxdb/influxdb3-core?tab=tags&tag=latest):
The [`influxdb3-core` image](https://quay.io/repository/influxdb/influxdb3-core?tab=tags&tag=latest)
is available for x86_64 (AMD64) and ARM64 architectures.
Pull the image:
```bash
docker pull quay.io/influxdb/influxdb3-core:latest

View File

@ -53,7 +53,7 @@ This guide covers Enterprise as well as InfluxDB 3 Core, including the following
{{% tabs %}}
[Linux or macOS](#linux-or-macos)
[Windows](#windows)
[Docker (x86)](#docker-x86)
[Docker](#docker)
{{% /tabs %}}
{{% tab-content %}}
<!--------------- BEGIN LINUX AND MACOS -------------->
@ -69,15 +69,9 @@ Or, download and install [build artifacts](/influxdb3/enterprise/install/#downlo
- [Linux | x86_64 | GNU](https://dl.influxdata.com/influxdb/snapshots/influxdb3-enterprise_x86_64-unknown-linux-gnu.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/snapshots/influxdb3-enterprise_x86_64-unknown-linux-gnu.tar.gz.sha256)
- [Linux | x86_64 | MUSL](https://dl.influxdata.com/influxdb/snapshots/influxdb3-enterprise_x86_64-unknown-linux-musl.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/snapshots/influxdb3-enterprise_x86_64-unknown-linux-musl.tar.gz.sha256)
- [Linux | ARM64 | GNU](https://dl.influxdata.com/influxdb/snapshots/influxdb3-enterprise_aarch64-unknown-linux-gnu.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/snapshots/influxdb3-enterprise_aarch64-unknown-linux-gnu.tar.gz.sha256)
- [Linux | ARM64 | MUSL](https://dl.influxdata.com/influxdb/snapshots/influxdb3-enterprise_aarch64-unknown-linux-musl.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/snapshots/influxdb3-enterprise_aarch64-unknown-linux-musl.tar.gz.sha256)
- [macOS | ARM64](https://dl.influxdata.com/influxdb/snapshots/influxdb3-enterprise_aarch64-apple-darwin.tar.gz)
[sha256](https://dl.influxdata.com/influxdb/snapshots/influxdb3-enterprise_aarch64-apple-darwin.tar.gz.sha256)
@ -98,7 +92,10 @@ Download and install the {{% product-name %}} [Windows (x86) binary](https://dl.
{{% tab-content %}}
<!--------------- BEGIN DOCKER -------------->
Pull the [`influxdb3-enterprise` image](https://quay.io/repository/influxdb/influxdb3-enterprise?tab=tags&tag=latest):
The [`influxdb3-enterprise` image](https://quay.io/repository/influxdb/influxdb3-enterprise?tab=tags&tag=latest)
is available for x86_64 (AMD64) and ARM64 architectures.
Pull the image:
```bash
docker pull quay.io/influxdb/influxdb3-enterprise:latest

View File

@ -1,5 +1,5 @@
User-agent: *
{{- if eq .Site.Params.environment "staging" }}Disallow: /
{{ if eq .Site.Params.environment "staging" }}Disallow: /
{{- else }}{{ range where .Site.Pages ".Params.noindex" true }}
Disallow: {{ .RelPermalink }}
{{ end -}}