一、常见的几种错误
1.1 unable to parse '........': invalid boolean
Error: failed to write data: 400 Bad Request: unable to parse '........': invalid boolean
1.2 类型错误
Error: failed to write data: 422 Unprocessable Entity: failure writing points to database: partial write: field type conflict: input field "signal_strength" on measurement "pos_location" is type float, already exists as type integer dropped=1
Error: failed to write data: 422 Unprocessable Entity: failure writing points to database: partial write: field type conflict: input field "status" on measurement "pos_location" is type float, already exists as type string dropped=1
二、解决方式
1)整数型需要在数值后面加“i”,;
2)字符串前后加双引号“”;
特别是包含短划线“-”的字符串必须加双引号表示字符串。
在wps或excel 界面上修改是没有作用的,字符串"00000"如果不加双引号会在导入时自动识别为数值型。
而整数型如果不加i,会默认识别为float型。

本文总结了InfluxDB数据写入过程中常见的两种错误:无法解析无效布尔值及类型冲突,并提供了相应的解决方案,包括如何正确表示整数和字符串等。
1万+

被折叠的 条评论
为什么被折叠?



