[BUG]: Plugin Clickhouse Flusher: back-slash lost when writing data contains '\'
BetaCat0 opened this issue · comments
Describe the bug
Plugin flusher Clickhouse:
Back-slash lost when writing data contains \
iLogtail Running Environment
Please provide the following information:
- ilogtail version:
1.8.0 - Yaml configuration:
NaN - ilogtail.LOG:
NaN - logtail_plugin.LOG:
NaN
I noticed that the allocated JSON data becomes invalid after being sent back to ClickHouse. The code provided below constructs SQL without escaping special characters, as indicated in the ClickHouse official documentation. It appears that there might be a workaround by escaping these characters before sending them. However, I am uncertain if this is the correct approach to resolving the issue.
这个不是 flusher 的 bug,是 ck 的问题
比如:插入时是 \"
,入库时就是 "
我前几天遇到的问题也是,导致 ck 的 json 函数报错,所以直接改源码,改成合适自己的业务
https://github.com/starriesWEB/ilogtail#change
这个不是 flusher 的 bug,是 ck 的问题 比如:插入时是
\"
,入库时就是"
我前几天遇到的问题也是,导致 ck 的 json 函数报错,所以直接改源码,改成合适自己的业务 https://github.com/starriesWEB/ilogtail#change
好的,感谢~
@BetaCat0 @starriesWEB 方便的话可以留一下使用场景,万分感谢🙏:#693