use InfluxDB line protocol to write to TDengine. VARCHAR fields contain garbled characters
wild-River2016 opened this issue · comments
问题描述
TDengine通过docker安装
使用restful基于influxdb行协议通过无模式写入,自动创建数据表和字段。相同方式有些表内容正常,没有乱码。有些表的字段部分内容为乱码。
复现过程:
Steps to reproduce the behavior:
-
调用restful接口,通过无模式写入,自动建表与字段
数据内容:
device_log_8111729689050682011,deviceId=7565654654545 content="{"headers":{"deviceName":"网关子设备-数据乱码测试","productId":"8111729689050682011","_uid":"1784458041063751681"},"messageType":"REPORT_PROPERTY","deviceId":"7565654654545","properties":{"temp":36.8},"timestamp":1714282925207}",createTime=1714282925488.0,id="1784458041965527040",timestamp=1714282925207.0,type="reportProperty" 1714282939917000000
相关排查说明:
TDengine配置文件中已经配置
通过手动指定字段类型为VARCHAR,然后通过相同方式写入数据,数据没有乱码。
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
请问在TDengine 的shell中也是一样的情况吗?可以截图发在这里吗
我猜测,是不是你没有对content的内容中的"进行转义?比如:
...content="{\"headers\":{\"deviceName\"...
jetlinks/jetlinks-community#515
我也遇到了,降低版本就正常,第一行数据正常,后面的数据开头的乱码,估计是docker最新镜像bug