6.3 KiB
title | description | menu | weight | list_code_example | related | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
List tables | Use the Admin UI, the [`influxctl table list` command](/influxdb3/cloud-dedicated/reference/cli/influxctl/table/list/), the [`SHOW TABLES` SQL statement](/influxdb3/cloud-dedicated/query-data/sql/explore-schema/#list-measurements-in-a-database), or the [`SHOW MEASUREMENTS` InfluxQL statement](/influxdb3/cloud-dedicated/query-data/influxql/explore-schema/#list-measurements-in-a-database) to list tables in a database. |
|
201 | ##### CLI ```sh influxctl table list <DATABASE_NAME> ``` ##### SQL ```sql SHOW TABLES ``` ##### InfluxQL ```sql SHOW MEASUREMENTS ``` |
|
Use the Admin UI, the influxctl table list
command,
the SHOW TABLES
SQL statement,
or the SHOW MEASUREMENTS
InfluxQL statement
to list tables in a database.
[!Note] With {{< product-name >}}, tables and measurements are synonymous.
{{< tabs-wrapper >}} {{% tabs %}} Admin UI influxctl SQL & InfluxQL {{% /tabs %}} {{% tab-content %}}
The InfluxDB Cloud Dedicated administrative UI includes a portal for managing tables. You can view the list of tables associated with a database and their details, including:
- Name
- Table ID
- Table size (in bytes)
-
To access the {{< product-name >}} Admin UI, visit the following URL in your browser:
https://console.influxdata.com
-
Use the credentials provided by InfluxData to log into the Admin UI. If you don't have login credentials, contact InfluxData support.
After you log in, the Account Management portal displays account information and lists all clusters associated with your account.
-
In the cluster list, find the cluster that contains the database and table. You can Search for clusters by name or ID to filter the list and use the sort button and column headers to sort the list.
-
Click the cluster row to view the list of databases associated with the cluster.
-
In the database list, find the database that contains the table. You can Search for databases by name or ID to filter the list and use the sort button and column headers to sort the list.
-
Click the database row to view the list of tables associated with the database.
-
The table list displays the following table details:
- Name
- Table ID
- Table size (in bytes)
-
You can Search for tables by name or ID to filter the list and use the sort button and column headers to sort the list.
You can Search for databases by name or ID to filter the list and use the sort button and column headers to sort the list.
{{% /tab-content %}} {{% tab-content %}}
Use the influxctl table list
command
to list all tables in a database in your {{< product-name omit=" Cluster" >}} cluster.
{{% code-placeholders "DATABASE_NAME" %}}
influxctl table list DATABASE_NAME
{{% /code-placeholders %}}
Replace the following:
- {{% code-placeholder-key %}}
DATABASE_NAME
{{% /code-placeholder-key %}}: Name of the database containing the tables to list
Output formats
The influxctl table list
command supports the following output formats:
table
(default): Human-readable table formatjson
: JSON format for programmatic use
Use the --format
flag to specify the output format:
{{% code-placeholders "DATABASE_NAME" %}}
influxctl table list --format json DATABASE_NAME
{{% /code-placeholders %}}
{{% /tab-content %}} {{% tab-content %}}
List tables with the influxctl query command
To list tables using SQL or InfluxQL, use the influxctl query
command to pass
the appropriate statement.
SQL
SHOW TABLES
InfluxQL
SHOW MEASUREMENTS
Provide the following with your command:
- Database token: Database token
with read permissions on the queried database. Uses the
token
setting from theinfluxctl
connection profile or the--token
command flag. - Database name: Name of the database to query. Uses the
database
setting from theinfluxctl
connection profile or the--database
command flag. - SQL query: SQL query with the
SHOW TABLES
statement or InfluxQL query with theSHOW MEASUREMENTS
statement.
{{% code-placeholders "DATABASE_(TOKEN|NAME)" %}}
SQL
influxctl query \
--token DATABASE_TOKEN \
--database DATABASE_NAME \
"SHOW TABLES"
InfluxQL
influxctl query \
--token DATABASE_TOKEN \
--database DATABASE_NAME \
--language influxql \
"SHOW MEASUREMENTS"
{{% /code-placeholders %}}
Replace the following:
- {{% code-placeholder-key %}}
DATABASE_TOKEN
{{% /code-placeholder-key %}}: Database token with read access to the queried database - {{% code-placeholder-key %}}
DATABASE_NAME
{{% /code-placeholder-key %}}: Name of the database to query
{{% /tab-content %}} {{< /tabs-wrapper >}}