Use the influxdb3 CLI to query data
InfluxDB 3 Core is in Public Alpha
InfluxDB 3 Core is in public alpha and available for testing and feedback, but is not meant for production use. Both the product and this documentation are works in progress. We welcome and encourage your input about your experience with the alpha and invite you to join our public channels for updates and to share feedback.
Use the influxdb3 query
command
to query data in InfluxDB 3 Core with SQL or InfluxQL.
Provide the following with your command:
Database name: The name of the database to query. Provide this using one of the following:
-d
,--database
command optionINFLUXDB3_DATABASE_NAME
environment variable
Query language (Optional): The query language of the query. Use the
-l
,--language
option to specify one of the following query languages:sql
(default)influxql
Query: SQL or InfluxQL query string to execute.
influxdb3 query \
--database DATABASE_NAME \
"SELECT * FROM home"
influxdb3 query \
--database DATABASE_NAME \
--language influxql \
"SELECT * FROM home"
In the examples above and below, replace the following:
DATABASE_NAME
: Name of the database to query
Output format
The influxdb3 query
command supports the following output formats:
pretty
(default)json
jsonl
csv
parquet
(must output to a file)
Use the --format
flag to specify the output format:
Output query results to a Parquet file
To output query results to a Parquet file, provide the following options with
the influxdb3 query
command:
--format
:parquet
-o
,--output
: the filepath to the Parquet file to store results in
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 3 Core and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.