List tables
Use the influxctl table list command,
the SHOW TABLES SQL statement,
or the SHOW MEASUREMENTS InfluxQL statement
to list tables in a database.
With InfluxDB Clustered, tables and measurements are synonymous.
Use the influxctl table list command
to list all tables in a database in your InfluxDBed.
influxctl table list DATABASE_NAMEReplace the following:
DATABASE_NAME: 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:
influxctl table list --format json DATABASE_NAMEList 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 TABLESInfluxQL
SHOW MEASUREMENTSProvide the following with your command:
- Database token: a database token
with read permissions on the queried database. Uses the
tokensetting from theinfluxctlconnection profile or the--tokencommand flag. - Database name: Name of the database to query. Uses the
databasesetting from theinfluxctlconnection profile or the--databasecommand flag. - SQL query: SQL query with the
SHOW TABLESstatement or InfluxQL query with theSHOW MEASUREMENTSstatement.
SQL
influxctl query \
--token DATABASE_TOKEN \
--database DATABASE_NAME \
"SHOW TABLES"InfluxQL
influxctl query \
--token DATABASE_TOKEN \
--database DATABASE_NAME \
--language influxql \
"SHOW MEASUREMENTS"Replace the following:
DATABASE_TOKEN: Database token with read access to the queried databaseDATABASE_NAME: Name of the database to query
The influxctl query command only supports SQL queries; not InfluxQL.
To use InfluxQL, query InfluxDB through the API using InfluxQL request parameters.
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB Clustered and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.