SlideShare une entreprise Scribd logo
1  sur  84
Scott Anderson
Sr. Technical Writer & Tech Lead
April 2021
Introduction to Flux &
Functional Data Scripting
© 2021 InfluxData. All rights reserved.
2
What is Flux?
A functional data scripting
language designed to query,
process, and act on data.
© 2021 InfluxData. All rights reserved.
3
Design Goals
– Turing-complete
– Useable
– Readable
– Flexible
– Extensible
– Testable
– Contributable
– Shareable
© 2021 InfluxData. All rights reserved.
4
How does
it work?
© 2021 InfluxData. All rights reserved.
5 © 2021 InfluxData. All rights reserved.
5
© 2021 InfluxData. All rights reserved.
6 © 2021 InfluxData. All rights reserved.
6
© 2021 InfluxData. All rights reserved.
7 © 2021 InfluxData. All rights reserved.
7
© 2021 InfluxData. All rights reserved.
8 © 2021 InfluxData. All rights reserved.
8
© 2021 InfluxData. All rights reserved.
9 © 2021 InfluxData. All rights reserved.
9
© 2021 InfluxData. All rights reserved.
10 © 2021 InfluxData. All rights reserved.
10
© 2021 InfluxData. All rights reserved.
11 © 2021 InfluxData. All rights reserved.
11
from(bucket: "system-data")
|> range(start: -1h)
|> filter(fn: (r) =>
r._measurement == "mem" and
r._field == "used_percent"
)
|> aggregateWindow(every: 5m, fn: mean)
© 2021 InfluxData. All rights reserved.
12
Data
Structure
© 2021 InfluxData. All rights reserved.
13 © 2021 InfluxData. All rights reserved.
13
© 2021 InfluxData. All rights reserved.
14 © 2021 InfluxData. All rights reserved.
14
© 2021 InfluxData. All rights reserved.
15 © 2021 InfluxData. All rights reserved.
15
Stream of tables
© 2021 InfluxData. All rights reserved.
16
Table
© 2021 InfluxData. All rights reserved.
17
version userID sessionID _field _value
Table
© 2021 InfluxData. All rights reserved.
18
version userID sessionID _field _value
v1 ex123 ex456 example 1.2
v1 ex123 ex456 example 2.2
v1 ex123 ex456 example 2.3
v2 ex123 ex456 example 1.9
v2 ex123 ex456 example 2.5
v2 ex123 ex456 example 3.1
Table
© 2021 InfluxData. All rights reserved.
19
version userID sessionID _field _value
v1 ex123 ex456 example 1.2
v1 ex123 ex456 example 2.2
v1 ex123 ex456 example 2.3
v2 ex123 ex456 example 1.9
v2 ex123 ex456 example 2.5
v2 ex123 ex456 example 3.1
Table
Group key: [ ]
© 2021 InfluxData. All rights reserved.
20
version userID sessionID _field _value
v1 ex123 ex456 example 1.2
v1 ex123 ex456 example 2.2
v1 ex123 ex456 example 2.3
Tables
Group key: ["version", "userID" ]
version userID sessionID _field _value
v2 ex123 ex456 example 1.9
v2 ex123 ex456 example 2.5
v2 ex123 ex456 example 3.1
© 2021 InfluxData. All rights reserved.
21
version userID sessionID _field _value
v1 ex123 ex456 example 1.2
v1 ex123 ex456 example 2.2
v1 ex123 ex456 example 2.3
Tables
Group key: ["version", "userID" ]
version userID sessionID _field _value
v2 ex123 ex456 example 1.9
v2 ex123 ex456 example 2.5
v2 ex123 ex456 example 3.1
© 2021 InfluxData. All rights reserved.
22 © 2021 InfluxData. All rights reserved.
22
sql.from(
driverName: "mysql",
dataSourceName: "${username}:${password}@tcp(localhost:3306)/db",
query:"SELECT CustomerName,City FROM Customers;"
)
CustomerName City
John Doe New York
Jane Seymour London
Rufus Peck San Francisco
Group key: [ ]
© 2021 InfluxData. All rights reserved.
23 © 2021 InfluxData. All rights reserved.
23
from(bucket: "example-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "m1" and r.field == "f1")
_start _stop _time _measurement host _field _value
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:09:00Z m1 host1 f1 1.2
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:28:00Z m1 host1 f1 2.5
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:39:00Z m1 host1 f1 2.2
_start _stop _time _measurement host _field _value
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:18:00Z m1 host2 f1 1.2
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:24:00Z m1 host2 f1 2.5
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:42:00Z m1 host2 f1 2.2
Group key: ["_start", "_stop", "_measurement", "host", "_field"]
© 2021 InfluxData. All rights reserved.
24
Flux
Syntax
© 2021 InfluxData. All rights reserved.
25 © 2021 InfluxData. All rights reserved.
25
Pipe-forward
|>
© 2021 InfluxData. All rights reserved.
26 © 2021 InfluxData. All rights reserved.
26
Basic data types
string "example string"
bool true
float 1.20
int 123456789
uint 123456789
duration 1h
time 2019-12-01T00:00:00Z
bytes [104 101 108 108 111]
© 2021 InfluxData. All rights reserved.
27 © 2021 InfluxData. All rights reserved.
27
Composite data types
record {key1: "value1", key2: 2.0}
array [12, 34, 56]
dict [1: "foo", 2: "bar"]
function f = (x) => x
© 2021 InfluxData. All rights reserved.
28 © 2021 InfluxData. All rights reserved.
28
Variable declarations
varName = varValue
foo = "bar"
bazRecord = {this: 1, that: 8}
data = from(...)
© 2021 InfluxData. All rights reserved.
29 © 2021 InfluxData. All rights reserved.
29
Reference composite types
r = {key1: "value1", key2: 2.0}
Dot notation
r.key1
Returns "value1"
Bracket notation
r["key1"]
Returns "value1"
© 2021 InfluxData. All rights reserved.
30 © 2021 InfluxData. All rights reserved.
30
Reference composite types
arr = [12, 34, 56]
Bracket notation
arr[0]
Returns 12
© 2021 InfluxData. All rights reserved.
31 © 2021 InfluxData. All rights reserved.
31
Reference composite types
dictEx = [1: "foo", 2: "bar"]
Function reference
dict.get(dict: dictEx, key: 1, default: "baz")
Returns "foo"
© 2021 InfluxData. All rights reserved.
32 © 2021 InfluxData. All rights reserved.
32
Reference composite types
dictEx = [1: "foo", 2: "bar"]
Function reference
dict.get(dict: dictEx, key: 3, default: "baz")
Returns "baz"
© 2021 InfluxData. All rights reserved.
33 © 2021 InfluxData. All rights reserved.
33
Reference composite types
r = {key1: "value1", key2: 2.0}
key = "key1"
r.key Returns an error
r.["key"] Returns an error
r.["${key}"] Returns an error
r = ["key1": "value1", "key2": "2.0"]
key = "key1"
dict.get(
dict: r,
key: key,
default: ""
) Returns "value1"
© 2021 InfluxData. All rights reserved.
34 © 2021 InfluxData. All rights reserved.
34
Functions
f = (x, y) => x / y
f(x: 12, y: 2)
Returns 6
© 2021 InfluxData. All rights reserved.
35 © 2021 InfluxData. All rights reserved.
35
Function types
Static
f = (x, y=2) => x / y
Transformation
f = (t=<-) => t
Predicate
(r) => r.key1 == "foo"
© 2021 InfluxData. All rights reserved.
36 © 2021 InfluxData. All rights reserved.
36
Predicate functions
(r) => 1.0 == 1.0
Parameter(s) Predicate Expression
© 2021 InfluxData. All rights reserved.
37 © 2021 InfluxData. All rights reserved.
37
Predicate functions
(r) => true
© 2021 InfluxData. All rights reserved.
38 © 2021 InfluxData. All rights reserved.
38
Predicate functions
(r) => 1.0 != 1.0
© 2021 InfluxData. All rights reserved.
39 © 2021 InfluxData. All rights reserved.
39
Predicate functions
(r) => false
© 2021 InfluxData. All rights reserved.
40 © 2021 InfluxData. All rights reserved.
40
{
Predicate functions
(r) => 1.0 > 1.0
== != < > <= >= =~ !~
© 2021 InfluxData. All rights reserved.
41 © 2021 InfluxData. All rights reserved.
41
Predicate functions
(r) => 1.0 == 1.0 and "foo" != "bar"
© 2021 InfluxData. All rights reserved.
42 © 2021 InfluxData. All rights reserved.
42
Predicate functions
(r) => true and true
© 2021 InfluxData. All rights reserved.
43 © 2021 InfluxData. All rights reserved.
43
Predicate functions
(r) => true
© 2021 InfluxData. All rights reserved.
44 © 2021 InfluxData. All rights reserved.
44
Predicate functions
(r) => 1.0 > 1.0 and "foo" != "bar"
© 2021 InfluxData. All rights reserved.
45 © 2021 InfluxData. All rights reserved.
45
Predicate functions
(r) => false and true
© 2021 InfluxData. All rights reserved.
46 © 2021 InfluxData. All rights reserved.
46
Predicate functions
(r) => false
© 2021 InfluxData. All rights reserved.
47 © 2021 InfluxData. All rights reserved.
47
Predicate functions
(r) => 1.0 > 1.0 or "foo" != "bar"
© 2021 InfluxData. All rights reserved.
48 © 2021 InfluxData. All rights reserved.
48
Predicate functions
(r) => true
© 2021 InfluxData. All rights reserved.
49 © 2021 InfluxData. All rights reserved.
49
Predicate functions
(r) =>
1.0 == 1.0 and
("foo" == "bar" or "baz" != "quz")
© 2021 InfluxData. All rights reserved.
50 © 2021 InfluxData. All rights reserved.
50
Predicate functions
r = {fname: "John", lname: "Doe", age: 42}
(r) => r.fname == "John" and r.age > 40
© 2021 InfluxData. All rights reserved.
51 © 2021 InfluxData. All rights reserved.
51
Predicate functions
r = {fname: "Mike", lname: "Smith", age: 29}
(r) => r.fname == "John" and r.age > 40
© 2021 InfluxData. All rights reserved.
52
Basic
Query
© 2021 InfluxData. All rights reserved.
53 © 2021 InfluxData. All rights reserved.
53
Basic Query
from(bucket: "system-data")
Source
© 2021 InfluxData. All rights reserved.
54 © 2021 InfluxData. All rights reserved.
54
Basic Query
sql.from(
driverName: "postgres",
dataSourceName: "...",
query: "..."
)
Source
© 2021 InfluxData. All rights reserved.
55 © 2021 InfluxData. All rights reserved.
55
Basic Query
csv.from(csv: "...")
Source
© 2021 InfluxData. All rights reserved.
56 © 2021 InfluxData. All rights reserved.
56
Basic Query
from(bucket: "system-data")
Source
© 2021 InfluxData. All rights reserved.
57 © 2021 InfluxData. All rights reserved.
57
Basic Query
from(bucket: "system-data")
|> range(start: -1h)
|> filter(fn: (r) =>
r._measurement == "mem" and
r._field == "used_percent")
Source
Filter
© 2021 InfluxData. All rights reserved.
58 © 2021 InfluxData. All rights reserved.
58
Basic Query
from(bucket: "system-data")
|> range(start: -1h)
|> filter(fn: (r) =>
r._measurement == "mem" and
r._field == "used_percent")
|> group(columns: ["host"])
Source
Filter
Shape
© 2021 InfluxData. All rights reserved.
59 © 2021 InfluxData. All rights reserved.
59
Basic Query
from(bucket: "system-data")
|> range(start: -1h)
|> filter(fn: (r) =>
r._measurement == "mem" and
r._field == "used_percent")
|> group(columns: ["host"])
|> mean()
Source
Filter
Shape
Process
© 2021 InfluxData. All rights reserved.
60 © 2021 InfluxData. All rights reserved.
60
Basic Query
from(bucket: "system-data")
|> range(start: -1h)
|> filter(fn: (r) =>
r._measurement == "mem" and
r._field == "used_percent")
|> group(columns: ["host"])
|> mean()
Source
Filter
Shape
Process
© 2021 InfluxData. All rights reserved.
61 © 2021 InfluxData. All rights reserved.
61
Process Data
data = from(bucket: "system-data")
|> range(start: -1h)
|> filter(fn: (r) =>
r._measurement == "mem" and
r._field == "used_percent"
)
© 2021 InfluxData. All rights reserved.
62 © 2021 InfluxData. All rights reserved.
62
_start _stop _time _measurement host _field _value
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:09:00Z mem host1 used_percent 62.1
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:28:00Z mem host1 used_percent 63.8
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:39:00Z mem host1 used_percent 65.4
_start _stop _time _measurement host _field _value
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:18:00Z mem host2 used_percent 44.0
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:24:00Z mem host2 used_percent 52.4
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:42:00Z mem host2 used_percent 50.7
Process Data
© 2021 InfluxData. All rights reserved.
63 © 2021 InfluxData. All rights reserved.
63
Process Data
data
|> map(fn: (r) => ({_time: r._time, _value: r._value}))
© 2021 InfluxData. All rights reserved.
64 © 2021 InfluxData. All rights reserved.
64
_time _value
2021-01-01T00:09:00Z 62.1
2021-01-01T00:18:00Z 44.0
2021-01-01T00:24:00Z 52.4
2021-01-01T00:28:00Z 63.8
2021-01-01T00:39:00Z 65.4
2021-01-01T00:42:00Z 50.7
Process Data
© 2021 InfluxData. All rights reserved.
65 © 2021 InfluxData. All rights reserved.
65
Process Data
data
|> map(fn: (r) => ({r with _value: r._value * 0.01}))
© 2021 InfluxData. All rights reserved.
66 © 2021 InfluxData. All rights reserved.
66
_start _stop _time _measurement host _field _value
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:09:00Z mem host1 used_percent 0.621
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:28:00Z mem host1 used_percent 0.638
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:39:00Z mem host1 used_percent 0.654
_start _stop _time _measurement host _field _value
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:18:00Z mem host2 used_percent 0.44
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:24:00Z mem host2 used_percent 0.524
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:42:00Z mem host2 used_percent 0.507
Process Data
© 2021 InfluxData. All rights reserved.
67 © 2021 InfluxData. All rights reserved.
67
Process Data
data
|> map(fn: (r) => ({
r with
state: if r._value > 65.0 then "high" else "ok"
}))
© 2021 InfluxData. All rights reserved.
68 © 2021 InfluxData. All rights reserved.
68
_start _stop _time _measurement host _field _value state
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-
01T00:09:00Z
mem host1 used_percent 62.1 ok
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-
01T00:28:00Z
mem host1 used_percent 63.8 ok
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:39:00Z mem host1 used_percent 65.4 high
_start _stop _time _measurement host _field _value state
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:18:00Z mem host2 used_percent 44.0 ok
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-
01T00:24:00Z
mem host2 used_percent 52.4 ok
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-
01T00:42:00Z
mem host2 used_percent 50.7 ok
Process Data
© 2021 InfluxData. All rights reserved.
69 © 2021 InfluxData. All rights reserved.
69
Process Data
data |> mean()
© 2021 InfluxData. All rights reserved.
70
|> mean()
© 2021 InfluxData. All rights reserved.
71 © 2021 InfluxData. All rights reserved.
71
_start _stop _time _measurement host _field _value
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:09:00Z mem host1 used_percent 62.1
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:28:00Z mem host1 used_percent 63.8
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:39:00Z mem host1 used_percent 65.4
_start _stop _time _measurement host _field _value
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:18:00Z mem host2 used_percent 44.0
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:24:00Z mem host2 used_percent 52.4
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:42:00Z mem host2 used_percent 50.7
Process Data
© 2021 InfluxData. All rights reserved.
72 © 2021 InfluxData. All rights reserved.
72
_start _stop _measurement host _field _value
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z mem host1 used_percent 63.8
_start _stop _measurement host _field _value
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z mem host2 used_percent 49.0
Process Data
© 2021 InfluxData. All rights reserved.
73 © 2021 InfluxData. All rights reserved.
73
Process Data
data |> sum()
© 2021 InfluxData. All rights reserved.
74 © 2021 InfluxData. All rights reserved.
74
_start _stop _measurement host _field _value
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z mem host1 used_percent 191.3
_start _stop _measurement host _field _value
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z mem host2 used_percent 147.1
Process Data
© 2021 InfluxData. All rights reserved.
75 © 2021 InfluxData. All rights reserved.
75
Process Data
data |> max()
© 2021 InfluxData. All rights reserved.
76 © 2021 InfluxData. All rights reserved.
76
_start _stop _time _measurement host _field _value
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:39:00Z mem host1 used_percent 65.4
_start _stop _time _measurement host _field _value
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:24:00Z mem host2 used_percent 52.4
Process Data
© 2021 InfluxData. All rights reserved.
77 © 2021 InfluxData. All rights reserved.
77
Process Data
data |> last()
© 2021 InfluxData. All rights reserved.
78 © 2021 InfluxData. All rights reserved.
78
_start _stop _time _measurement host _field _value
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:39:00Z mem host1 used_percent 65.4
_start _stop _time _measurement host _field _value
2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:42:00Z mem host2 used_percent 50.7
Process Data
© 2021 InfluxData. All rights reserved.
79
Flux in
Practice
© 2021 InfluxData. All rights reserved.
80 © 2021 InfluxData. All rights reserved.
80
from(bucket: "market-summary")
|> range(start: -6mo)
|> filter(fn: (r) =>
r._measurement == "stockPrices" and
r.symbol == "GME"
)
|> holtWinters(n: 24, seasonality: 12, interval: 1w)
© 2021 InfluxData. All rights reserved.
81 © 2021 InfluxData. All rights reserved.
81
heatIndex = (t, h) => //...
from(bucket: "sensor-data")
|> range(start: -1d)
|> filter(fn: (r) => r._measurement == "sensors")
|> filter(fn: (r) => r._field == "temp" or r._field == "hum")
|> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")
|> map(fn: (r) => ({ r with heatIndex: heatIndex(t: r.temp, h: r.hum) }))
© 2021 InfluxData. All rights reserved.
82 © 2021 InfluxData. All rights reserved.
82
import "sql"
sensorInfo = sql.from(
driverName: "postgres",
dataSourceName: "postgresql://localhost?sslmode=disable",
query: "SELECT * FROM sensors"
)
sensorMetrics = from(bucket: "example-bucket")
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == "airSensors")
join(tables: {metric: sensorMetrics, info: sensorInfo}, on: ["sensor_id"])
|> group(columns: ["sensor_id", "lastInspected"]),
|> aggregateWindow(
every: 5m,
fn: (tables=<-, column="error") => tables |> count(column: column)
)
Thank You
We look forward to bringing together our
community of developers to learn, interact
and share tips and use cases.
10-11 May 2021
Hands-On Flux Training
18-19 May 2021
Virtual Experience
www.influxdays.com/emea-2021-virtual-experience/

Contenu connexe

Tendances

Inside the InfluxDB storage engine
Inside the InfluxDB storage engineInside the InfluxDB storage engine
Inside the InfluxDB storage engineInfluxData
 
How an Open Marine Standard, InfluxDB and Grafana Are Used to Improve Boating...
How an Open Marine Standard, InfluxDB and Grafana Are Used to Improve Boating...How an Open Marine Standard, InfluxDB and Grafana Are Used to Improve Boating...
How an Open Marine Standard, InfluxDB and Grafana Are Used to Improve Boating...InfluxData
 
Alan Pope, Sebastian Spaink [InfluxData] | Data Collection 101 | InfluxDays N...
Alan Pope, Sebastian Spaink [InfluxData] | Data Collection 101 | InfluxDays N...Alan Pope, Sebastian Spaink [InfluxData] | Data Collection 101 | InfluxDays N...
Alan Pope, Sebastian Spaink [InfluxData] | Data Collection 101 | InfluxDays N...InfluxData
 
Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...
Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...
Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...InfluxData
 
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOxInfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOxInfluxData
 
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...InfluxData
 
Anais Dotis-Georgiou & Steven Soroka [InfluxData] | Machine Learning with Tel...
Anais Dotis-Georgiou & Steven Soroka [InfluxData] | Machine Learning with Tel...Anais Dotis-Georgiou & Steven Soroka [InfluxData] | Machine Learning with Tel...
Anais Dotis-Georgiou & Steven Soroka [InfluxData] | Machine Learning with Tel...InfluxData
 
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...InfluxData
 
Taming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using TelegrafTaming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using TelegrafInfluxData
 
Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Gira...
Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Gira...Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Gira...
Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Gira...InfluxData
 
Kapacitor - Real Time Data Processing Engine
Kapacitor - Real Time Data Processing EngineKapacitor - Real Time Data Processing Engine
Kapacitor - Real Time Data Processing EnginePrashant Vats
 
Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...
Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...
Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...InfluxData
 
Optimizing InfluxDB Performance in the Real World | Sam Dillard | InfluxData
Optimizing InfluxDB Performance in the Real World | Sam Dillard | InfluxDataOptimizing InfluxDB Performance in the Real World | Sam Dillard | InfluxData
Optimizing InfluxDB Performance in the Real World | Sam Dillard | InfluxDataInfluxData
 
Catalogs - Turning a Set of Parquet Files into a Data Set
Catalogs - Turning a Set of Parquet Files into a Data SetCatalogs - Turning a Set of Parquet Files into a Data Set
Catalogs - Turning a Set of Parquet Files into a Data SetInfluxData
 
Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...
Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...
Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...InfluxData
 
InfluxDB 101 - Concepts and Architecture | Michael DeSa | InfluxData
InfluxDB 101 - Concepts and Architecture | Michael DeSa | InfluxDataInfluxDB 101 - Concepts and Architecture | Michael DeSa | InfluxData
InfluxDB 101 - Concepts and Architecture | Michael DeSa | InfluxDataInfluxData
 
How to Build a Telegraf Plugin by Noah Crowley
How to Build a Telegraf Plugin by Noah CrowleyHow to Build a Telegraf Plugin by Noah Crowley
How to Build a Telegraf Plugin by Noah CrowleyInfluxData
 
Fast Insight from Fast Data: Integrating ClickHouse and Apache Kafka
Fast Insight from Fast Data: Integrating ClickHouse and Apache KafkaFast Insight from Fast Data: Integrating ClickHouse and Apache Kafka
Fast Insight from Fast Data: Integrating ClickHouse and Apache KafkaAltinity Ltd
 
Extending Flux - Writing Your Own Functions by Adam Anthony
Extending Flux - Writing Your Own Functions by Adam AnthonyExtending Flux - Writing Your Own Functions by Adam Anthony
Extending Flux - Writing Your Own Functions by Adam AnthonyInfluxData
 
Scaling up data science applications
Scaling up data science applicationsScaling up data science applications
Scaling up data science applicationsKexin Xie
 

Tendances (20)

Inside the InfluxDB storage engine
Inside the InfluxDB storage engineInside the InfluxDB storage engine
Inside the InfluxDB storage engine
 
How an Open Marine Standard, InfluxDB and Grafana Are Used to Improve Boating...
How an Open Marine Standard, InfluxDB and Grafana Are Used to Improve Boating...How an Open Marine Standard, InfluxDB and Grafana Are Used to Improve Boating...
How an Open Marine Standard, InfluxDB and Grafana Are Used to Improve Boating...
 
Alan Pope, Sebastian Spaink [InfluxData] | Data Collection 101 | InfluxDays N...
Alan Pope, Sebastian Spaink [InfluxData] | Data Collection 101 | InfluxDays N...Alan Pope, Sebastian Spaink [InfluxData] | Data Collection 101 | InfluxDays N...
Alan Pope, Sebastian Spaink [InfluxData] | Data Collection 101 | InfluxDays N...
 
Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...
Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...
Extending Flux to Support Other Databases and Data Stores | Adam Anthony | In...
 
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOxInfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
InfluxDB IOx Tech Talks: Query Processing in InfluxDB IOx
 
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
Optimizing InfluxDB Performance in the Real World by Dean Sheehan, Senior Dir...
 
Anais Dotis-Georgiou & Steven Soroka [InfluxData] | Machine Learning with Tel...
Anais Dotis-Georgiou & Steven Soroka [InfluxData] | Machine Learning with Tel...Anais Dotis-Georgiou & Steven Soroka [InfluxData] | Machine Learning with Tel...
Anais Dotis-Georgiou & Steven Soroka [InfluxData] | Machine Learning with Tel...
 
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
 
Taming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using TelegrafTaming the Tiger: Tips and Tricks for Using Telegraf
Taming the Tiger: Tips and Tricks for Using Telegraf
 
Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Gira...
Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Gira...Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Gira...
Meet the Experts: Visualize Your Time-Stamped Data Using the React-Based Gira...
 
Kapacitor - Real Time Data Processing Engine
Kapacitor - Real Time Data Processing EngineKapacitor - Real Time Data Processing Engine
Kapacitor - Real Time Data Processing Engine
 
Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...
Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...
Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...
 
Optimizing InfluxDB Performance in the Real World | Sam Dillard | InfluxData
Optimizing InfluxDB Performance in the Real World | Sam Dillard | InfluxDataOptimizing InfluxDB Performance in the Real World | Sam Dillard | InfluxData
Optimizing InfluxDB Performance in the Real World | Sam Dillard | InfluxData
 
Catalogs - Turning a Set of Parquet Files into a Data Set
Catalogs - Turning a Set of Parquet Files into a Data SetCatalogs - Turning a Set of Parquet Files into a Data Set
Catalogs - Turning a Set of Parquet Files into a Data Set
 
Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...
Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...
Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...
 
InfluxDB 101 - Concepts and Architecture | Michael DeSa | InfluxData
InfluxDB 101 - Concepts and Architecture | Michael DeSa | InfluxDataInfluxDB 101 - Concepts and Architecture | Michael DeSa | InfluxData
InfluxDB 101 - Concepts and Architecture | Michael DeSa | InfluxData
 
How to Build a Telegraf Plugin by Noah Crowley
How to Build a Telegraf Plugin by Noah CrowleyHow to Build a Telegraf Plugin by Noah Crowley
How to Build a Telegraf Plugin by Noah Crowley
 
Fast Insight from Fast Data: Integrating ClickHouse and Apache Kafka
Fast Insight from Fast Data: Integrating ClickHouse and Apache KafkaFast Insight from Fast Data: Integrating ClickHouse and Apache Kafka
Fast Insight from Fast Data: Integrating ClickHouse and Apache Kafka
 
Extending Flux - Writing Your Own Functions by Adam Anthony
Extending Flux - Writing Your Own Functions by Adam AnthonyExtending Flux - Writing Your Own Functions by Adam Anthony
Extending Flux - Writing Your Own Functions by Adam Anthony
 
Scaling up data science applications
Scaling up data science applicationsScaling up data science applications
Scaling up data science applications
 

Similaire à Introduction to Flux and Functional Data Scripting

Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...InfluxData
 
Scott Anderson [InfluxData] | Flux Alerts and Notifications | InfluxDays NA 2021
Scott Anderson [InfluxData] | Flux Alerts and Notifications | InfluxDays NA 2021Scott Anderson [InfluxData] | Flux Alerts and Notifications | InfluxDays NA 2021
Scott Anderson [InfluxData] | Flux Alerts and Notifications | InfluxDays NA 2021InfluxData
 
Go Programming Patterns
Go Programming PatternsGo Programming Patterns
Go Programming PatternsHao Chen
 
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...confluent
 
Ecto DSL Introduction - Yurii Bodarev
Ecto DSL Introduction - Yurii BodarevEcto DSL Introduction - Yurii Bodarev
Ecto DSL Introduction - Yurii BodarevElixir Club
 
Yurii Bodarev - Ecto DSL
Yurii Bodarev - Ecto DSLYurii Bodarev - Ecto DSL
Yurii Bodarev - Ecto DSLElixir Club
 
Lex (lexical analyzer)
Lex (lexical analyzer)Lex (lexical analyzer)
Lex (lexical analyzer)Sami Said
 
Spark Summit EU talk by Herman van Hovell
Spark Summit EU talk by Herman van HovellSpark Summit EU talk by Herman van Hovell
Spark Summit EU talk by Herman van HovellSpark Summit
 
T3chFest 2016 - The polyglot programmer
T3chFest 2016 - The polyglot programmerT3chFest 2016 - The polyglot programmer
T3chFest 2016 - The polyglot programmerDavid Muñoz Díaz
 
sonam Kumari python.ppt
sonam Kumari python.pptsonam Kumari python.ppt
sonam Kumari python.pptssuserd64918
 
Developing Your Own Flux Packages by David McKay | Head of Developer Relation...
Developing Your Own Flux Packages by David McKay | Head of Developer Relation...Developing Your Own Flux Packages by David McKay | Head of Developer Relation...
Developing Your Own Flux Packages by David McKay | Head of Developer Relation...InfluxData
 
A Proposition for Business Process Modeling
A Proposition for Business Process ModelingA Proposition for Business Process Modeling
A Proposition for Business Process ModelingAng Chen
 
Programming languages
Programming languagesProgramming languages
Programming languagesEelco Visser
 

Similaire à Introduction to Flux and Functional Data Scripting (20)

Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
Anais Dotis-Georgiou & Faith Chikwekwe [InfluxData] | Top 10 Hurdles for Flux...
 
Scott Anderson [InfluxData] | Flux Alerts and Notifications | InfluxDays NA 2021
Scott Anderson [InfluxData] | Flux Alerts and Notifications | InfluxDays NA 2021Scott Anderson [InfluxData] | Flux Alerts and Notifications | InfluxDays NA 2021
Scott Anderson [InfluxData] | Flux Alerts and Notifications | InfluxDays NA 2021
 
Go Programming Patterns
Go Programming PatternsGo Programming Patterns
Go Programming Patterns
 
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...
Data-Oriented Programming with Clojure and Jackdaw (Charles Reese, Funding Ci...
 
Ecto DSL Introduction - Yurii Bodarev
Ecto DSL Introduction - Yurii BodarevEcto DSL Introduction - Yurii Bodarev
Ecto DSL Introduction - Yurii Bodarev
 
Yurii Bodarev - Ecto DSL
Yurii Bodarev - Ecto DSLYurii Bodarev - Ecto DSL
Yurii Bodarev - Ecto DSL
 
Functional CNN in elixir
Functional CNN in elixirFunctional CNN in elixir
Functional CNN in elixir
 
Lex (lexical analyzer)
Lex (lexical analyzer)Lex (lexical analyzer)
Lex (lexical analyzer)
 
Spark Summit EU talk by Herman van Hovell
Spark Summit EU talk by Herman van HovellSpark Summit EU talk by Herman van Hovell
Spark Summit EU talk by Herman van Hovell
 
functions
functionsfunctions
functions
 
Python (1)
Python (1)Python (1)
Python (1)
 
F sharp - an overview
F sharp - an overviewF sharp - an overview
F sharp - an overview
 
T3chFest 2016 - The polyglot programmer
T3chFest 2016 - The polyglot programmerT3chFest 2016 - The polyglot programmer
T3chFest 2016 - The polyglot programmer
 
Javascript.ppt
Javascript.pptJavascript.ppt
Javascript.ppt
 
sonam Kumari python.ppt
sonam Kumari python.pptsonam Kumari python.ppt
sonam Kumari python.ppt
 
HDL.pptx
HDL.pptxHDL.pptx
HDL.pptx
 
Type and proof structures for concurrency
Type and proof structures for concurrencyType and proof structures for concurrency
Type and proof structures for concurrency
 
Developing Your Own Flux Packages by David McKay | Head of Developer Relation...
Developing Your Own Flux Packages by David McKay | Head of Developer Relation...Developing Your Own Flux Packages by David McKay | Head of Developer Relation...
Developing Your Own Flux Packages by David McKay | Head of Developer Relation...
 
A Proposition for Business Process Modeling
A Proposition for Business Process ModelingA Proposition for Business Process Modeling
A Proposition for Business Process Modeling
 
Programming languages
Programming languagesProgramming languages
Programming languages
 

Plus de InfluxData

Announcing InfluxDB Clustered
Announcing InfluxDB ClusteredAnnouncing InfluxDB Clustered
Announcing InfluxDB ClusteredInfluxData
 
Best Practices for Leveraging the Apache Arrow Ecosystem
Best Practices for Leveraging the Apache Arrow EcosystemBest Practices for Leveraging the Apache Arrow Ecosystem
Best Practices for Leveraging the Apache Arrow EcosystemInfluxData
 
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...InfluxData
 
Power Your Predictive Analytics with InfluxDB
Power Your Predictive Analytics with InfluxDBPower Your Predictive Analytics with InfluxDB
Power Your Predictive Analytics with InfluxDBInfluxData
 
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base InfluxData
 
Build an Edge-to-Cloud Solution with the MING Stack
Build an Edge-to-Cloud Solution with the MING StackBuild an Edge-to-Cloud Solution with the MING Stack
Build an Edge-to-Cloud Solution with the MING StackInfluxData
 
Meet the Founders: An Open Discussion About Rewriting Using Rust
Meet the Founders: An Open Discussion About Rewriting Using RustMeet the Founders: An Open Discussion About Rewriting Using Rust
Meet the Founders: An Open Discussion About Rewriting Using RustInfluxData
 
Introducing InfluxDB Cloud Dedicated
Introducing InfluxDB Cloud DedicatedIntroducing InfluxDB Cloud Dedicated
Introducing InfluxDB Cloud DedicatedInfluxData
 
Gain Better Observability with OpenTelemetry and InfluxDB
Gain Better Observability with OpenTelemetry and InfluxDB Gain Better Observability with OpenTelemetry and InfluxDB
Gain Better Observability with OpenTelemetry and InfluxDB InfluxData
 
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...InfluxData
 
How Delft University's Engineering Students Make Their EV Formula-Style Race ...
How Delft University's Engineering Students Make Their EV Formula-Style Race ...How Delft University's Engineering Students Make Their EV Formula-Style Race ...
How Delft University's Engineering Students Make Their EV Formula-Style Race ...InfluxData
 
Introducing InfluxDB’s New Time Series Database Storage Engine
Introducing InfluxDB’s New Time Series Database Storage EngineIntroducing InfluxDB’s New Time Series Database Storage Engine
Introducing InfluxDB’s New Time Series Database Storage EngineInfluxData
 
Start Automating InfluxDB Deployments at the Edge with balena
Start Automating InfluxDB Deployments at the Edge with balena Start Automating InfluxDB Deployments at the Edge with balena
Start Automating InfluxDB Deployments at the Edge with balena InfluxData
 
Understanding InfluxDB’s New Storage Engine
Understanding InfluxDB’s New Storage EngineUnderstanding InfluxDB’s New Storage Engine
Understanding InfluxDB’s New Storage EngineInfluxData
 
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDBStreamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDBInfluxData
 
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...InfluxData
 
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022InfluxData
 
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022InfluxData
 
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...InfluxData
 
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022InfluxData
 

Plus de InfluxData (20)

Announcing InfluxDB Clustered
Announcing InfluxDB ClusteredAnnouncing InfluxDB Clustered
Announcing InfluxDB Clustered
 
Best Practices for Leveraging the Apache Arrow Ecosystem
Best Practices for Leveraging the Apache Arrow EcosystemBest Practices for Leveraging the Apache Arrow Ecosystem
Best Practices for Leveraging the Apache Arrow Ecosystem
 
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
 
Power Your Predictive Analytics with InfluxDB
Power Your Predictive Analytics with InfluxDBPower Your Predictive Analytics with InfluxDB
Power Your Predictive Analytics with InfluxDB
 
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
 
Build an Edge-to-Cloud Solution with the MING Stack
Build an Edge-to-Cloud Solution with the MING StackBuild an Edge-to-Cloud Solution with the MING Stack
Build an Edge-to-Cloud Solution with the MING Stack
 
Meet the Founders: An Open Discussion About Rewriting Using Rust
Meet the Founders: An Open Discussion About Rewriting Using RustMeet the Founders: An Open Discussion About Rewriting Using Rust
Meet the Founders: An Open Discussion About Rewriting Using Rust
 
Introducing InfluxDB Cloud Dedicated
Introducing InfluxDB Cloud DedicatedIntroducing InfluxDB Cloud Dedicated
Introducing InfluxDB Cloud Dedicated
 
Gain Better Observability with OpenTelemetry and InfluxDB
Gain Better Observability with OpenTelemetry and InfluxDB Gain Better Observability with OpenTelemetry and InfluxDB
Gain Better Observability with OpenTelemetry and InfluxDB
 
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
 
How Delft University's Engineering Students Make Their EV Formula-Style Race ...
How Delft University's Engineering Students Make Their EV Formula-Style Race ...How Delft University's Engineering Students Make Their EV Formula-Style Race ...
How Delft University's Engineering Students Make Their EV Formula-Style Race ...
 
Introducing InfluxDB’s New Time Series Database Storage Engine
Introducing InfluxDB’s New Time Series Database Storage EngineIntroducing InfluxDB’s New Time Series Database Storage Engine
Introducing InfluxDB’s New Time Series Database Storage Engine
 
Start Automating InfluxDB Deployments at the Edge with balena
Start Automating InfluxDB Deployments at the Edge with balena Start Automating InfluxDB Deployments at the Edge with balena
Start Automating InfluxDB Deployments at the Edge with balena
 
Understanding InfluxDB’s New Storage Engine
Understanding InfluxDB’s New Storage EngineUnderstanding InfluxDB’s New Storage Engine
Understanding InfluxDB’s New Storage Engine
 
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDBStreamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
 
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
 
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
 
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
 
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
 
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
 

Dernier

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 

Dernier (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Introduction to Flux and Functional Data Scripting

  • 1. Scott Anderson Sr. Technical Writer & Tech Lead April 2021 Introduction to Flux & Functional Data Scripting
  • 2. © 2021 InfluxData. All rights reserved. 2 What is Flux? A functional data scripting language designed to query, process, and act on data.
  • 3. © 2021 InfluxData. All rights reserved. 3 Design Goals – Turing-complete – Useable – Readable – Flexible – Extensible – Testable – Contributable – Shareable
  • 4. © 2021 InfluxData. All rights reserved. 4 How does it work?
  • 5. © 2021 InfluxData. All rights reserved. 5 © 2021 InfluxData. All rights reserved. 5
  • 6. © 2021 InfluxData. All rights reserved. 6 © 2021 InfluxData. All rights reserved. 6
  • 7. © 2021 InfluxData. All rights reserved. 7 © 2021 InfluxData. All rights reserved. 7
  • 8. © 2021 InfluxData. All rights reserved. 8 © 2021 InfluxData. All rights reserved. 8
  • 9. © 2021 InfluxData. All rights reserved. 9 © 2021 InfluxData. All rights reserved. 9
  • 10. © 2021 InfluxData. All rights reserved. 10 © 2021 InfluxData. All rights reserved. 10
  • 11. © 2021 InfluxData. All rights reserved. 11 © 2021 InfluxData. All rights reserved. 11 from(bucket: "system-data") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "mem" and r._field == "used_percent" ) |> aggregateWindow(every: 5m, fn: mean)
  • 12. © 2021 InfluxData. All rights reserved. 12 Data Structure
  • 13. © 2021 InfluxData. All rights reserved. 13 © 2021 InfluxData. All rights reserved. 13
  • 14. © 2021 InfluxData. All rights reserved. 14 © 2021 InfluxData. All rights reserved. 14
  • 15. © 2021 InfluxData. All rights reserved. 15 © 2021 InfluxData. All rights reserved. 15 Stream of tables
  • 16. © 2021 InfluxData. All rights reserved. 16 Table
  • 17. © 2021 InfluxData. All rights reserved. 17 version userID sessionID _field _value Table
  • 18. © 2021 InfluxData. All rights reserved. 18 version userID sessionID _field _value v1 ex123 ex456 example 1.2 v1 ex123 ex456 example 2.2 v1 ex123 ex456 example 2.3 v2 ex123 ex456 example 1.9 v2 ex123 ex456 example 2.5 v2 ex123 ex456 example 3.1 Table
  • 19. © 2021 InfluxData. All rights reserved. 19 version userID sessionID _field _value v1 ex123 ex456 example 1.2 v1 ex123 ex456 example 2.2 v1 ex123 ex456 example 2.3 v2 ex123 ex456 example 1.9 v2 ex123 ex456 example 2.5 v2 ex123 ex456 example 3.1 Table Group key: [ ]
  • 20. © 2021 InfluxData. All rights reserved. 20 version userID sessionID _field _value v1 ex123 ex456 example 1.2 v1 ex123 ex456 example 2.2 v1 ex123 ex456 example 2.3 Tables Group key: ["version", "userID" ] version userID sessionID _field _value v2 ex123 ex456 example 1.9 v2 ex123 ex456 example 2.5 v2 ex123 ex456 example 3.1
  • 21. © 2021 InfluxData. All rights reserved. 21 version userID sessionID _field _value v1 ex123 ex456 example 1.2 v1 ex123 ex456 example 2.2 v1 ex123 ex456 example 2.3 Tables Group key: ["version", "userID" ] version userID sessionID _field _value v2 ex123 ex456 example 1.9 v2 ex123 ex456 example 2.5 v2 ex123 ex456 example 3.1
  • 22. © 2021 InfluxData. All rights reserved. 22 © 2021 InfluxData. All rights reserved. 22 sql.from( driverName: "mysql", dataSourceName: "${username}:${password}@tcp(localhost:3306)/db", query:"SELECT CustomerName,City FROM Customers;" ) CustomerName City John Doe New York Jane Seymour London Rufus Peck San Francisco Group key: [ ]
  • 23. © 2021 InfluxData. All rights reserved. 23 © 2021 InfluxData. All rights reserved. 23 from(bucket: "example-bucket") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "m1" and r.field == "f1") _start _stop _time _measurement host _field _value 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:09:00Z m1 host1 f1 1.2 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:28:00Z m1 host1 f1 2.5 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:39:00Z m1 host1 f1 2.2 _start _stop _time _measurement host _field _value 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:18:00Z m1 host2 f1 1.2 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:24:00Z m1 host2 f1 2.5 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:42:00Z m1 host2 f1 2.2 Group key: ["_start", "_stop", "_measurement", "host", "_field"]
  • 24. © 2021 InfluxData. All rights reserved. 24 Flux Syntax
  • 25. © 2021 InfluxData. All rights reserved. 25 © 2021 InfluxData. All rights reserved. 25 Pipe-forward |>
  • 26. © 2021 InfluxData. All rights reserved. 26 © 2021 InfluxData. All rights reserved. 26 Basic data types string "example string" bool true float 1.20 int 123456789 uint 123456789 duration 1h time 2019-12-01T00:00:00Z bytes [104 101 108 108 111]
  • 27. © 2021 InfluxData. All rights reserved. 27 © 2021 InfluxData. All rights reserved. 27 Composite data types record {key1: "value1", key2: 2.0} array [12, 34, 56] dict [1: "foo", 2: "bar"] function f = (x) => x
  • 28. © 2021 InfluxData. All rights reserved. 28 © 2021 InfluxData. All rights reserved. 28 Variable declarations varName = varValue foo = "bar" bazRecord = {this: 1, that: 8} data = from(...)
  • 29. © 2021 InfluxData. All rights reserved. 29 © 2021 InfluxData. All rights reserved. 29 Reference composite types r = {key1: "value1", key2: 2.0} Dot notation r.key1 Returns "value1" Bracket notation r["key1"] Returns "value1"
  • 30. © 2021 InfluxData. All rights reserved. 30 © 2021 InfluxData. All rights reserved. 30 Reference composite types arr = [12, 34, 56] Bracket notation arr[0] Returns 12
  • 31. © 2021 InfluxData. All rights reserved. 31 © 2021 InfluxData. All rights reserved. 31 Reference composite types dictEx = [1: "foo", 2: "bar"] Function reference dict.get(dict: dictEx, key: 1, default: "baz") Returns "foo"
  • 32. © 2021 InfluxData. All rights reserved. 32 © 2021 InfluxData. All rights reserved. 32 Reference composite types dictEx = [1: "foo", 2: "bar"] Function reference dict.get(dict: dictEx, key: 3, default: "baz") Returns "baz"
  • 33. © 2021 InfluxData. All rights reserved. 33 © 2021 InfluxData. All rights reserved. 33 Reference composite types r = {key1: "value1", key2: 2.0} key = "key1" r.key Returns an error r.["key"] Returns an error r.["${key}"] Returns an error r = ["key1": "value1", "key2": "2.0"] key = "key1" dict.get( dict: r, key: key, default: "" ) Returns "value1"
  • 34. © 2021 InfluxData. All rights reserved. 34 © 2021 InfluxData. All rights reserved. 34 Functions f = (x, y) => x / y f(x: 12, y: 2) Returns 6
  • 35. © 2021 InfluxData. All rights reserved. 35 © 2021 InfluxData. All rights reserved. 35 Function types Static f = (x, y=2) => x / y Transformation f = (t=<-) => t Predicate (r) => r.key1 == "foo"
  • 36. © 2021 InfluxData. All rights reserved. 36 © 2021 InfluxData. All rights reserved. 36 Predicate functions (r) => 1.0 == 1.0 Parameter(s) Predicate Expression
  • 37. © 2021 InfluxData. All rights reserved. 37 © 2021 InfluxData. All rights reserved. 37 Predicate functions (r) => true
  • 38. © 2021 InfluxData. All rights reserved. 38 © 2021 InfluxData. All rights reserved. 38 Predicate functions (r) => 1.0 != 1.0
  • 39. © 2021 InfluxData. All rights reserved. 39 © 2021 InfluxData. All rights reserved. 39 Predicate functions (r) => false
  • 40. © 2021 InfluxData. All rights reserved. 40 © 2021 InfluxData. All rights reserved. 40 { Predicate functions (r) => 1.0 > 1.0 == != < > <= >= =~ !~
  • 41. © 2021 InfluxData. All rights reserved. 41 © 2021 InfluxData. All rights reserved. 41 Predicate functions (r) => 1.0 == 1.0 and "foo" != "bar"
  • 42. © 2021 InfluxData. All rights reserved. 42 © 2021 InfluxData. All rights reserved. 42 Predicate functions (r) => true and true
  • 43. © 2021 InfluxData. All rights reserved. 43 © 2021 InfluxData. All rights reserved. 43 Predicate functions (r) => true
  • 44. © 2021 InfluxData. All rights reserved. 44 © 2021 InfluxData. All rights reserved. 44 Predicate functions (r) => 1.0 > 1.0 and "foo" != "bar"
  • 45. © 2021 InfluxData. All rights reserved. 45 © 2021 InfluxData. All rights reserved. 45 Predicate functions (r) => false and true
  • 46. © 2021 InfluxData. All rights reserved. 46 © 2021 InfluxData. All rights reserved. 46 Predicate functions (r) => false
  • 47. © 2021 InfluxData. All rights reserved. 47 © 2021 InfluxData. All rights reserved. 47 Predicate functions (r) => 1.0 > 1.0 or "foo" != "bar"
  • 48. © 2021 InfluxData. All rights reserved. 48 © 2021 InfluxData. All rights reserved. 48 Predicate functions (r) => true
  • 49. © 2021 InfluxData. All rights reserved. 49 © 2021 InfluxData. All rights reserved. 49 Predicate functions (r) => 1.0 == 1.0 and ("foo" == "bar" or "baz" != "quz")
  • 50. © 2021 InfluxData. All rights reserved. 50 © 2021 InfluxData. All rights reserved. 50 Predicate functions r = {fname: "John", lname: "Doe", age: 42} (r) => r.fname == "John" and r.age > 40
  • 51. © 2021 InfluxData. All rights reserved. 51 © 2021 InfluxData. All rights reserved. 51 Predicate functions r = {fname: "Mike", lname: "Smith", age: 29} (r) => r.fname == "John" and r.age > 40
  • 52. © 2021 InfluxData. All rights reserved. 52 Basic Query
  • 53. © 2021 InfluxData. All rights reserved. 53 © 2021 InfluxData. All rights reserved. 53 Basic Query from(bucket: "system-data") Source
  • 54. © 2021 InfluxData. All rights reserved. 54 © 2021 InfluxData. All rights reserved. 54 Basic Query sql.from( driverName: "postgres", dataSourceName: "...", query: "..." ) Source
  • 55. © 2021 InfluxData. All rights reserved. 55 © 2021 InfluxData. All rights reserved. 55 Basic Query csv.from(csv: "...") Source
  • 56. © 2021 InfluxData. All rights reserved. 56 © 2021 InfluxData. All rights reserved. 56 Basic Query from(bucket: "system-data") Source
  • 57. © 2021 InfluxData. All rights reserved. 57 © 2021 InfluxData. All rights reserved. 57 Basic Query from(bucket: "system-data") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "mem" and r._field == "used_percent") Source Filter
  • 58. © 2021 InfluxData. All rights reserved. 58 © 2021 InfluxData. All rights reserved. 58 Basic Query from(bucket: "system-data") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "mem" and r._field == "used_percent") |> group(columns: ["host"]) Source Filter Shape
  • 59. © 2021 InfluxData. All rights reserved. 59 © 2021 InfluxData. All rights reserved. 59 Basic Query from(bucket: "system-data") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "mem" and r._field == "used_percent") |> group(columns: ["host"]) |> mean() Source Filter Shape Process
  • 60. © 2021 InfluxData. All rights reserved. 60 © 2021 InfluxData. All rights reserved. 60 Basic Query from(bucket: "system-data") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "mem" and r._field == "used_percent") |> group(columns: ["host"]) |> mean() Source Filter Shape Process
  • 61. © 2021 InfluxData. All rights reserved. 61 © 2021 InfluxData. All rights reserved. 61 Process Data data = from(bucket: "system-data") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "mem" and r._field == "used_percent" )
  • 62. © 2021 InfluxData. All rights reserved. 62 © 2021 InfluxData. All rights reserved. 62 _start _stop _time _measurement host _field _value 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:09:00Z mem host1 used_percent 62.1 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:28:00Z mem host1 used_percent 63.8 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:39:00Z mem host1 used_percent 65.4 _start _stop _time _measurement host _field _value 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:18:00Z mem host2 used_percent 44.0 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:24:00Z mem host2 used_percent 52.4 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:42:00Z mem host2 used_percent 50.7 Process Data
  • 63. © 2021 InfluxData. All rights reserved. 63 © 2021 InfluxData. All rights reserved. 63 Process Data data |> map(fn: (r) => ({_time: r._time, _value: r._value}))
  • 64. © 2021 InfluxData. All rights reserved. 64 © 2021 InfluxData. All rights reserved. 64 _time _value 2021-01-01T00:09:00Z 62.1 2021-01-01T00:18:00Z 44.0 2021-01-01T00:24:00Z 52.4 2021-01-01T00:28:00Z 63.8 2021-01-01T00:39:00Z 65.4 2021-01-01T00:42:00Z 50.7 Process Data
  • 65. © 2021 InfluxData. All rights reserved. 65 © 2021 InfluxData. All rights reserved. 65 Process Data data |> map(fn: (r) => ({r with _value: r._value * 0.01}))
  • 66. © 2021 InfluxData. All rights reserved. 66 © 2021 InfluxData. All rights reserved. 66 _start _stop _time _measurement host _field _value 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:09:00Z mem host1 used_percent 0.621 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:28:00Z mem host1 used_percent 0.638 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:39:00Z mem host1 used_percent 0.654 _start _stop _time _measurement host _field _value 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:18:00Z mem host2 used_percent 0.44 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:24:00Z mem host2 used_percent 0.524 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:42:00Z mem host2 used_percent 0.507 Process Data
  • 67. © 2021 InfluxData. All rights reserved. 67 © 2021 InfluxData. All rights reserved. 67 Process Data data |> map(fn: (r) => ({ r with state: if r._value > 65.0 then "high" else "ok" }))
  • 68. © 2021 InfluxData. All rights reserved. 68 © 2021 InfluxData. All rights reserved. 68 _start _stop _time _measurement host _field _value state 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01- 01T00:09:00Z mem host1 used_percent 62.1 ok 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01- 01T00:28:00Z mem host1 used_percent 63.8 ok 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:39:00Z mem host1 used_percent 65.4 high _start _stop _time _measurement host _field _value state 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:18:00Z mem host2 used_percent 44.0 ok 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01- 01T00:24:00Z mem host2 used_percent 52.4 ok 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01- 01T00:42:00Z mem host2 used_percent 50.7 ok Process Data
  • 69. © 2021 InfluxData. All rights reserved. 69 © 2021 InfluxData. All rights reserved. 69 Process Data data |> mean()
  • 70. © 2021 InfluxData. All rights reserved. 70 |> mean()
  • 71. © 2021 InfluxData. All rights reserved. 71 © 2021 InfluxData. All rights reserved. 71 _start _stop _time _measurement host _field _value 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:09:00Z mem host1 used_percent 62.1 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:28:00Z mem host1 used_percent 63.8 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:39:00Z mem host1 used_percent 65.4 _start _stop _time _measurement host _field _value 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:18:00Z mem host2 used_percent 44.0 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:24:00Z mem host2 used_percent 52.4 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:42:00Z mem host2 used_percent 50.7 Process Data
  • 72. © 2021 InfluxData. All rights reserved. 72 © 2021 InfluxData. All rights reserved. 72 _start _stop _measurement host _field _value 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z mem host1 used_percent 63.8 _start _stop _measurement host _field _value 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z mem host2 used_percent 49.0 Process Data
  • 73. © 2021 InfluxData. All rights reserved. 73 © 2021 InfluxData. All rights reserved. 73 Process Data data |> sum()
  • 74. © 2021 InfluxData. All rights reserved. 74 © 2021 InfluxData. All rights reserved. 74 _start _stop _measurement host _field _value 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z mem host1 used_percent 191.3 _start _stop _measurement host _field _value 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z mem host2 used_percent 147.1 Process Data
  • 75. © 2021 InfluxData. All rights reserved. 75 © 2021 InfluxData. All rights reserved. 75 Process Data data |> max()
  • 76. © 2021 InfluxData. All rights reserved. 76 © 2021 InfluxData. All rights reserved. 76 _start _stop _time _measurement host _field _value 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:39:00Z mem host1 used_percent 65.4 _start _stop _time _measurement host _field _value 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:24:00Z mem host2 used_percent 52.4 Process Data
  • 77. © 2021 InfluxData. All rights reserved. 77 © 2021 InfluxData. All rights reserved. 77 Process Data data |> last()
  • 78. © 2021 InfluxData. All rights reserved. 78 © 2021 InfluxData. All rights reserved. 78 _start _stop _time _measurement host _field _value 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:39:00Z mem host1 used_percent 65.4 _start _stop _time _measurement host _field _value 2021-01-01T00:00:00Z 2021-01-01T01:00:00Z 2021-01-01T00:42:00Z mem host2 used_percent 50.7 Process Data
  • 79. © 2021 InfluxData. All rights reserved. 79 Flux in Practice
  • 80. © 2021 InfluxData. All rights reserved. 80 © 2021 InfluxData. All rights reserved. 80 from(bucket: "market-summary") |> range(start: -6mo) |> filter(fn: (r) => r._measurement == "stockPrices" and r.symbol == "GME" ) |> holtWinters(n: 24, seasonality: 12, interval: 1w)
  • 81. © 2021 InfluxData. All rights reserved. 81 © 2021 InfluxData. All rights reserved. 81 heatIndex = (t, h) => //... from(bucket: "sensor-data") |> range(start: -1d) |> filter(fn: (r) => r._measurement == "sensors") |> filter(fn: (r) => r._field == "temp" or r._field == "hum") |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value") |> map(fn: (r) => ({ r with heatIndex: heatIndex(t: r.temp, h: r.hum) }))
  • 82. © 2021 InfluxData. All rights reserved. 82 © 2021 InfluxData. All rights reserved. 82 import "sql" sensorInfo = sql.from( driverName: "postgres", dataSourceName: "postgresql://localhost?sslmode=disable", query: "SELECT * FROM sensors" ) sensorMetrics = from(bucket: "example-bucket") |> range(start: -1h) |> filter(fn: (r) => r._measurement == "airSensors") join(tables: {metric: sensorMetrics, info: sensorInfo}, on: ["sensor_id"]) |> group(columns: ["sensor_id", "lastInspected"]), |> aggregateWindow( every: 5m, fn: (tables=<-, column="error") => tables |> count(column: column) )
  • 84. We look forward to bringing together our community of developers to learn, interact and share tips and use cases. 10-11 May 2021 Hands-On Flux Training 18-19 May 2021 Virtual Experience www.influxdays.com/emea-2021-virtual-experience/