Documentation

Explore data using InfluxQL

To start exploring data with InfluxQL, do the following:

  1. Verify your bucket has a database and retention policy (DBRP) mapping by listing DBRP mappings for your bucket. If not, create a new DBRP mapping.

  2. Configure timestamps in the InfluxQL shell.

  3. (Optional) If you would like to use the data used in the examples below, download the NOAA sample data.

  4. Use the InfluxQL SELECT statement with other key clauses to explore your data.

Download sample data

The example InfluxQL queries in this documentation use publicly available National Oceanic and Atmospheric Administration (NOAA) data.

To download a subset of NOAA data used in examples, run the script under NOAA water sample data (for example, copy and paste the script into your Data Explorer - Script Editor), and replace “example-org” in the script with the name of your InfluxDB organization.

Let’s get acquainted with this subsample of the data in the h2o_feet measurement:

Output:

Name: h2o_feet

time level description location water_level
2019-08-18T00:00:00Z between 6 and 9 feet coyote_creek 8.1200000000
2019-08-18T00:00:00Z below 3 feet santa_monica 2.0640000000
2019-08-18T00:06:00Z between 6 and 9 feet coyote_creek 8.0050000000
2019-08-18T00:06:00Z below 3 feet santa_monica 2.1160000000
2019-08-18T00:12:00Z between 6 and 9 feet coyote_creek 7.8870000000
2019-08-18T00:12:00Z below 3 feet santa_monica 2.0280000000

The data in the h2o_feet measurement occurs at six-minute time intervals. This measurement has one tag key (location) which has two tag values: coyote_creek and santa_monica. The measurement also has two fields: level description stores string field values and water_level stores float field values.

Configure timestamps in the InfluxQL shell

By default, the InfluxQL shell returns timestamps in nanosecond UNIX epoch format by default. To return human-readable RFC3339 timestamps instead of Unix nanosecond timestamps, use the precision helper command ` to configure the timestamp format:

precision rfc3339

The InfluxDB API returns timestamps in RFC3339 format by default. Specify alternative formats with the epoch query string parameter.


Was this page helpful?

Thank you for your feedback!


Introducing InfluxDB Clustered

A highly available InfluxDB 3.0 cluster on your own infrastructure.

InfluxDB Clustered is a highly available InfluxDB 3.0 cluster built for high write and query workloads on your own infrastructure.

InfluxDB Clustered is currently in limited availability and is only available to a limited group of InfluxData customers. If interested in being part of the limited access group, please contact the InfluxData Sales team.

Learn more
Contact InfluxData Sales

The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Flux is going into maintenance mode and will not be supported in InfluxDB 3.0. This was a decision based on the broad demand for SQL and the continued growth and adoption of InfluxQL. We are continuing to support Flux for users in 1.x and 2.x so you can continue using it with no changes to your code. If you are interested in transitioning to InfluxDB 3.0 and want to future-proof your code, we suggest using InfluxQL.

For information about the future of Flux, see the following:

InfluxDB Cloud powered by TSM