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

Create show meta-caches sub-command within CLI #25747

Open
Tracked by #25744
peterbarnett03 opened this issue Jan 4, 2025 · 2 comments
Open
Tracked by #25744

Create show meta-caches sub-command within CLI #25747

peterbarnett03 opened this issue Jan 4, 2025 · 2 comments
Labels

Comments

@peterbarnett03
Copy link
Contributor

peterbarnett03 commented Jan 4, 2025

Purpose

We want to enable three commands for the new show command: databases, last-caches, and meta-caches. This issue focuses on meta-caches.

Requirements

With the addition of the command, the show command should add a new sub-command option for meta-caches.

Command: meta-caches
Description: View all configured meta-caches

$ influxdb3 show -h
View all active databases and configured caches

Usage: influxdb3 show [COMMAND]

Commands:
  databases     View all databases
  last-caches   View all configured last-caches
  meta-caches   View all configured meta-caches
  help          Print this message or the help of the given subcommand(s)

Meta-Caches Command

Option Alias Value Name Description
--host -H <HOST_URL> The host URL of the running InfluxDB 3 Core server [env: INFLUXDB3_HOST_URL=] [default: http://127.0.0.1:8181]
--database (Required) -d <DATABASE_NAME> The database to view configured meta-caches
--table -t <TABLE_NAME> The table to view configured meta-caches
--token <AUTH_TOKEN> The token for authentication with the InfluxDB 3 Core server [env: INFLUXDB3_AUTH_TOKEN=]
--help -h Print help information

Output

We want a tabular output. The database name should be in the top-section, plus the columns should be comma-delimited.

+---------------------------------------------------------------------+
| iox::database: <DATABASE_NAME>                                      |
+---------------------------------------------------------------------+
| name          | table      | columns        | cardinality | max_age |
+---------------+------------+----------------+-------------+---------+
| <CACHE_NAME>  | <TABLE>    | <COLUMNS>      | <N>         | <TIME>  |
| <CACHE_NAME>  | <TABLE>    | <COLUMNS>      | <N>         | <TIME>  |
| <CACHE_NAME>  | <TABLE>    | <COLUMNS>      | <N>         | <TIME>  |
+---------------+------------+----------------+-------------+---------+

Example:

+---------------------------------------------------------------------+
| iox::database: weather_data                                         |
+---------------------------------------------------------------------+
| name          | table      | columns        | cardinality | max_age |
+---------------+------------+----------------+-------------+---------+
| sensor_meta   | sensors    | type, model    | 1000        | 24h     |
| location_meta | readings   | city, region   | 500         | 48h     |
| device_meta   | devices    | make, version  | 2000        | 72h     |
+---------------+------------+----------------+-------------+---------+
@hiltontj
Copy link
Contributor

hiltontj commented Jan 4, 2025

There should be an (optional) --table argument to only show caches associated with the given table.

@peterbarnett03
Copy link
Contributor Author

There should be an (optional) --table argument to only show caches associated with the given table.

Updated requirements. Good add.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants