SlideShare a Scribd company logo
1 of 35
Download to read offline
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 WorkflowsIlkay Altintas, Ph.D.
 
R language tutorial
R language tutorialR language tutorial
R language tutorialDavid Chiu
 
Rails Tips and Best Practices
Rails Tips and Best PracticesRails Tips and Best Practices
Rails Tips and Best PracticesDavid 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-mceniryChris McEniry
 
Introduction to r
Introduction to rIntroduction to r
Introduction to rgslicraf
 
How to Achieve Scale with MongoDB
How to Achieve Scale with MongoDBHow to Achieve Scale with MongoDB
How to Achieve Scale with MongoDBMongoDB
 
Data Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFixData Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFixC4Media
 
OU RSE Tutorial Big Data Cluster
OU RSE Tutorial Big Data ClusterOU RSE Tutorial Big Data Cluster
OU RSE Tutorial Big Data ClusterEnrico Daga
 
Reproducible research: practice
Reproducible research: practiceReproducible research: practice
Reproducible research: practiceC. Tobin Magle
 
Building Search & Recommendation Engines
Building Search & Recommendation EnginesBuilding Search & Recommendation Engines
Building Search & Recommendation EnginesTrey Grainger
 
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 ChaperoneGary 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 OldJohn Kunze
 
Abcd iqs ssoftware-projects-mercecrosas
Abcd iqs ssoftware-projects-mercecrosasAbcd iqs ssoftware-projects-mercecrosas
Abcd iqs ssoftware-projects-mercecrosasMerce Crosas
 
Introduction to Apache HBase Training
Introduction to Apache HBase TrainingIntroduction to Apache HBase Training
Introduction to Apache HBase TrainingCloudera, Inc.
 
Scientific Computing - Hardware
Scientific Computing - HardwareScientific Computing - Hardware
Scientific Computing - Hardwarejalle6
 

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

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

Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesExploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesSanjay Willie
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dashnarutouzumaki53779
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 

Recently uploaded (20)

Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your QueriesExploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
Exploring ChatGPT Prompt Hacks To Maximally Optimise Your Queries
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Visualising and forecasting stocks using Dash
Visualising and forecasting stocks using DashVisualising and forecasting stocks using Dash
Visualising and forecasting stocks using Dash
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 

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