当前位置:网站首页>Doubts about using the incluxdb database
Doubts about using the incluxdb database
2022-07-23 12:37:00 【cg101202】
InfluxDB Is an open source database for time series data storage , Here are some doubts in the process of use ( in the light of 1.8.x edition ).
About Client edition
The new version is recommended in the official documents Python Client,Python Package name isinfluxdb_client, This client is for InfluxDB2.0 Version developed , But compatible 1.8.x edition . If there is a new version, there must be an old version ,Python Package name isinfluxdb, The adaptation is mentioned in its documentation 1.7 Up to . Actual test findings , The old client can also be in 1.8.1 Upper use .About query language
There are currently two query languages , They are classic models InfluxQL And new models Flux. The two are different in grammar , There is no in-depth understanding of , So I don't know the advantages and disadvantages .
2.1 client
It's worth make complaints about. , The old version client usesInfluxQLLanguage , The new version client usesFlux. The query interfaces provided are also different , There are great differences in the organization and format of the returned results :InfluxQLProvide ResultSet and DataFrame Query interface .FluxProvide FluxTable、CSV、DataFrame and Raw Data Four kinds of queries API.
2.2 Date and time
- InfluxQL Support RFC3339 Format and class RFC3339 Format
- Flux Support only RFC3339 Format , The time part is optional , If the time is omitted, it defaults to midnight of the day ( zero ).
2.3 HTTP API
Two query languages HTTP API It's a little different , There are great differences in the organization and format of the returned results :InfluxQLDefault GET request , You can also use POST request , return json Results in format .FluxAccept POST request , return annotated CSV Results in format .
Please check the document for details :Query data with the InfluxDB API
About Flux Query returns by default DataFrame list
In the use ofinfluxdb_clientOfquery_data_frameQuery the samemeasurementwhen , By default, the returned result is always a DataFrame list ,g The root cause is that it defaults totag,field,measurementConductgroup. If you want to return a table , have access to|> group()Mask default group operation .About
influxdbinInfluxDBClientandDataFrameClientThe difference between the return result format of the interface
InfluxDBClient:
Single sentence query returnsResultSet
Multiple queries returnlist, Element isResultSet
DataFrameClient:
SingleSHOWsentence , The type of the returned result isResultSet
MultipleSHOWsentence , The type of the returned result islist, Element isResultSet
SingleSELECTsentence , The return result iscollections.defaultdict, Its key Is the name of the watch ,value byDataFrame.
MultipleSELECTsentence , The return result ismap iterator( Yes Python3 for ), The iterative value iscollections.defaultdict.
To sum up, combined with the source code, we can get : onlySELECTThe first sentence will turn intoDataFrameFormat and the format of the returned result is different .influxandinfluxdinfluxStart a command line interface , Executable for management InfluxDB Many aspects of the order .influxdStart and run InfluxDB Processes required for normal operation .
for example ,influxd configDefault display configurationAbout hardware configuration requirements
Used in projects InfluxDB It is recommended to evaluate the hardware configuration requirements first , And in use , Adjust in time according to the situation .Hardware sizing guidelines | InfluxDB OSS 1.8 DocumentationKey concepts
point: Represents a data record , from measurement、tag set、field set as well as timestamp form . By itsseriesand timestamp Unique identification .series: from measurement、tag set、field key Logical grouping of defined data .
边栏推荐
- 嵌入式从入门到精通(入土)——超详细知识点分享1
- 对字符串函数的使用和理解(1)
- 钢结构复习题
- 谈谈转动惯量
- [talent column] can't you use Apache dolphin scheduler? It takes a month to write the most comprehensive introductory teaching [2]
- K-nucleotide frequencies (KNF) or k-mer frequencies
- C语言小项目——学生成绩管理系统
- [AUTOSAR com 1. introduction to communication protocol stack]
- Data analysis of time series (I): main components
- Navicat for MySQL 安装教程
猜你喜欢

用单向链表实现 队列

ARM架构与编程6--重定位(基于百问网ARM架构与编程教程视频)

Baidu Shen Shuo: focus on the scene, deeply cultivate the industry, and bring practical results to enterprise Digitalization

Talent column | can't use Apache dolphin scheduler? The most complete introductory tutorial written by the boss in a month

C语言小项目——学生成绩管理系统
![[AUTOSAR com 1. introduction to communication protocol stack]](/img/ed/e61ca1e37817a81fc6eada54192876.png)
[AUTOSAR com 1. introduction to communication protocol stack]
博客搭建一:框架选择
![[AUTOSAR CP general 1. how to read AUTOSAR official documents]](/img/3a/8521278a4bd21bb269603a52f07b0e.png)
[AUTOSAR CP general 1. how to read AUTOSAR official documents]

钢结构基本原理题库

Blog Building II: next theme related settings beta
随机推荐
Deep convolution generation countermeasure network
Blog Building II: next theme related settings beta
【Autosar CP通用 1.如何阅读Autosar官方文档】
配置TX1的系统 + 设为固态盘启动
Using pycaret for data mining: association rule mining
Anonymous upper computer V7 waveform display
高分子物理名词解释归纳
Knowledge structure of advanced algebra
switch实现表达式计算
Talent column | can't use Apache dolphin scheduler? The most complete introductory tutorial written by the boss in a month
钢结构基本原理全面详细总结
LeetCode——136. 只出现一次的数字
Interpretation of the paper: "bert4bitter: a basic model for improving bitter peptide prediction based on transformer (BERT) bidirectional encoder representation"
Data analysis of time series (III): decomposition of classical time series
博客搭建一:框架选择
单片机学习笔记7--SysTick定时器(基于百问网STM32F103系列教程)
高等代数100道题及答案解析
Using Google or tools to solve logical problems: Zebra problem
NLP natural language processing - Introduction to machine learning and natural language processing (I)
5.4 installation and use of pyinstaller Library