SlideShare a Scribd company logo
| © Copyright 2023, InfluxData
Predictive Analytics
Using a Time Series
Database
Anais Dotis-Georgiou
July 2023
| © Copyright 2023, InfluxData
2
Anais Dotis-Georgiou
Developer Advocate
LinkedIn
| © Copyright 2023, InfluxData
| © Copyright 2023, InfluxData
Agenda
● What is Predictive Analytics?
● Time Series Databases
● Use Cases
● Using Quix, Hugging Face and InfluxDB 3.0 for forecasting
and anomaly detection
● Resources
What is Predictive Analytics
Time Series Databases
The age of instrumentation
Instrumentation
of the virtual world
(DevOps)
Sensors
in the physical world
(IoT)
Characteristics of
the data
• Time-stamped
• Generated in regular
(metric) and
irregular (event) time
periods
• Huge volumes
• Real time and time
sensitive
Time series in every application
Infrastructure & data sources
Consumer & Industrial IoT Software Infrastructure
Renewable
&
alternative
energy
systems
Manufact
uring &
industrial
platforms
Fleet
management
& telematics
Real-time Applications
Developer
Tools
& APIs
Kubernetes
(K8s)
DevOps
Monitoring
Gaming
Applications
Fintech
Applications
Network
Monitoring
TIME SERIES DATA
Rise of time series as a category
TIME SERIES
RELATIONAL DOCUMENT SEARCH
• Distributed
search
• Logs
• Geo
• High
throughput
• Large
document
• Orders
• Customers
• Records
• Events, metrics, time stamped
• for IoT, analytics, cloud native
Time series is fastest growing
data category by far
Time series
All others
source: DB Engines
| © Copyright 2023, InfluxData
Characteristics
of the data
• Time-stamped
• Generated in regular (metric) and
irregular (event) time periods
• Huge volumes
• Real time and time sensitive
| © Copyright 2023, InfluxData
InfluxDB is 3 things
API &
Toolset
POWERFUL
for real-time apps
HIGH PERFORMANCE MASSIVE
for real-time data
workloads
of cloud & open source
developers
1 2 3
Time Series
Engine
Community &
Ecosystem
| © Copyright 2023, InfluxData
InfluxData Reference Architecture
| © Copyright 2023, InfluxData
| © Copyright 2023, InfluxData
InfluxDB’s new storage engine is built on
● Rust
● Apache Arrow
● Apache Parquet
● Arrow Flight
● DataFusion
| © Copyright 2023, InfluxData
| © Copyright 2023, InfluxData
Release Details
14
| © Copyright 2023, InfluxData
SQL Support
15
Use Cases
Power Your Predictive Analytics with InfluxDB
Using Quix, Hugging Face and
InfluxDB 3.0 for forecasting
and anomaly detection
What is
What is
| © Copyright 2023, InfluxData
The Dataset
| © Copyright 2023, InfluxData
The Quix Pipeline
| © Copyright 2023, InfluxData
23
| © Copyright 2023, InfluxData
Source Project
24
| © Copyright 2023, InfluxData
import influxdb_client_3 as InfluxDBClient3
client = InfluxDBClient3.InfluxDBClient3(token=os.environ["INFLUX_TOKEN"],
host=os.environ["INFLUX_HOST"],
org=os.environ["INFLUX_ORG"],
database=os.environ["INFLUX_DATABASE"])
25
| © Copyright 2023, InfluxData
def get_data():
# Query InfluxDB Cloud 3.0
while run:
try:
query = "SHOW TAG VALUES WITH KEY = "machineID""
table = client.query(query=query, language="influxql")
machines = table["value"].to_pylist()
for machine in machines:
# this will end up loop when all data has been sent
table = client.query(query=f"SELECT vibration, machineID FROM
machine_data WHERE time >= now() - 5m AND machineID = '{machine}'",
language="influxql")
df = table.to_pandas()
print(df)
if df.empty:
break
# If there are rows to write to the stream at this time
stream_producer.timeseries.buffer.publish(df)
sleep(int(os.environ["task_interval"]))
except:
print("query failed")
sleep(int(os.environ["task_interval"]))
26
| © Copyright 2023, InfluxData
Event Detection Project
27
| © Copyright 2023, InfluxData
Training the Model
28
| © Copyright 2023, InfluxData
29
| © Copyright 2023, InfluxData
from huggingface_hub import from_pretrained_keras
# Quix injects credentials automatically to the client.
# Alternatively, you can always pass an SDK token manually as an
argument.
client = qx.QuixStreamingClient()
print("Opening input and output topics")
consumer_topic = client.get_topic_consumer(os.environ["input"],
"default-consumer-group")
producer_topic = client.get_topic_producer(os.environ["output"])
model = from_pretrained_keras(os.environ["model"])
30
| © Copyright 2023, InfluxData
Forecasting Transformation Project
31
| © Copyright 2023, InfluxData
df = df.set_index('timestamp')
data = df.drop(columns=['iox::measurement', 'machineID'])
fit = Holt(data,damped_trend=True,initialization_method="estimated").fit(optimized=True)
fcast = fit.forecast(10).rename("Multiplicative damped trend")
fcast = fcast.reset_index().rename(columns={'index': 'timestamp'})
32
| © Copyright 2023, InfluxData
Write Project
33
| © Copyright 2023, InfluxData
import influxdb_client_3 as InfluxDBClient3
client = qx.QuixStreamingClient()
# get the topic consumer for a specific consumer group
topic_consumer = client.get_topic_consumer(topic_id_or_name = os.environ["input"],
consumer_group = "empty-destination")
client = InfluxDBClient3.InfluxDBClient3(token=os.environ["INFLUX_TOKEN"],
host=os.environ["INFLUX_HOST"],
org=os.environ["INFLUX_ORG"],
database=os.environ["INFLUX_DATABASE"])
def on_dataframe_received_handler(stream_consumer: qx.StreamConsumer, df:
pd.DataFrame):
# do something with the data here
df = df.rename(columns={'timestamp': 'time'})
df = df.set_index('time')
client.write(df, data_frame_measurement_name='mlresult',
data_frame_tag_columns=['machineID'])
print("Write successful")
34
Resources
| © Copyright 2023, InfluxData
Get Started
36
influxdata.com/influxdb-engine-beta/
| © Copyright 2023, InfluxData
InfluxDB
Community
Slack workspace
Please join us in the InfluxDB
Community Slack at
www.influxdata.com/slack.
To participate in conversations,
join the #influxdb_iox channel.
| © Copyright 2023, InfluxData
38
influxdata.com https://github.com/InfluxCommunity
| © Copyright 2023, InfluxData
39
Try it yourself
https://www.influxdata.com https://github.com/InfluxCommunity
Get Started
| © Copyright 2023, InfluxData
Get Help + Resources!
40
Forums: community.influxdata.com
Slack: influxcommunity.slack.com
GH: github.com/InfluxCommunity
Docs: docs.influxdata.com
Blogs: influxdata.com/blog
InfluxDB University: influxdata.com/university
| © Copyright 2023, InfluxData
T H A N K Y O U

More Related Content

PDF
OpenTelemetryを用いたObservability基礎の実装 with AWS Distro for OpenTelemetry(Kuberne...
PDF
Knative, Serverless on Kubernetes, and Openshift
PDF
ksqlDB: Building Consciousness on Real Time Events
PDF
MySQLとPostgreSQLと日本語全文検索 - Azure DatabaseでMroonga・PGroongaを使いたいですよね!?
PPTX
Introduction to KSQL: Streaming SQL for Apache Kafka®
PDF
Notes from Coursera Deep Learning courses by Andrew Ng
PDF
“Deploying PyTorch Models for Real-time Inference On the Edge,” a Presentatio...
PPTX
Control Kubernetes Ingress and Egress Together with NGINX
OpenTelemetryを用いたObservability基礎の実装 with AWS Distro for OpenTelemetry(Kuberne...
Knative, Serverless on Kubernetes, and Openshift
ksqlDB: Building Consciousness on Real Time Events
MySQLとPostgreSQLと日本語全文検索 - Azure DatabaseでMroonga・PGroongaを使いたいですよね!?
Introduction to KSQL: Streaming SQL for Apache Kafka®
Notes from Coursera Deep Learning courses by Andrew Ng
“Deploying PyTorch Models for Real-time Inference On the Edge,” a Presentatio...
Control Kubernetes Ingress and Egress Together with NGINX

What's hot (20)

PDF
"PyTorch Deep Learning Framework: Status and Directions," a Presentation from...
PDF
Intro to open source observability with grafana, prometheus, loki, and tempo(...
PDF
NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
PDF
MySQLバックアップの基本
PPTX
How to Use Telegraf and Its Plugin Ecosystem
PPTX
Azure OpenAI 및 ChatGPT 실습가이드 (Hands-on-lab)
PPTX
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
PPTX
Rootlessコンテナ
PDF
PGOを用いたPostgreSQL on Kubernetes入門(PostgreSQL Conference Japan 2022 発表資料)
PPTX
Google cloud functions
PPTX
Dynamic Rule-based Real-time Market Data Alerts
PDF
knolx of KubeCost & Infracost
PDF
MySQL勉強会 クエリチューニング編
PPTX
Mixed RealityとAzure Digital Twinsを組合わせてデジタルツインを可視化するためのTips
PDF
Ingressの概要とLoadBalancerとの比較
PPTX
Lessons Learned from Building Machine Learning Software at Netflix
PDF
OpenShift 4, the smarter Kubernetes platform
PPTX
Deep Natural Language Processing for Search Systems (sigir 2019 tutorial)
PDF
Apache Airflow入門 (マーケティングデータ分析基盤技術勉強会)
PDF
Deploy 22 microservices from scratch in 30 mins with GitOps
"PyTorch Deep Learning Framework: Status and Directions," a Presentation from...
Intro to open source observability with grafana, prometheus, loki, and tempo(...
NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis
MySQLバックアップの基本
How to Use Telegraf and Its Plugin Ecosystem
Azure OpenAI 및 ChatGPT 실습가이드 (Hands-on-lab)
Microservices, Node, Dapr and more - Part One (Fontys Hogeschool, Spring 2022)
Rootlessコンテナ
PGOを用いたPostgreSQL on Kubernetes入門(PostgreSQL Conference Japan 2022 発表資料)
Google cloud functions
Dynamic Rule-based Real-time Market Data Alerts
knolx of KubeCost & Infracost
MySQL勉強会 クエリチューニング編
Mixed RealityとAzure Digital Twinsを組合わせてデジタルツインを可視化するためのTips
Ingressの概要とLoadBalancerとの比較
Lessons Learned from Building Machine Learning Software at Netflix
OpenShift 4, the smarter Kubernetes platform
Deep Natural Language Processing for Search Systems (sigir 2019 tutorial)
Apache Airflow入門 (マーケティングデータ分析基盤技術勉強会)
Deploy 22 microservices from scratch in 30 mins with GitOps
Ad

Similar to Power Your Predictive Analytics with InfluxDB (20)

PDF
Time Series to Vectors: Leveraging InfluxDB and Milvus for Similarity Search
PDF
Build an Edge-to-Cloud Solution with the MING Stack
PDF
Introducing InfluxDB Cloud Dedicated
PDF
Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre...
PDF
Intro to InfluxDB
PPTX
Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...
PDF
The hidden engineering behind machine learning products at Helixa
PDF
Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData
PDF
Cortana Analytics Workshop: Real-Time Data Processing -- How Do I Choose the ...
PDF
IRJET- An Approach for Implemented Secure Proxy Server for Multi-User Searcha...
PDF
Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...
PPTX
Stream processing IoT time series data with Kafka & InfluxDB | Al Sargent, In...
PPTX
Tim Hall [InfluxData] | InfluxDB Roadmap | InfluxDays Virtual Experience Lond...
PDF
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
PPTX
Microsoft Azure Big Data Analytics
PDF
Intro to Time Series
PDF
Virtual training Intro to InfluxDB & Telegraf
PDF
Spark Summit - Stratio Streaming
PPTX
Shashi Raina [AWS] & Al Sargent [InfluxData] | Build Modern Monitoring with I...
Time Series to Vectors: Leveraging InfluxDB and Milvus for Similarity Search
Build an Edge-to-Cloud Solution with the MING Stack
Introducing InfluxDB Cloud Dedicated
Maximizing Real-Time Data Processing with Apache Kafka and InfluxDB: A Compre...
Intro to InfluxDB
Lessons Learned Running InfluxDB Cloud and Other Cloud Services at Scale by T...
The hidden engineering behind machine learning products at Helixa
Creating and Using the Flux SQL Datasource | Katy Farmer | InfluxData
Cortana Analytics Workshop: Real-Time Data Processing -- How Do I Choose the ...
IRJET- An Approach for Implemented Secure Proxy Server for Multi-User Searcha...
Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...
Stream processing IoT time series data with Kafka & InfluxDB | Al Sargent, In...
Tim Hall [InfluxData] | InfluxDB Roadmap | InfluxDays Virtual Experience Lond...
Michael Hall [InfluxData] | Become an InfluxDB Pro in 20 Minutes | InfluxDays...
Microsoft Azure Big Data Analytics
Intro to Time Series
Virtual training Intro to InfluxDB & Telegraf
Spark Summit - Stratio Streaming
Shashi Raina [AWS] & Al Sargent [InfluxData] | Build Modern Monitoring with I...
Ad

More from InfluxData (20)

PPTX
Announcing InfluxDB Clustered
PDF
Best Practices for Leveraging the Apache Arrow Ecosystem
PDF
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
PDF
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
PDF
Meet the Founders: An Open Discussion About Rewriting Using Rust
PDF
Gain Better Observability with OpenTelemetry and InfluxDB
PPTX
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
PDF
How Delft University's Engineering Students Make Their EV Formula-Style Race ...
PPTX
Introducing InfluxDB’s New Time Series Database Storage Engine
PDF
Start Automating InfluxDB Deployments at the Edge with balena
PDF
Understanding InfluxDB’s New Storage Engine
PDF
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
PPTX
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
PDF
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
PDF
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
PDF
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
PDF
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
PDF
Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022
PDF
Jay Clifford [InfluxData] | Tips & Tricks for Analyzing IIoT in Real-Time | I...
PDF
Brian Gilmore [InfluxData] | Use Case: IIoT Overview | InfluxDays 2022
Announcing InfluxDB Clustered
Best Practices for Leveraging the Apache Arrow Ecosystem
How Bevi Uses InfluxDB and Grafana to Improve Predictive Maintenance and Redu...
How Teréga Replaces Legacy Data Historians with InfluxDB, AWS and IO-Base
Meet the Founders: An Open Discussion About Rewriting Using Rust
Gain Better Observability with OpenTelemetry and InfluxDB
How a Heat Treating Plant Ensures Tight Process Control and Exceptional Quali...
How Delft University's Engineering Students Make Their EV Formula-Style Race ...
Introducing InfluxDB’s New Time Series Database Storage Engine
Start Automating InfluxDB Deployments at the Edge with balena
Understanding InfluxDB’s New Storage Engine
Streamline and Scale Out Data Pipelines with Kubernetes, Telegraf, and InfluxDB
Ward Bowman [PTC] | ThingWorx Long-Term Data Storage with InfluxDB | InfluxDa...
Scott Anderson [InfluxData] | New & Upcoming Flux Features | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Closing Thoughts | InfluxDays 2022
Steinkamp, Clifford [InfluxData] | Welcome to InfluxDays 2022 - Day 2 | Influ...
Steinkamp, Clifford [InfluxData] | Closing Thoughts Day 1 | InfluxDays 2022
Paul Dix [InfluxData] The Journey of InfluxDB | InfluxDays 2022
Jay Clifford [InfluxData] | Tips & Tricks for Analyzing IIoT in Real-Time | I...
Brian Gilmore [InfluxData] | Use Case: IIoT Overview | InfluxDays 2022

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
KodekX | Application Modernization Development
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Advanced IT Governance
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Modernizing your data center with Dell and AMD
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Electronic commerce courselecture one. Pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
Approach and Philosophy of On baking technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
KodekX | Application Modernization Development
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Advanced IT Governance
Mobile App Security Testing_ A Comprehensive Guide.pdf
Unlocking AI with Model Context Protocol (MCP)
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
20250228 LYD VKU AI Blended-Learning.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Per capita expenditure prediction using model stacking based on satellite ima...
Modernizing your data center with Dell and AMD
Diabetes mellitus diagnosis method based random forest with bat algorithm
Electronic commerce courselecture one. Pdf
NewMind AI Weekly Chronicles - August'25 Week I
Chapter 3 Spatial Domain Image Processing.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation

Power Your Predictive Analytics with InfluxDB

  • 1. | © Copyright 2023, InfluxData Predictive Analytics Using a Time Series Database Anais Dotis-Georgiou July 2023
  • 2. | © Copyright 2023, InfluxData 2 Anais Dotis-Georgiou Developer Advocate LinkedIn
  • 3. | © Copyright 2023, InfluxData | © Copyright 2023, InfluxData Agenda ● What is Predictive Analytics? ● Time Series Databases ● Use Cases ● Using Quix, Hugging Face and InfluxDB 3.0 for forecasting and anomaly detection ● Resources
  • 4. What is Predictive Analytics
  • 6. The age of instrumentation Instrumentation of the virtual world (DevOps) Sensors in the physical world (IoT)
  • 7. Characteristics of the data • Time-stamped • Generated in regular (metric) and irregular (event) time periods • Huge volumes • Real time and time sensitive
  • 8. Time series in every application Infrastructure & data sources Consumer & Industrial IoT Software Infrastructure Renewable & alternative energy systems Manufact uring & industrial platforms Fleet management & telematics Real-time Applications Developer Tools & APIs Kubernetes (K8s) DevOps Monitoring Gaming Applications Fintech Applications Network Monitoring TIME SERIES DATA
  • 9. Rise of time series as a category TIME SERIES RELATIONAL DOCUMENT SEARCH • Distributed search • Logs • Geo • High throughput • Large document • Orders • Customers • Records • Events, metrics, time stamped • for IoT, analytics, cloud native Time series is fastest growing data category by far Time series All others source: DB Engines
  • 10. | © Copyright 2023, InfluxData Characteristics of the data • Time-stamped • Generated in regular (metric) and irregular (event) time periods • Huge volumes • Real time and time sensitive
  • 11. | © Copyright 2023, InfluxData InfluxDB is 3 things API & Toolset POWERFUL for real-time apps HIGH PERFORMANCE MASSIVE for real-time data workloads of cloud & open source developers 1 2 3 Time Series Engine Community & Ecosystem
  • 12. | © Copyright 2023, InfluxData InfluxData Reference Architecture
  • 13. | © Copyright 2023, InfluxData | © Copyright 2023, InfluxData InfluxDB’s new storage engine is built on ● Rust ● Apache Arrow ● Apache Parquet ● Arrow Flight ● DataFusion
  • 14. | © Copyright 2023, InfluxData | © Copyright 2023, InfluxData Release Details 14
  • 15. | © Copyright 2023, InfluxData SQL Support 15
  • 18. Using Quix, Hugging Face and InfluxDB 3.0 for forecasting and anomaly detection
  • 21. | © Copyright 2023, InfluxData The Dataset
  • 22. | © Copyright 2023, InfluxData The Quix Pipeline
  • 23. | © Copyright 2023, InfluxData 23
  • 24. | © Copyright 2023, InfluxData Source Project 24
  • 25. | © Copyright 2023, InfluxData import influxdb_client_3 as InfluxDBClient3 client = InfluxDBClient3.InfluxDBClient3(token=os.environ["INFLUX_TOKEN"], host=os.environ["INFLUX_HOST"], org=os.environ["INFLUX_ORG"], database=os.environ["INFLUX_DATABASE"]) 25
  • 26. | © Copyright 2023, InfluxData def get_data(): # Query InfluxDB Cloud 3.0 while run: try: query = "SHOW TAG VALUES WITH KEY = "machineID"" table = client.query(query=query, language="influxql") machines = table["value"].to_pylist() for machine in machines: # this will end up loop when all data has been sent table = client.query(query=f"SELECT vibration, machineID FROM machine_data WHERE time >= now() - 5m AND machineID = '{machine}'", language="influxql") df = table.to_pandas() print(df) if df.empty: break # If there are rows to write to the stream at this time stream_producer.timeseries.buffer.publish(df) sleep(int(os.environ["task_interval"])) except: print("query failed") sleep(int(os.environ["task_interval"])) 26
  • 27. | © Copyright 2023, InfluxData Event Detection Project 27
  • 28. | © Copyright 2023, InfluxData Training the Model 28
  • 29. | © Copyright 2023, InfluxData 29
  • 30. | © Copyright 2023, InfluxData from huggingface_hub import from_pretrained_keras # Quix injects credentials automatically to the client. # Alternatively, you can always pass an SDK token manually as an argument. client = qx.QuixStreamingClient() print("Opening input and output topics") consumer_topic = client.get_topic_consumer(os.environ["input"], "default-consumer-group") producer_topic = client.get_topic_producer(os.environ["output"]) model = from_pretrained_keras(os.environ["model"]) 30
  • 31. | © Copyright 2023, InfluxData Forecasting Transformation Project 31
  • 32. | © Copyright 2023, InfluxData df = df.set_index('timestamp') data = df.drop(columns=['iox::measurement', 'machineID']) fit = Holt(data,damped_trend=True,initialization_method="estimated").fit(optimized=True) fcast = fit.forecast(10).rename("Multiplicative damped trend") fcast = fcast.reset_index().rename(columns={'index': 'timestamp'}) 32
  • 33. | © Copyright 2023, InfluxData Write Project 33
  • 34. | © Copyright 2023, InfluxData import influxdb_client_3 as InfluxDBClient3 client = qx.QuixStreamingClient() # get the topic consumer for a specific consumer group topic_consumer = client.get_topic_consumer(topic_id_or_name = os.environ["input"], consumer_group = "empty-destination") client = InfluxDBClient3.InfluxDBClient3(token=os.environ["INFLUX_TOKEN"], host=os.environ["INFLUX_HOST"], org=os.environ["INFLUX_ORG"], database=os.environ["INFLUX_DATABASE"]) def on_dataframe_received_handler(stream_consumer: qx.StreamConsumer, df: pd.DataFrame): # do something with the data here df = df.rename(columns={'timestamp': 'time'}) df = df.set_index('time') client.write(df, data_frame_measurement_name='mlresult', data_frame_tag_columns=['machineID']) print("Write successful") 34
  • 36. | © Copyright 2023, InfluxData Get Started 36 influxdata.com/influxdb-engine-beta/
  • 37. | © Copyright 2023, InfluxData InfluxDB Community Slack workspace Please join us in the InfluxDB Community Slack at www.influxdata.com/slack. To participate in conversations, join the #influxdb_iox channel.
  • 38. | © Copyright 2023, InfluxData 38 influxdata.com https://github.com/InfluxCommunity
  • 39. | © Copyright 2023, InfluxData 39 Try it yourself https://www.influxdata.com https://github.com/InfluxCommunity Get Started
  • 40. | © Copyright 2023, InfluxData Get Help + Resources! 40 Forums: community.influxdata.com Slack: influxcommunity.slack.com GH: github.com/InfluxCommunity Docs: docs.influxdata.com Blogs: influxdata.com/blog InfluxDB University: influxdata.com/university
  • 41. | © Copyright 2023, InfluxData T H A N K Y O U