Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new influxdb3 show system commands #5812

Merged
merged 4 commits into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: influxdb3 show system
description: >
The `influxdb3 show system` command displays data from {{< product-name >}}
system tables.
menu:
influxdb3_core:
parent: influxdb3 show
name: influxdb3 show system
weight: 400
source: /shared/influxdb3-cli/show/system/_index.md
---

<!--
The content for this page is at content/shared/influxdb3-cli/show/system/_index.md
-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: influxdb3 show system summary
description: >
The `influxdb3 show system summary` command returns a summary various types of
system table data.
menu:
influxdb3_core:
parent: influxdb3 show system
name: influxdb3 show system summary
weight: 401
source: /shared/influxdb3-cli/show/system/summary.md
---

<!--
The content for this page is at content/shared/influxdb3-cli/show/system/summary.md
-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: influxdb3 show system table-list
description: >
The `influxdb3 show system table-list` command lists available system tables.
menu:
influxdb3_core:
parent: influxdb3 show system
name: influxdb3 show system table-list
weight: 401
source: /shared/influxdb3-cli/show/system/table-list.md
---

<!--
The content for this page is at content/shared/influxdb3-cli/show/system/table-list.md
-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: influxdb3 show system table
description: >
The `influxdb3 show system table` command queries data from a system table.
menu:
influxdb3_core:
parent: influxdb3 show system
name: influxdb3 show system table
weight: 401
source: /shared/influxdb3-cli/show/system/table.md
---

<!--
The content for this page is at content/shared/influxdb3-cli/show/system/table.md
-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: influxdb3 show system
description: >
The `influxdb3 show system` command displays data from {{< product-name >}}
system tables.
menu:
influxdb3_enterprise:
parent: influxdb3 show
name: influxdb3 show system
weight: 400
source: /shared/influxdb3-cli/show/system/_index.md
---

<!--
The content for this page is at content/shared/influxdb3-cli/show/system/_index.md
-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: influxdb3 show system summary
description: >
The `influxdb3 show system summary` command returns a summary various types of
system table data.
menu:
influxdb3_enterprise:
parent: influxdb3 show system
name: influxdb3 show system summary
weight: 401
source: /shared/influxdb3-cli/show/system/summary.md
---

<!--
The content for this page is at content/shared/influxdb3-cli/show/system/summary.md
-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: influxdb3 show system table-list
description: >
The `influxdb3 show system table-list` command lists available system tables.
menu:
influxdb3_enterprise:
parent: influxdb3 show system
name: influxdb3 show system table-list
weight: 401
source: /shared/influxdb3-cli/show/system/table-list.md
---

<!--
The content for this page is at content/shared/influxdb3-cli/show/system/table-list.md
-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: influxdb3 show system table
description: >
The `influxdb3 show system table` command queries data from a system table.
menu:
influxdb3_enterprise:
parent: influxdb3 show system
name: influxdb3 show system table
weight: 401
source: /shared/influxdb3-cli/show/system/table.md
---

<!--
The content for this page is at content/shared/influxdb3-cli/show/system/table.md
-->
7 changes: 4 additions & 3 deletions content/shared/influxdb3-cli/show/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ influxdb3 show <SUBCOMMAND>

## Subcommands

| Subcommand | Description |
| :------------------------------------------------------------------------- | :--------------------------------------------- |
| Subcommand | Description |
| :---------------------------------------------------------------------- | :--------------------------------------------- |
| [databases](/influxdb3/version/reference/cli/influxdb3/show/databases/) | List database |
| help | Print command help or the help of a subcommand |
| [system](/influxdb3/version/reference/cli/influxdb3/show/system/) | Display system table data |
| help | Print command help or the help of a subcommand |

## Options

Expand Down
2 changes: 1 addition & 1 deletion content/shared/influxdb3-cli/show/databases.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ influxdb3 show databases [OPTIONS]
| `-d` | `--database` | _({{< req >}})_ Name of the database to operate on |
| | `--token` | Authentication token |
| | `--show-deleted` | Include databases marked as deleted in the output |
| | `--format` | Output format (`pretty` _(default)_, `json`, `jsonl`, or `csv`) |
| | `--format` | Output format (`pretty` _(default)_, `json`, `jsonl`, `csv`, or `parquet`) |
| `-h` | `--help` | Print help information |

### Option environment variables
Expand Down
43 changes: 43 additions & 0 deletions content/shared/influxdb3-cli/show/system/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

The `influxdb3 show system` command displays data from {{< product-name >}}
system tables.

## Usage

<!--pytest.mark.skip-->

```bash
influxdb3 show system [OPTIONS] --database <DATABASE_NAME> <SUBCOMMAND>
```

##### Aliases

`system`, `s`

## Subcommands

| Subcommand | Description |
| :---------------------------------------------------------------------------- | :--------------------------------------------- |
| [summary](/influxdb3/version/reference/cli/influxdb3/show/system/summary) | Summarize system table data |
| [table](/influxdb3/version/reference/cli/influxdb3/show/system/table/) | Retrieve entries from a specific system table |
| [table-list](/influxdb3/version/reference/cli/influxdb3/show/system/table-list/) | List available system tables |
| help | Print command help or the help of a subcommand |

## Options

| Option | | Description |
| :----- | :--------------- | :--------------------------------------------------------------------------------------- |
| `-H` | `--host` | Host URL of the running {{< product-name >}} server (default is `http://127.0.0.1:8181`) |
| `-d` | `--database` | _({{< req >}})_ Name of the database to operate on |
| | `--token` | Authentication token |
| `-h` | `--help` | Print help information |

### Option environment variables

You can use the following environment variables to set command options:

| Environment Variable | Option |
| :------------------------ | :----------- |
| `INFLUXDB3_HOST_URL` | `--host` |
| `INFLUXDB3_DATABASE_NAME` | `--database` |
| `INFLUXDB3_AUTH_TOKEN` | `--token` |
48 changes: 48 additions & 0 deletions content/shared/influxdb3-cli/show/system/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@

The `influxdb3 show system summary` command returns a summary various types of
system table data.
sanderson marked this conversation as resolved.
Show resolved Hide resolved

## Usage

<!--pytest.mark.skip-->

```bash
influxdb3 show system --database <DATABASE_NAME> summary [OPTIONS]
```

## Options

| Option | | Description |
| :----- | :--------- | :--------------------------------------------------------------------------------------------- |
| `-l` | `--limit` | Maximum number of entries from each table to display (default is `10`, `0` indicates no limit) |
| | `--format` | Output format (`pretty` _(default)_, `json`, `jsonl`, `csv`, or `parquet) |
sanderson marked this conversation as resolved.
Show resolved Hide resolved
| `-h` | `--help` | Print help information |

## Examples

- [Summarize system table data](#summarize-system-table-data)
- [Summarize system table data in JSON-formatted output](#summarize-system-table-data-in-json-formatted-output)

In the examples below, replace
{{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}} with
the name of the database to operate on.

{{% code-placeholders "DATABASE_NAME" %}}

### Summarize system table data

<!--pytest.mark.skip-->

```bash
influxdb3 show system --database DATABASE_NAME summary
```

### Summarize system table data in JSON-formatted output

<!--pytest.mark.skip-->

```bash
influxdb3 show system --database DATABASE_NAME summary --format json
```

{{% /code-placeholders %}}
46 changes: 46 additions & 0 deletions content/shared/influxdb3-cli/show/system/table-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

The `influxdb3 show system table-list` command lists available system tables.

## Usage

<!--pytest.mark.skip-->

```bash
influxdb3 show system --database <DATABASE_NAME> table-list [OPTIONS]
```

## Options

| Option | | Description |
| :----- | :--------- | :--------------------------------------------------------------------------------------------- |
| | `--format` | Output format (`pretty` _(default)_, `json`, `jsonl`, `csv`, or `parquet) |
sanderson marked this conversation as resolved.
Show resolved Hide resolved
| `-h` | `--help` | Print help information |

## Examples

- [List system tables](#list-system-tables)
- [List system tables in JSON-formatted output](#list-system-tables-in-json-formatted-output)

In the examples below, replace
{{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}} with
the name of the database to operate on.

{{% code-placeholders "DATABASE_NAME" %}}

### List system tables

<!--pytest.mark.skip-->

```bash
influxdb3 show system --database DATABASE_NAME summary
```

### List system tables in JSON-formatted output

<!--pytest.mark.skip-->

```bash
influxdb3 show system --database DATABASE_NAME summary --format json
```

{{% /code-placeholders %}}
83 changes: 83 additions & 0 deletions content/shared/influxdb3-cli/show/system/table.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@

The `influxdb3 show system table` command queries data from a system table.

## Usage

<!--pytest.mark.skip-->

```bash
influxdb3 show system --database <DATABASE_NAME> table [OPTIONS] <SYSTEM_TABLE>
```

## Arguments

- **SYSTEM_TABLE**: the system table to query

## Options

| Option | | Description |
| :----- | :----------- | :------------------------------------------------------------------------------------ |
| `-l` | `--limit` | Maximum number of tables entries to display (default is `10`, `0` indicates no limit) |
| `-o` | `--order-by` | Order by the specified columns |
| `-s` | `--select` | Select specific columns from the system table |
| | `--format` | Output format (`pretty` _(default)_, `json`, `jsonl`, `csv`, or `parquet) |
sanderson marked this conversation as resolved.
Show resolved Hide resolved
| `-h` | `--help` | Print help information |

## Examples

- [Query a system table](#query-a-system-table)
- [Query specific columns from a system table](#query-specific-columns-from-a-system-table)
- [Query a system table and order by a specific column](#query-a-system-table-and-order-by-a-specific-column)
- [Query a system table and return JSON-formatted output](#query-a-system-table-and-return-json-formatted-output)

In the examples below, replace
{{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}} with
the name of the database to operate on.

{{% code-placeholders "DATABASE_NAME" %}}

### Query a system table

<!--pytest.mark.skip-->

```bash
sanderson marked this conversation as resolved.
Show resolved Hide resolved
influxdb3 show system --database DATABASE_NAME table parquet_files
```

### Query specific columns from a system table

<!--pytest.mark.skip-->

```bash
sanderson marked this conversation as resolved.
Show resolved Hide resolved
influxdb3 show system \
--database DATABASE_NAME \
table \
--select table_name,size_bytes,row_count \
parquet_files
```

### Query a system table and order by a specific column

<!--pytest.mark.skip-->

```bash
influxdb3 show system \
--database DATABASE_NAME \
table \
--order-by size_bytes,row_count \
parquet_files
```

### Query a system table and return JSON-formatted output

<!--pytest.mark.skip-->

```bash
influxdb3 show system \
--database DATABASE_NAME \
table \
--format json \
parquet_files
```

{{% /code-placeholders %}}