Flux query language and Influxdb basics

preview_player
Показать описание
In order to understand some of my future videos coming, I wanted to lay the basics of InfluxDB and Flux query language. I go into how Flux 2.x differs from 1.x and also traditional SQL, what the data structure looks like and how to build simple queries in Flux.

Chapters:
0:00 Intro
0:43 1.x and 2.x, databases, buckets and retention policies
5:45 Measurements, tag and fields
11:16 Time window and aggregation period
13:22 How data is filtered
20:48 Flux query language
37:10 Outro
Рекомендации по теме
Комментарии
Автор

Another great vid - I am building up a new NUC to hold mainly node-red, influx and grafana. I have an older v1.x influx with several years worth of data that I may try and transfer. So good timing on your part :)

BGazzah
Автор

Great video! thank you for the insightful knowledge into how the query builder generates code for you if you are not sure how to write the flux equivalent.

StephenRerri-Bekibele
Автор

I am glad I found your video, cause now I understood a bit more about the influxdb queries, however I think there is still a lot of hesitation/mistakes that are slightly degradating the comprehension of the video, that's a point for improvement. Thanks a lot for your time and explanations! 👍

someone_there
Автор

Great intro video! I have been doing a deep dive into influx DB 2.x, telegraf, grafana etc and it took me a while to get my bearings coming from just a SQL background. One note about the video, the image of you narrating obscures the bottom right corner of the panel which is important to see :)

miketancsa
Автор

Great content. I'm going to switch from 1.x to 2.x and this is very useful for me. Keep going :)

tomekem
Автор

Thanks! the SQL comparisons are especially helpful.

jackbenimble
Автор

Hello, I have a query:
If the values in left most column "table MEAN" represent mean of the window, how can mean be 0 (15:08 timestamp in video). Also, if I don't have any aggregate function in place, the column becomes "table _RESULT" and has int values (0, 3) [my local db]. What do they represent?

niyantazamindar
Автор

Finally, some good content for novice users. Garbage training materials from influxdb, very frustrating start... Thank you kindly, Sir.

archilizer
Автор

Good Job! please continue and do something with influx 1.x also.

jafarekrami
Автор

Hello Csongor! Nice video as always from you! In one of your earlier video I saw you installed esphome without home assistant on one of your iot device. My question is whether you could send datas from esphome to influxdb. I am not sure, but as far as I know influxdb plugin for esphome is not existent. You can disable the standard api of esphome and change to mqtt and then you can use a mqtt->influxdb connector to send data from esphome to influxdb. However, I think it is not am elegant way. Do you have any experience about that. Thanks for your answer.

nor
Автор

Thanks for a great tutorial Csongor Varga, ! Is your bucket mydb available anywhere? Thought it would help a lot if I can have the same data setup locally when I wath the different chapters in the video

aaaliasx
Автор

hi men good video, an question is there a way to get the number of rows returned by a query?

gabrielarispe
Автор

In influxdb is it possible to find which exact query, index, measurement using high memory or cpu in percentage wise. Is there any document along with commands/syntax for checking these. can you help on this

satishkamma
Автор

hi .. may i know how to do query database for influx for speceifi date and time . let say query from 1jan2022 8am to 2jan2022 8am

azrinbaharin
Автор

Hi, I just want to know how you are writing the data into the influxdb. If you can share the that file, it will be very helpful

sttouxb
Автор

This was really useful, especially the bit about deleting Influx data. I'm using Node-RED to send data from multiple current clamp sensors (Emporia, data collected in HA). I have a function node that just takes the MQTT topic and converts it into an object key, with the number as the value. However for some reason, one of the sensors gives an error: failure writing points to database: partial write: field type conflict: input field "empty_10_1min" on measurement "emporia_power" is type float, already exists as type string dropped=1". So obviously some time in the past it has written a string, and so that measurement type is a string. I thought I could just delete all the data in that field by running the delete command, but that doesn't seem to work. Is there a way to fully delete a field itself (not just the data within the field)?

MatSmithLondon
Автор

Dear Varga. How can we create measurement in influxdb 2.1 OSS for my Bucket? Because your video state that already created measurement like sensor mydb bucket.

gopalr
Автор

I was looking forward to this video but the background music is too loud and annoying, had to stop two minutes in.

unknown
Автор

So you did not show how to create a measurement!

manpt
Автор

Informative but the background music needs to go!

kzm