Skip to content

Commit 6abda20

Browse files
committed
Resolve conflicts in get-started
1 parent c9bc5e1 commit 6abda20

File tree

3 files changed

+104
-118
lines changed

3 files changed

+104
-118
lines changed

content/shared/influxdb3-get-started/query.md

Lines changed: 39 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
### Query data
2-
3-
InfluxDB 3 supports native SQL for querying, in addition to InfluxQL, an
4-
SQL-like language customized for time series queries.
1+
<!-- COMMENT TO ALLOW STARTING WITH SHORTCODE -->
2+
{{% product-name %}} supports both native SQL and InfluxQL for querying data. InfluxQL is
3+
an SQL-like query language designed for InfluxDB v1 and customized for time
4+
series queries.
55

66
{{% show-in "core" %}}
77
{{< product-name >}} limits
8-
query time ranges to 72 hours (both recent and historical) to ensure query performance.
9-
For more information about the 72-hour limitation, see the
10-
[update on InfluxDB 3 Core’s 72-hour limitation](https://www.influxdata.com/blog/influxdb3-open-source-public-alpha-jan-27/).
8+
query time ranges to approximately 72 hours (both recent and historical) to
9+
ensure query performance. For more information about the 72-hour limitation, see
10+
the [update on InfluxDB 3 Core’s 72-hour limitation](https://www.influxdata.com/blog/influxdb3-open-source-public-alpha-jan-27/).
1111
{{% /show-in %}}
1212

1313
> [!Note]
14-
> Flux, the language introduced in InfluxDB 2.0, is **not** supported in InfluxDB 3.
14+
> Flux, the language introduced in InfluxDB v2, is **not** supported in InfluxDB 3.
1515
1616
<!-- TOC -->
1717

@@ -34,70 +34,54 @@ To get started querying data in {{% product-name %}}, use the
3434
[`influxdb3 query` command](/influxdb3/version/reference/cli/influxdb3/query/)
3535
and provide the following:
3636

37-
The `query` subcommand includes options to help ensure that the right database is queried with the correct permissions. Only the `--database` option is required, but depending on your specific setup, you may need to pass other options, such as host, port, and token.
37+
- `-H`, `--host`: The host URL of the server _(default is `http://127.0.0.1:8181`)_
38+
- `-d`, `--database`: _({{% req %}})_ The name of the database to query
39+
- `-l`, `--language`: The query language of the provided query string
40+
- `sql` _(default)_
41+
- `influxql`
42+
- SQL or InfluxQL query as a string
3843

3944
> [!Important]
4045
> If the `INFLUXDB3_AUTH_TOKEN` environment variable defined in
4146
> [Set up {{% product-name %}}](/influxdb3/version/get-started/setup/#set-your-token-for-authorization)
4247
> isn't set in your environment, set it or provide your token using
4348
> the `-t, --token` option in your command.
4449
45-
#### Example: query `“SHOW TABLES”` on the `servers` database:
46-
47-
```console
48-
$ influxdb3 query --database servers "SHOW TABLES"
49-
+---------------+--------------------+--------------+------------+
50-
| table_catalog | table_schema | table_name | table_type |
51-
+---------------+--------------------+--------------+------------+
52-
| public | iox | cpu | BASE TABLE |
53-
| public | information_schema | tables | VIEW |
54-
| public | information_schema | views | VIEW |
55-
| public | information_schema | columns | VIEW |
56-
| public | information_schema | df_settings | VIEW |
57-
| public | information_schema | schemata | VIEW |
58-
+---------------+--------------------+--------------+------------+
59-
```
60-
61-
#### Example: query the `cpu` table, limiting to 10 rows:
62-
63-
```console
64-
$ influxdb3 query --database servers "SELECT DISTINCT usage_percent, time FROM cpu LIMIT 10"
65-
+---------------+---------------------+
66-
| usage_percent | time |
67-
+---------------+---------------------+
68-
| 63.4 | 2024-02-21T19:25:00 |
69-
| 25.3 | 2024-02-21T19:06:40 |
70-
| 26.5 | 2024-02-21T19:31:40 |
71-
| 70.1 | 2024-02-21T19:03:20 |
72-
| 83.7 | 2024-02-21T19:30:00 |
73-
| 55.2 | 2024-02-21T19:00:00 |
74-
| 80.5 | 2024-02-21T19:05:00 |
75-
| 60.2 | 2024-02-21T19:33:20 |
76-
| 20.5 | 2024-02-21T18:58:20 |
77-
| 85.2 | 2024-02-21T19:28:20 |
78-
+---------------+---------------------+
79-
```
50+
To query the home sensor sample data you wrote in
51+
[Write data to {{% product-name %}}](/influxdb3/version/get-started/write/#write-data-using-the-cli),
52+
run the following command:
8053

81-
### Query using the CLI for InfluxQL
82-
83-
[InfluxQL](/influxdb3/version/reference/influxql/) is an SQL-like language developed by InfluxData with specific features tailored for leveraging and working with InfluxDB. It’s compatible with all versions of InfluxDB, making it a good choice for interoperability across different InfluxDB installations.
54+
{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN" %}}
8455

85-
To query using InfluxQL, enter the `influxdb3 query` subcommand and specify `influxql` in the language option--for example:
56+
{{< code-tabs-wrapper >}}
57+
{{% code-tabs %}}
58+
[SQL](#)
59+
[InfluxQL](#)
60+
{{% /code-tabs %}}
61+
{{% code-tab-content %}}
8662

87-
{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN" %}}
63+
<!-- pytest.mark.skip -->
64+
```bash
65+
influxdb3 query \
66+
--database DATABASE_NAME \
67+
"SELECT * FROM home ORDER BY time"
68+
```
69+
{{% /code-tab-content %}}
70+
{{% code-tab-content %}}
71+
<!-- pytest.mark.skip -->
8872
```bash
8973
influxdb3 query \
9074
--database DATABASE_NAME \
91-
--token AUTH_TOKEN \
9275
--language influxql \
93-
"SELECT DISTINCT usage_percent FROM cpu WHERE time >= now() - 1d"
76+
"SELECT * FROM home"
9477
```
95-
{{% /code-placeholders %}}
78+
{{% /code-tab-content %}}
79+
{{< /code-tabs-wrapper >}}
9680

97-
Replace the following placeholders with your values:
81+
{{% /code-placeholders %}}
9882

99-
- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the database to query
100-
- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: your {{% token-link "database" %}}{{% show-in "enterprise" %}} with permission to query the specified database{{% /show-in %}}
83+
_Replace {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}
84+
with the name of the database to query._
10185

10286
To query from a specific time range, use the `WHERE` clause to designate the
10387
boundaries of your time range.

content/shared/influxdb3-get-started/setup.md

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,6 @@ Use the [`influxdb3 serve` command](/influxdb3/version/reference/cli/influxdb3/s
2727
to start {{% product-name %}}.
2828
Provide the following:
2929

30-
- `--object-store`: Specifies the type of object store to use.
31-
InfluxDB supports the following:
32-
33-
- `file` _(default)_: local file system
34-
- `memory`: in memory _(no object persistence)_
35-
- `memory-throttled`: like `memory` but with latency and throughput that
36-
somewhat resembles a cloud-based object store
37-
- `s3`: AWS S3 and S3-compatible services like Ceph or Minio
38-
- `google`: Google Cloud Storage
39-
- `azure`: Azure Blob Storage
40-
{{% show-in "core" %}}
41-
- `--node-id`: A string identifier that distinguishes individual server instances.
42-
This forms the final part of the storage path: `<CONFIGURED_PATH>/<NODE_ID>`.
43-
{{% /show-in %}}
4430
{{% show-in "enterprise" %}}
4531
- `--node-id`: A string identifier that distinguishes individual server
4632
instances within the cluster. This forms the final part of the storage path:
@@ -51,11 +37,24 @@ Provide the following:
5137
The storage path follows the pattern `<CONFIGURED_PATH>/<CLUSTER_ID>/<NODE_ID>`.
5238
In a multi-node setup, this ID is used to reference the entire cluster.
5339
{{% /show-in %}}
40+
{{% show-in "core" %}}
41+
- `--node-id`: A string identifier that distinguishes individual server instances.
42+
This forms the final part of the storage path: `<CONFIGURED_PATH>/<NODE_ID>`.
43+
{{% /show-in %}}
44+
- `--object-store`: Specifies the type of object store to use.
45+
InfluxDB supports the following:
46+
47+
- `file` _(default)_: local file system
48+
- `memory`: in memory _(no object persistence)_
49+
- `memory-throttled`: like `memory` but with latency and throughput that
50+
somewhat resembles a cloud-based object store
51+
- `s3`: AWS S3 and S3-compatible services like Ceph or Minio
52+
- `google`: Google Cloud Storage
53+
- `azure`: Azure Blob Storage
5454

55-
### Configure for your object store
56-
57-
Depending on the object store type, you may need to provide additional
58-
options, such as access credentials, for your object store configuration.
55+
> [!Note]
56+
> Examples in this getting started guide use the `file` object
57+
> store to persist data to your local disk.
5958
6059
The following examples show how to start {{% product-name %}} with different
6160
object store configurations.
@@ -73,10 +72,32 @@ object store configurations.
7372
> separation between clusters and individual nodes.
7473
> {{% /show-in %}}
7574
76-
_For this getting started guide, use the `file` object store to persist data to
77-
your local disk._
75+
For this getting started guide, use the `file` object store to persist data to
76+
your local disk.
7877

79-
### Object store examples
78+
{{% show-in "enterprise" %}}
79+
```bash
80+
# File system object store
81+
# Provide the filesystem directory
82+
influxdb3 serve \
83+
--node-id host01 \
84+
--cluster-id cluster01 \
85+
--object-store file \
86+
--data-dir ~/.influxdb3
87+
```
88+
{{% /show-in %}}
89+
{{% show-in "core" %}}
90+
```bash
91+
# File system object store
92+
# Provide the file system directory
93+
influxdb3 serve \
94+
--node-id host01 \
95+
--object-store file \
96+
--data-dir ~/.influxdb3
97+
```
98+
{{% /show-in %}}
99+
100+
### {{% product-name %}} store examples
80101

81102
{{< expand-wrapper >}}
82103
{{% expand "File system object store" %}}
@@ -339,11 +360,16 @@ influxdb3 serve --help
339360
## Set up licensing
340361

341362
When you first start a new instance, {{% product-name %}} prompts you to select a
342-
license type. InfluxDB 3 Enterprise licenses authorize the use of the
343-
InfluxDB 3 Enterprise software and apply to a single cluster. Licenses are
344-
primarily based on the number of CPUs InfluxDB can use, but there are other
345-
limitations depending on the license type. The following InfluxDB 3 Enterprise
346-
license types are available:
363+
364+
license type.
365+
366+
InfluxDB 3 Enterprise licenses:
367+
368+
- **Authorize** usage of InfluxDB 3 Enterprise software for a single cluster.
369+
- **Apply per cluster**, with limits based primarily on CPU cores.
370+
- **Vary by license type**, each offering different capabilities and restrictions.
371+
372+
### Available license types:
347373

348374
- **Trial**: 30-day trial license with full access to InfluxDB 3 Enterprise capabilities.
349375
- **At-Home**: For at-home hobbyist use with limited access to InfluxDB 3 Enterprise capabilities.
@@ -356,32 +382,8 @@ license types are available:
356382
> you start a new instance, provide your email address with the
357383
> `--license-email` option or the
358384
> `INFLUXDB3_LICENSE_EMAIL` environment variable to bypass the licensing
359-
> email prompt--for example:
385+
> email prompt--for example, in a Docker Compose file:
360386
>
361-
> {{< code-tabs-wrapper >}}
362-
> {{% code-tabs %}}
363-
> [Docker CLI](#)
364-
> [Docker Compose file](#)
365-
> {{% /code-tabs %}}
366-
> {{% code-tab-content %}}
367-
> {{% code-placeholders "EMAIL_ADDRESS" %}}
368-
> ```bash
369-
> docker run -d --name influxdb3-enterprise \
370-
> -v "$PWD/data:/var/lib/influxdb3" \
371-
> -v "$PWD/plugins:/plugins" \
372-
> -p 8181:8181 \
373-
> quay.io/influxdb/influxdb3-enterprise:latest \
374-
> serve \
375-
> --cluster-id cluster1 \
376-
> --node-id node1 \
377-
> --plugin-dir /plugins \
378-
> --object-store file \
379-
> --data-dir /var/lib/influxdb3
380-
> ```
381-
> {{% /code-placeholders %}}
382-
> - Replace {{% code-placeholder-key %}}`EMAIL_ADDRESS`{{% /code-placeholder-key %}} with the email you want to associate with the license.
383-
> {{% /code-tab-content %}}
384-
> {{% code-tab-content %}}
385387
> {{% code-placeholders "EMAIL_ADDRESS" %}}
386388
> ```yaml
387389
> # compose.yaml
@@ -404,9 +406,7 @@ license types are available:
404406
> {{% /code-placeholders %}}
405407
> {{% code-placeholder-key %}}`EMAIL_ADDRESS`{{% /code-placeholder-key %}} is
406408
> the email you want to associate with the license. This example shows how
407-
> to reference an email address set in your `.env` file.
408-
> {{% /code-tab-content %}}
409-
> {{< /code-tabs-wrapper >}}
409+
> to reference a variable in your `.env` file.
410410
>
411411
> _Currently, if you use the prompt to enter your email address, a bug may
412412
> prevent the container from generating the license ._

content/shared/influxdb3-get-started/write.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
### Write data
1+
<!-- ALLOW SHORTCODE -->
22

3-
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.
4-
After a schema is created, InfluxDB validates future write requests against it before accepting the data.
5-
Subsequent requests can add new fields on-the-fly, but can't add new tags.
3+
{{% product-name %}} is designed for high write-throughput and uses an efficient,
4+
human-readable write syntax called _[line protocol](#line-protocol)_. InfluxDB
5+
is a schema-on-write database, meaning you can start writing data and InfluxDB
6+
creates the logical database, tables, and their schemas automatically, without
7+
any required intervention. Once InfluxDB creates the schema, it validates future
8+
write requests against the schema before accepting new data.
9+
Both new tags and fields can be added later as your schema changes.
610

711
{{% show-in "core" %}}
812
> [!Note]
9-
> #### Core is optimized for recent data
13+
> #### InfluxDB 3 Core is optimized for recent data
1014
>
1115
> {{% product-name %}} is optimized for recent data but accepts writes from any time period.
1216
> The system persists data to Parquet files for historical analysis with [InfluxDB 3 Enterprise](/influxdb3/enterprise/get-started/) or third-party tools.
@@ -139,7 +143,7 @@ home,room=Kitchen temp=22.7,hum=36.5,co=26i 1641067200
139143

140144
{{% /influxdb/custom-timestamps %}}
141145

142-
## Write data using the CLI
146+
## Write data using the CLI
143147

144148
To quickly get started writing data, use the
145149
[`influxdb3 write` command](/influxdb3/version/reference/cli/influxdb3/write/).
@@ -150,8 +154,6 @@ Include the following:
150154
environment variable is already set)_
151155
- Quoted line protocol data via standard input (stdin) or a file
152156

153-
### Write data via standard input (stdin)
154-
155157
{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN" %}}
156158
```bash
157159
influxdb3 write \
@@ -197,7 +199,7 @@ In the code samples, replace the following placeholders with your values:
197199

198200
### Write data from a file
199201

200-
Pass the `--file` option to write line protocol you have saved to a file--for example, save the
202+
To write line protocol you have saved to a file, pass the `--file` option--for example, save the
201203
[sample line protocol](#home-sensor-data-line-protocol) to a file named `sensor_data`
202204
and then enter the following command:
203205

0 commit comments

Comments
 (0)