Related to "Query"
Query data in InfluxDB
Learn to query data stored in InfluxDB using Flux and tools such as the InfluxDB user interface and the ‘influx’ command line interface.
Get started with Flux
Get started with Flux, InfluxData’s functional data scripting language. This step-by-step guide through the basics of writing a Flux query.
influx query
The influx query
command executes a literal Flux query provided as a string or a literal Flux query contained in a file by specifying the file prefixed with an ‘@’ sign.
Query data with Flux
Guides that walk through both common and complex queries and use cases for Flux.
Query data with InfluxQL
Use the InfluxDB 1.x /query
compatibility endpoint to query data in InfluxDB Cloud and InfluxDB OSS 2.4 with InfluxQL.
Time To Become Readable
Time To Become Readable (TTBR) is the delay between when you write data to InfluxDB Cloud and when that data becomes queryable. TTBR is variable and is affected by many factors.
Execute queries
There are multiple ways to query data from InfluxDB including the InfluxDB UI, CLI, and API.
InfluxDB 1.x compatibility API
The InfluxDB v2 API includes InfluxDB 1.x compatibility endpoints that work with InfluxDB 1.x client libraries and third-party integrations like Grafana and others.
Optimize Flux queries
Optimize your Flux queries to reduce their memory and compute (CPU) requirements.
Use parameterized Flux queries
Use parameterized queries to re-use Flux queries and dynamically populate variables and prevent injection attacks.
Query fields and tags
Use the filter()
function to query data based on fields, tags, or any other column value. filter()
performs operations similar to the SELECT
statement and the WHERE
clause in InfluxQL and other SQL-like query languages.
Query in Data Explorer
Query your data in the InfluxDB user interface (UI) Data Explorer.
Query InfluxDB with Flux
Learn the basics of using Flux to query data from InfluxDB.
Query with the InfluxDB API
Use the InfluxDB API to query InfluxDB data.
Transform data with Flux
Learn the basics of using Flux to transform data queried from InfluxDB.
Query in the Flux REPL
Use the Flux REPL to query InfluxDB data.
Use the influx query command
Use the influx CLI to query InfluxDB data.
Calculate the increase
Use the increase()
function to track increases across multiple columns in a table. This function is especially useful when tracking changes in counter values that wrap over time or periodically reset.
Calculate the moving average
Use the movingAverage()
or timedMovingAverage()
functions to return the moving average of data.
Calculate the rate of change
Use the derivative()
function to calculate the rate of change between subsequent values or the aggregate.rate()
function to calculate the average rate of change per window of time. If time between points varies, these functions normalize points to a common time interval making values easily comparable.
Fill null values in data
Use the fill()
function to replace null values.
Find median values
Use the median()
function to return a value representing the 0.5
quantile (50th percentile) or median of input data.
Find percentile and quantile values
Use the quantile()
function to return all values within the q
quantile or percentile of input data.
Query cumulative sum
Use the cumulativeSum()
function to calculate a running total of values.
Query first and last values
Use the first()
or last()
functions to return the first or last point in an input table.
Query SQL data sources
The Flux sql
package provides functions for working with SQL data sources. Use sql.from()
to query SQL databases like PostgreSQL, MySQL, Snowflake, SQLite, Microsoft SQL Server, Amazon Athena, and Google BigQuery.
Query the Flux version
Use runtime.version()
to return the version of Flux installed in InfluxDB Cloud.
/query 1.x compatibility API
The /query
1.x compatibility endpoint queries InfluxDB Cloud using InfluxQL.