SlideShare a Scribd company logo
Becoming a Flux Pro
Anais Dotis-Georgiou
Developer Advocate, InfluxData
Connect Learn Build
Hear from and meet developers
from the InfluxDB Community
Be inspired by use cases from
our partners and InfluxDB engineers
Learn best practices that will
help you build great experiences
for your projects
In this talk we’ll learn about some of the biggest
challenges beginner Flux users face. We’ll also learn
about resources and tools that developers can take
advantage of to become a Flux Pro.
Anais Dotis-Georgiou
Lead Developer Advocate
Anais Dotis-Georgiou is a developer advocate at
InfluxData with a passion for making data beautiful
using data analytics, AI, and machine learning. She
takes the data that she collects and does a mix of
research, exploration, and engineering to translate the
data into something of function, value, and beauty.
Becoming a Flux Pro
Agenda
1. Understanding critical functions
2. Utilizing existing tools to expedite learning
3. Taking advantage of learning resources
From Series to Tables on Disk
measurement1 field1=1i,field2=1,field3="a"
measurement1 field1=1i,field2=2,field3="b"
Grouping
• Flux operates on streams of tables.
• Every table has a group key – a list of columns for which every
row in the table has the same value. Tables are defined by their
group keys.
• You can use Flux to combine or divide tables.
Group Keys
NOAA water sample dataset schema
▪ 5 measurement:
• average_tempearture, h2o_feet, h2o_pH, h2o_quality,
h2o_temperature
▪ 5 fields:
• degrees, index, level description, pH, water_level
▪ 2 tags: location, randtag
• 2 location tag values
▪ coyote_creek, santa_monica
• 3 randtag tag values
▪ 1, 2, 3
How do I calculate the
mean() temp across
coyote_creek and
santa_monica?
query and group() data
from(bucket: "noaa")
|> range(start: rfc3339startTime, stop: rfc3339stopTime)
|> filter(fn: (r) => r["_measurement"] == "average_temperature")
|> filter(fn: (r) => r["_field"] == "degrees")
|> filter(fn: (r) => r["location"] == "coyote_creek" or
r["location"] == "santa_monica")
|> limit(n:3)
|> yield(name: "before")
|> group(columns:["_measurement"])
|> yield(name: "group on measurement")
Not in
Group Key
In Group Key In Group
Key
Not in
Group
Key
In Group Key In Group Key In Group Key Not in Group
Key
table
before
_measurement _field _value location _start _stop _time
0 average_temperature temperature 82.0 coyote_creek rfc3339startTime rfc3339stopTime rfc3339time1
0 average_temperature temperature 73.0 coyote_creek rfc3339startTime rfc3339stopTime rfc3339time2
0 average_temperature temperature 86.0 coyote_creek rfc3339startTime rfc3339stopTime rfc3339time3
1 average_temperature temperature 85.0 santa_monica rfc3339startTime rfc3339stopTime rfc3339time1
1 average_temperature temperature 74.0 santa_monica rfc3339startTime rfc3339stopTime rfc3339time2
1 average_temperature temperature 80.0 santa_monica rfc3339startTime rfc3339stopTime rfc3339time3
Not in Group
Key
In Group Key Not In Group
Key
Not in
Group
Key
Not In Group
Key
Not In Group Key Not In Group Key Not in Group
Key
table
group on
measurement
_measurement _field _value location _start _stop _time
0 average_tempera
ture
temperature 82.0 coyote_creek rfc3339startTime rfc3339stopTime rfc3339time1
0 average_tempera
ture
temperature 73.0 coyote_creek rfc3339startTime rfc3339stopTime rfc3339time2
0 average_tempera
ture
temperature 86.0 coyote_creek rfc3339startTime rfc3339stopTime rfc3339time3
0 average_tempera
ture
temperature 85.0 santa_monica rfc3339startTime rfc3339stopTime rfc3339time1
0 average_tempera
ture
temperature 74.0 santa_monica rfc3339startTime rfc3339stopTime rfc3339time2
0 average_tempera
ture
temperature 80.0 santa_monica rfc3339startTime rfc3339stopTime rfc3339time3
calculate mean
…
|> mean()
|> yield(name: "mean")
Not in
Group Key
In Group Key Not in
Group
Key
table
mean
_measurement _value
0 average_temperature 80.0
Embracing
experimentation
• Learning a new language involves embracing
experimentation. Understanding happens through
trial and error.
• Tools that facilitate experimentation:
• InfluxDB UI
• Flux extension for VS Code
Function Filter
Raw Data View
yield() and limit() functions
yield() and limit() functions
yield() function
data = from(bucket: "noaa")
|> range(start: rfc3339startTime, stop: rfc3339stopTime)
|> filter(fn: (r) => r["_measurement"] == "average_temperature")
|> filter(fn: (r) => r["_field"] == "degrees")
|> filter(fn: (r) => r["location"] == "coyote_creek")
data |> mean()
|> yield(name: "mean")
data |> max()
|> yield(name: "max")
data |> min()
|> yield(name: "min")
Flux VS Code Extension
Resources
• Get started: influxdata.com/cloud
• Forums: community.influxdata.com
• Slack: influxcommunity.slack.com
• Reddit: r/InfluxData
• GH: github.com/InfluxCommunity
• Book: awesome.influxdata.com
• Docs: docs.influxdata.com
• Blogs: influxdata.com/blog
• InfluxDB University: influxdata.com/university
• How to guides: docs.influxdata.com/resources/how-to-guides/
InfluxDB University offers free live and self-paced training on:
Scan to explore the
course catalog
influxdbu.com
• InfluxDB
• Telegraf
• Flux
Time to Awesome Book
Docs: how-to guides
Late Arriving Data
T H A N K Y O U
How do I calculate the
difference in temp across
both locations?
Not in
Group Key
In Group Key In Group Key Not in
Group
Key
In Group Key In Group Key in Group Key Not in Group
Key
table
raw
_measurement _field _value generatorID topic host _time
0 genData temperature 190.0 generator1 emergency_gen
erator/generator
1
influxdata-roads
how
rfc3339time1
0 genData temperature 195.0 generator1 emergency_gen
erator/generator
1
influxdata-roads
how
rfc3339time2
1 genData temperature 200.0 generator2 emergency_gen
erator/generator
2
influxdata-roads
how
rfc3339time1
1 genData temperature 210.0 generator2 emergency_gen
erator/generator
2
influxdata-roads
how
rfc3339time2
pivot
pivoted = data
|> pivot(rowKey:["_time"], columnKey: ["generatorID"],
valueColumn: "_value")
|> yield(name: "pivot")
Not in
Group Key
In Group Key In Group Key Not in
Group Key
Not in Group
Key
In Group Key in Group Key Not in Group
Key
table
pivoted
_measurement _field generator1 generator2 topic host _time
0 genData temperature 190.0 200.0 emergency_gene
rator/generator1
influxdata-roadsh
ow
rfc3339time1
0 genData temperature 195.0 210.0 emergency_gene
rator/generator1
influxdata-roadsh
ow
rfc3339time2
map
difference = pivot
|> map(fn: (r) => ({ r with difference: r.generator1 -
r.generator2 }))
|> yield(name: "difference")
Not in
Group Key
In Group Key In Group Key Not in
Group Key
Not in Group
Key
Not in Group
Key
In Group Key in Group Key Not in Group
Key
table
pivoted
_measurement _field generator1 generator2 difference topic host _time
0 genData temperature 190.0 200.0 -10.0 emergency_ge
nerator/generat
or1
influxdata-road
show
rfc3339time1
0 genData temperature 195.0 210.0 -15.0 emergency_ge
nerator/generat
or1
influxdata-road
show
rfc3339time2
//use the math.abs() function to get the absolute difference
|> map(fn: (r) => ({ r with difference: math.abs(x: r.generator1 -
r.generator2 )}))
i n f l u x d a y s . c o m

More Related Content

Similar to Anais Dotis-Georgiou [InfluxData] | Becoming a Flux Pro | InfluxDays 2022

Bridging Big Data and Data Science Using Scalable Workflows
Bridging Big Data and Data Science Using Scalable WorkflowsBridging Big Data and Data Science Using Scalable Workflows
Bridging Big Data and Data Science Using Scalable Workflows
Ilkay Altintas, Ph.D.
 
R language tutorial
R language tutorialR language tutorial
R language tutorial
David Chiu
 
Rails Tips and Best Practices
Rails Tips and Best PracticesRails Tips and Best Practices
Rails Tips and Best Practices
David Keener
 
Filar seymour oreilly_bot_story_
Filar seymour oreilly_bot_story_Filar seymour oreilly_bot_story_
Filar seymour oreilly_bot_story_
EndgameInc
 
Value streammapping cascadiait2014-mceniry
Value streammapping cascadiait2014-mceniryValue streammapping cascadiait2014-mceniry
Value streammapping cascadiait2014-mceniry
Chris McEniry
 
Introduction to r
Introduction to rIntroduction to r
Introduction to r
gslicraf
 
R tutorial
R tutorialR tutorial
R tutorial
Richard Vidgen
 
How to Achieve Scale with MongoDB
How to Achieve Scale with MongoDBHow to Achieve Scale with MongoDB
How to Achieve Scale with MongoDB
MongoDB
 
Data Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFixData Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFix
C4Media
 
Aws r
Aws rAws r
OU RSE Tutorial Big Data Cluster
OU RSE Tutorial Big Data ClusterOU RSE Tutorial Big Data Cluster
OU RSE Tutorial Big Data Cluster
Enrico Daga
 
Reproducible research: practice
Reproducible research: practiceReproducible research: practice
Reproducible research: practice
C. Tobin Magle
 
Building Search & Recommendation Engines
Building Search & Recommendation EnginesBuilding Search & Recommendation Engines
Building Search & Recommendation Engines
Trey Grainger
 
InfluxDB & Grafana
InfluxDB & GrafanaInfluxDB & Grafana
InfluxDB & Grafana
Pedro Salgado
 
Creating Developer-Friendly Docker Containers with Chaperone
Creating Developer-Friendly Docker Containers with ChaperoneCreating Developer-Friendly Docker Containers with Chaperone
Creating Developer-Friendly Docker Containers with Chaperone
Gary Wisniewski
 
The ARK Identifier Scheme at Ten Years Old
The ARK Identifier Scheme at Ten Years OldThe ARK Identifier Scheme at Ten Years Old
The ARK Identifier Scheme at Ten Years Old
John Kunze
 
Abcd iqs ssoftware-projects-mercecrosas
Abcd iqs ssoftware-projects-mercecrosasAbcd iqs ssoftware-projects-mercecrosas
Abcd iqs ssoftware-projects-mercecrosas
Merce Crosas
 
Data Science
Data ScienceData Science
Data Science
Ahmet Bulut
 
Introduction to Apache HBase Training
Introduction to Apache HBase TrainingIntroduction to Apache HBase Training
Introduction to Apache HBase Training
Cloudera, Inc.
 
Scientific Computing - Hardware
Scientific Computing - HardwareScientific Computing - Hardware
Scientific Computing - Hardware
jalle6
 

Similar to Anais Dotis-Georgiou [InfluxData] | Becoming a Flux Pro | InfluxDays 2022 (20)

Bridging Big Data and Data Science Using Scalable Workflows
Bridging Big Data and Data Science Using Scalable WorkflowsBridging Big Data and Data Science Using Scalable Workflows
Bridging Big Data and Data Science Using Scalable Workflows
 
R language tutorial
R language tutorialR language tutorial
R language tutorial
 
Rails Tips and Best Practices
Rails Tips and Best PracticesRails Tips and Best Practices
Rails Tips and Best Practices
 
Filar seymour oreilly_bot_story_
Filar seymour oreilly_bot_story_Filar seymour oreilly_bot_story_
Filar seymour oreilly_bot_story_
 
Value streammapping cascadiait2014-mceniry
Value streammapping cascadiait2014-mceniryValue streammapping cascadiait2014-mceniry
Value streammapping cascadiait2014-mceniry
 
Introduction to r
Introduction to rIntroduction to r
Introduction to r
 
R tutorial
R tutorialR tutorial
R tutorial
 
How to Achieve Scale with MongoDB
How to Achieve Scale with MongoDBHow to Achieve Scale with MongoDB
How to Achieve Scale with MongoDB
 
Data Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFixData Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFix
 
Aws r
Aws rAws r
Aws r
 
OU RSE Tutorial Big Data Cluster
OU RSE Tutorial Big Data ClusterOU RSE Tutorial Big Data Cluster
OU RSE Tutorial Big Data Cluster
 
Reproducible research: practice
Reproducible research: practiceReproducible research: practice
Reproducible research: practice
 
Building Search & Recommendation Engines
Building Search & Recommendation EnginesBuilding Search & Recommendation Engines
Building Search & Recommendation Engines
 
InfluxDB & Grafana
InfluxDB & GrafanaInfluxDB & Grafana
InfluxDB & Grafana
 
Creating Developer-Friendly Docker Containers with Chaperone
Creating Developer-Friendly Docker Containers with ChaperoneCreating Developer-Friendly Docker Containers with Chaperone
Creating Developer-Friendly Docker Containers with Chaperone
 
The ARK Identifier Scheme at Ten Years Old
The ARK Identifier Scheme at Ten Years OldThe ARK Identifier Scheme at Ten Years Old
The ARK Identifier Scheme at Ten Years Old
 
Abcd iqs ssoftware-projects-mercecrosas
Abcd iqs ssoftware-projects-mercecrosasAbcd iqs ssoftware-projects-mercecrosas
Abcd iqs ssoftware-projects-mercecrosas
 
Data Science
Data ScienceData Science
Data Science
 
Introduction to Apache HBase Training
Introduction to Apache HBase TrainingIntroduction to Apache HBase Training
Introduction to Apache HBase Training
 
Scientific Computing - Hardware
Scientific Computing - HardwareScientific Computing - Hardware
Scientific Computing - Hardware
 

More from InfluxData

Announcing InfluxDB Clustered
Announcing InfluxDB ClusteredAnnouncing InfluxDB Clustered
Announcing InfluxDB Clustered
InfluxData
 
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
InfluxData
 
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 InfluxDB
InfluxData
 
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 Stack
InfluxData
 
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
InfluxData
 
Introducing InfluxDB Cloud Dedicated
Introducing InfluxDB Cloud DedicatedIntroducing InfluxDB Cloud Dedicated
Introducing InfluxDB Cloud Dedicated
InfluxData
 
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 Engine
InfluxData
 
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 Engine
InfluxData
 
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
InfluxData
 
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 2022
InfluxData
 
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
InfluxData
 
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 2022
InfluxData
 

More from 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
 

Recently uploaded

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 

Recently uploaded (20)

Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 

Anais Dotis-Georgiou [InfluxData] | Becoming a Flux Pro | InfluxDays 2022

  • 1.
  • 2. Becoming a Flux Pro Anais Dotis-Georgiou Developer Advocate, InfluxData
  • 3. Connect Learn Build Hear from and meet developers from the InfluxDB Community Be inspired by use cases from our partners and InfluxDB engineers Learn best practices that will help you build great experiences for your projects
  • 4. In this talk we’ll learn about some of the biggest challenges beginner Flux users face. We’ll also learn about resources and tools that developers can take advantage of to become a Flux Pro. Anais Dotis-Georgiou Lead Developer Advocate Anais Dotis-Georgiou is a developer advocate at InfluxData with a passion for making data beautiful using data analytics, AI, and machine learning. She takes the data that she collects and does a mix of research, exploration, and engineering to translate the data into something of function, value, and beauty. Becoming a Flux Pro
  • 5. Agenda 1. Understanding critical functions 2. Utilizing existing tools to expedite learning 3. Taking advantage of learning resources
  • 6. From Series to Tables on Disk measurement1 field1=1i,field2=1,field3="a" measurement1 field1=1i,field2=2,field3="b"
  • 7. Grouping • Flux operates on streams of tables. • Every table has a group key – a list of columns for which every row in the table has the same value. Tables are defined by their group keys. • You can use Flux to combine or divide tables.
  • 9. NOAA water sample dataset schema ▪ 5 measurement: • average_tempearture, h2o_feet, h2o_pH, h2o_quality, h2o_temperature ▪ 5 fields: • degrees, index, level description, pH, water_level ▪ 2 tags: location, randtag • 2 location tag values ▪ coyote_creek, santa_monica • 3 randtag tag values ▪ 1, 2, 3
  • 10. How do I calculate the mean() temp across coyote_creek and santa_monica?
  • 11. query and group() data from(bucket: "noaa") |> range(start: rfc3339startTime, stop: rfc3339stopTime) |> filter(fn: (r) => r["_measurement"] == "average_temperature") |> filter(fn: (r) => r["_field"] == "degrees") |> filter(fn: (r) => r["location"] == "coyote_creek" or r["location"] == "santa_monica") |> limit(n:3) |> yield(name: "before") |> group(columns:["_measurement"]) |> yield(name: "group on measurement")
  • 12. Not in Group Key In Group Key In Group Key Not in Group Key In Group Key In Group Key In Group Key Not in Group Key table before _measurement _field _value location _start _stop _time 0 average_temperature temperature 82.0 coyote_creek rfc3339startTime rfc3339stopTime rfc3339time1 0 average_temperature temperature 73.0 coyote_creek rfc3339startTime rfc3339stopTime rfc3339time2 0 average_temperature temperature 86.0 coyote_creek rfc3339startTime rfc3339stopTime rfc3339time3 1 average_temperature temperature 85.0 santa_monica rfc3339startTime rfc3339stopTime rfc3339time1 1 average_temperature temperature 74.0 santa_monica rfc3339startTime rfc3339stopTime rfc3339time2 1 average_temperature temperature 80.0 santa_monica rfc3339startTime rfc3339stopTime rfc3339time3
  • 13. Not in Group Key In Group Key Not In Group Key Not in Group Key Not In Group Key Not In Group Key Not In Group Key Not in Group Key table group on measurement _measurement _field _value location _start _stop _time 0 average_tempera ture temperature 82.0 coyote_creek rfc3339startTime rfc3339stopTime rfc3339time1 0 average_tempera ture temperature 73.0 coyote_creek rfc3339startTime rfc3339stopTime rfc3339time2 0 average_tempera ture temperature 86.0 coyote_creek rfc3339startTime rfc3339stopTime rfc3339time3 0 average_tempera ture temperature 85.0 santa_monica rfc3339startTime rfc3339stopTime rfc3339time1 0 average_tempera ture temperature 74.0 santa_monica rfc3339startTime rfc3339stopTime rfc3339time2 0 average_tempera ture temperature 80.0 santa_monica rfc3339startTime rfc3339stopTime rfc3339time3
  • 14. calculate mean … |> mean() |> yield(name: "mean")
  • 15. Not in Group Key In Group Key Not in Group Key table mean _measurement _value 0 average_temperature 80.0
  • 16. Embracing experimentation • Learning a new language involves embracing experimentation. Understanding happens through trial and error. • Tools that facilitate experimentation: • InfluxDB UI • Flux extension for VS Code
  • 19. yield() and limit() functions
  • 20. yield() and limit() functions
  • 21. yield() function data = from(bucket: "noaa") |> range(start: rfc3339startTime, stop: rfc3339stopTime) |> filter(fn: (r) => r["_measurement"] == "average_temperature") |> filter(fn: (r) => r["_field"] == "degrees") |> filter(fn: (r) => r["location"] == "coyote_creek") data |> mean() |> yield(name: "mean") data |> max() |> yield(name: "max") data |> min() |> yield(name: "min")
  • 22. Flux VS Code Extension
  • 23. Resources • Get started: influxdata.com/cloud • Forums: community.influxdata.com • Slack: influxcommunity.slack.com • Reddit: r/InfluxData • GH: github.com/InfluxCommunity • Book: awesome.influxdata.com • Docs: docs.influxdata.com • Blogs: influxdata.com/blog • InfluxDB University: influxdata.com/university • How to guides: docs.influxdata.com/resources/how-to-guides/
  • 24. InfluxDB University offers free live and self-paced training on: Scan to explore the course catalog influxdbu.com • InfluxDB • Telegraf • Flux
  • 28. T H A N K Y O U
  • 29. How do I calculate the difference in temp across both locations?
  • 30. Not in Group Key In Group Key In Group Key Not in Group Key In Group Key In Group Key in Group Key Not in Group Key table raw _measurement _field _value generatorID topic host _time 0 genData temperature 190.0 generator1 emergency_gen erator/generator 1 influxdata-roads how rfc3339time1 0 genData temperature 195.0 generator1 emergency_gen erator/generator 1 influxdata-roads how rfc3339time2 1 genData temperature 200.0 generator2 emergency_gen erator/generator 2 influxdata-roads how rfc3339time1 1 genData temperature 210.0 generator2 emergency_gen erator/generator 2 influxdata-roads how rfc3339time2
  • 31. pivot pivoted = data |> pivot(rowKey:["_time"], columnKey: ["generatorID"], valueColumn: "_value") |> yield(name: "pivot")
  • 32. Not in Group Key In Group Key In Group Key Not in Group Key Not in Group Key In Group Key in Group Key Not in Group Key table pivoted _measurement _field generator1 generator2 topic host _time 0 genData temperature 190.0 200.0 emergency_gene rator/generator1 influxdata-roadsh ow rfc3339time1 0 genData temperature 195.0 210.0 emergency_gene rator/generator1 influxdata-roadsh ow rfc3339time2
  • 33. map difference = pivot |> map(fn: (r) => ({ r with difference: r.generator1 - r.generator2 })) |> yield(name: "difference")
  • 34. Not in Group Key In Group Key In Group Key Not in Group Key Not in Group Key Not in Group Key In Group Key in Group Key Not in Group Key table pivoted _measurement _field generator1 generator2 difference topic host _time 0 genData temperature 190.0 200.0 -10.0 emergency_ge nerator/generat or1 influxdata-road show rfc3339time1 0 genData temperature 195.0 210.0 -15.0 emergency_ge nerator/generat or1 influxdata-road show rfc3339time2 //use the math.abs() function to get the absolute difference |> map(fn: (r) => ({ r with difference: math.abs(x: r.generator1 - r.generator2 )}))
  • 35. i n f l u x d a y s . c o m