diff --git a/apps/emqx_bridge_influxdb/src/emqx_bridge_influxdb_connector.erl b/apps/emqx_bridge_influxdb/src/emqx_bridge_influxdb_connector.erl index 1fe5b4f78..be5ed6b1c 100644 --- a/apps/emqx_bridge_influxdb/src/emqx_bridge_influxdb_connector.erl +++ b/apps/emqx_bridge_influxdb/src/emqx_bridge_influxdb_connector.erl @@ -638,8 +638,10 @@ value_type([UInt, <<"u">>]) when is_integer(UInt) -> {uint, UInt}; -value_type([Float]) when is_float(Float) -> - Float; +%% write `1`, `1.0`, `-1.0` all as float +%% see also: https://docs.influxdata.com/influxdb/v2.7/reference/syntax/line-protocol/#float +value_type([Number]) when is_number(Number) -> + Number; value_type([<<"t">>]) -> 't'; value_type([<<"T">>]) -> diff --git a/changes/ee/fix-11223.en.md b/changes/ee/fix-11223.en.md new file mode 100644 index 000000000..6d97746be --- /dev/null +++ b/changes/ee/fix-11223.en.md @@ -0,0 +1,5 @@ +In InfluxDB bridging, if intend to write using the float data type but the placeholder represents the original value +as an integer without a decimal point during serialization, it will result in the failure of Influx Line Protocol serialization +and the inability to write to the InfluxDB bridge. + +See also: [InfluxDB v2.7 Line-Protocol](https://docs.influxdata.com/influxdb/v2.7/reference/syntax/line-protocol/#float)