Merge pull request #573 from influxdata/Flux-intro

add Flux intro
pull/580/head
kelseiv 2019-10-30 11:51:20 -07:00 committed by GitHub
commit db9b539826
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 61 additions and 3 deletions

View File

@ -14,6 +14,11 @@ weight: 209
Flux provides `if`, `then`, and `else` conditional expressions that allow for powerful and flexible Flux queries.
If you're just getting started with Flux queries, check out the following:
- [Get started with Flux](/v2.0/query-data/get-started/) for a conceptual overview of Flux and parts of a Flux query.
- [Execute queries](/v2.0/query-data/execute-queries/) to discover a variety of ways to run your queries.
##### Conditional expression syntax
```js
// Pattern

View File

@ -25,6 +25,11 @@ exists p.height
// Returns false
```
If you're just getting started with Flux queries, check out the following:
- [Get started with Flux](/v2.0/query-data/get-started/) for a conceptual overview of Flux and parts of a Flux query.
- [Execute queries](/v2.0/query-data/execute-queries/) to discover a variety of ways to run your queries.
Use `exists` with row functions (
[`filter()`](/v2.0/reference/flux/stdlib/built-in/transformations/filter/),
[`map()`](/v2.0/reference/flux/stdlib/built-in/transformations/map/),

View File

@ -15,6 +15,11 @@ With Flux, you can group data by any column in your queried data set.
"Grouping" partitions data into tables in which each row shares a common value for specified columns.
This guide walks through grouping data in Flux and provides examples of how data is shaped in the process.
If you're just getting started with Flux queries, check out the following:
- [Get started with Flux](/v2.0/query-data/get-started/) for a conceptual overview of Flux and parts of a Flux query.
- [Execute queries](/v2.0/query-data/execute-queries/) to discover a variety of ways to run your queries.
## Group keys
Every table has a **group key** a list of columns which for which every row in the table has the same value.

View File

@ -9,11 +9,16 @@ menu:
weight: 208
---
Histograms provide valuable insight into the distribution of your data.
This guide walks through using Flux's `histogram()` function to transform your data into a **cumulative histogram**.
If you're just getting started with Flux queries, check out the following:
- [Get started with Flux](/v2.0/query-data/get-started/) for a conceptual overview of Flux and parts of a Flux query.
- [Execute queries](/v2.0/query-data/execute-queries/) to discover a variety of ways to run your queries.
## histogram() function
The [`histogram()` function](/v2.0/reference/flux/stdlib/built-in/transformations/histogram) approximates the
cumulative distribution of a dataset by counting data frequencies for a list of "bins."
A **bin** is simply a range in which a data point falls.

View File

@ -21,6 +21,11 @@ InfluxDB - memory usage and processes.
In this guide, we'll join two data streams, one representing memory usage and the other representing the
total number of running processes, then calculate the average memory usage per running process.
If you're just getting started with Flux queries, check out the following:
- [Get started with Flux](/v2.0/query-data/get-started/) for a conceptual overview of Flux and parts of a Flux query.
- [Execute queries](/v2.0/query-data/execute-queries/) to discover a variety of ways to run your queries.
## Define stream variables
In order to perform a join, you must have two streams of data.
Assign a variable to each data stream.

View File

@ -15,6 +15,11 @@ Use Flux to process and manipulate timestamps to suit your needs.
- [Convert timestamp format](#convert-timestamp-format)
- [Time-related Flux functions](#time-related-flux-functions)
If you're just getting started with Flux queries, check out the following:
- [Get started with Flux](/v2.0/query-data/get-started/) for a conceptual overview of Flux and parts of a Flux query.
- [Execute queries](/v2.0/query-data/execute-queries/) to discover a variety of ways to run your queries.
## Convert timestamp format
### Convert nanosecond epoch timestamp to RFC3339

View File

@ -15,6 +15,11 @@ supports mathematic expressions in data transformations.
This article describes how to use [Flux arithmetic operators](/v2.0/reference/flux/language/operators/#arithmetic-operators)
to "map" over data and transform values using mathematic operations.
If you're just getting started with Flux queries, check out the following:
- [Get started with Flux](/v2.0/query-data/get-started/) for a conceptual overview of Flux and parts of a Flux query.
- [Execute queries](/v2.0/query-data/execute-queries/) to discover a variety of ways to run your queries.
##### Basic mathematic operations
```js
// Examples executed using the Flux REPL

View File

@ -14,6 +14,11 @@ With Flux, regular expressions are primarily used for evaluation logic in predic
such as filtering rows, dropping and keeping columns, state detection, etc.
This guide shows how to use regular expressions in your Flux scripts.
If you're just getting started with Flux queries, check out the following:
- [Get started with Flux](/v2.0/query-data/get-started/) for a conceptual overview of Flux and parts of a Flux query.
- [Execute queries](/v2.0/query-data/execute-queries/) to discover a variety of ways to run your queries.
## Go regular expression syntax
Flux uses Go's [regexp package](https://golang.org/pkg/regexp/) for regular expression search.
The links [below](#helpful-links) provide information about Go's regular expression syntax.

View File

@ -14,6 +14,14 @@ weight: 206
The [`sort()`function](/v2.0/reference/flux/stdlib/built-in/transformations/sort)
orders the records within each table.
If you're just getting started with Flux queries, check out the following:
- [Get started with Flux](/v2.0/query-data/get-started/) for a conceptual overview of Flux and parts of a Flux query.
- [Execute queries](/v2.0/query-data/execute-queries/) to discover a variety of ways to run your queries.
##### Example sorting system uptime
The following example orders system uptime first by region, then host, then value.
```js

View File

@ -21,6 +21,11 @@ and use the results with InfluxDB dashboards, tasks, and other operations.
- [Use SQL results to populate dashboard variables](#use-sql-results-to-populate-dashboard-variables)
- [Sample sensor data](#sample-sensor-data)
If you're just getting started with Flux queries, check out the following:
- [Get started with Flux](/v2.0/query-data/get-started/) for a conceptual overview of Flux and parts of a Flux query.
- [Execute queries](/v2.0/query-data/execute-queries/) to discover a variety of ways to run your queries.
## Query a SQL data source
To query a SQL data source:

View File

@ -17,6 +17,11 @@ or "windowing" data, then aggregating windowed values into a new value.
This guide walks through windowing and aggregating data with Flux and demonstrates
how data is shaped in the process.
If you're just getting started with Flux queries, check out the following:
- [Get started with Flux](/v2.0/query-data/get-started/) for a conceptual overview of Flux and parts of a Flux query.
- [Execute queries](/v2.0/query-data/execute-queries/) to discover a variety of ways to run your queries.
{{% note %}}
The following example is an in-depth walk-through of the steps required to window and aggregate data.
The [`aggregateWindow()` function](#summing-up) performs these operations for you, but understanding

View File

@ -1,7 +1,7 @@
---
title: monitor.check() function
description: >
The `monitor.check()` function function checks input data and assigns a level
The `monitor.check()` function checks input data and assigns a level
(`ok`, `info`, `warn`, or `crit`) to each row based on predicate functions.
aliases:
- /v2.0/reference/flux/functions/monitor/check/
@ -12,7 +12,7 @@ menu:
weight: 202
---
The `monitor.check()` function function checks input data and assigns a level
The `monitor.check()` function checks input data and assigns a level
(`ok`, `info`, `warn`, or `crit`) to each row based on predicate functions.
_**Function type:** Transformation_