Importing data from influxDB
조회 수: 10 (최근 30일)
이전 댓글 표시
Have seen several questions related but not this one. I need to import data from an InfluxDB database. Will need to do calulations (running average, on time/day, etc and be able to plot the results. I have worked in MatLab before but it has been several years so am a little bit rusty. I can export the data to a csv file. Step one is to import the csv file. Ultimtly I would like MatLab to get the data directly. The format of the csv file looks like below. In this example I need the "_time", "_value" and "_field". I plan on changing the _value cell with the value in the _field columb.
I know how to strip off the first 3 rows and how to save only the columbs I need. How do I get the data to plot across multiple days without overlap.
Thanks.
#group FALSE FALSE TRUE TRUE FALSE FALSE TRUE TRUE TRUE
#datatype string long dateTime:RFC3339 dateTime:RFC3339 dateTime:RFC3339 double string string string
#default mean
result table _start _stop _time _value Category _field _measurement
0 2022-12-15T13:36:52.845486625Z 2022-12-17T13:36:52.845486625Z 2022-12-15T13:40:00Z 67 Temperature PBox_T PB_Air_T
0 2022-12-15T13:36:52.845486625Z 2022-12-17T13:36:52.845486625Z 2022-12-15T13:50:00Z 66.3 Temperature PBox_T PB_Air_T
0 2022-12-15T13:36:52.845486625Z 2022-12-17T13:36:52.845486625Z 2022-12-15T14:00:00Z 67.2 Temperature PBox_T PB_Air_T
0 2022-12-15T13:36:52.845486625Z 2022-12-17T13:36:52.845486625Z 2022-12-15T14:10:00Z 69.8 Temperature PBox_T PB_Air_T
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!