Empty String Support

40 views
Skip to first unread message

Artyom Sivkov

unread,
Sep 9, 2022, 7:53:13 AM9/9/22
to KairosDB
Dear community,

We have made some tests trying to insert the empty string value to KairosDB via /api/v1/datapoints but seems like this is not allowed:
{  "errors": [  "metric[0](name=artyom-test).value may not be empty." ] }

In our use case empty string is a valid data point so I wonder what is the reason for not supporting empty string?

Thanks in advance
Artyom


Brian Hawkins

unread,
Oct 1, 2022, 11:05:14 PM10/1/22
to KairosDB
I think this is just a case of never thinking an empty string is a valid data point.  I'll have to run some tests but I think it should be ok with some caveats.  You will need to explicitly tell kairos that the type of data is string.  The api has ways of doing that.

I'm guessing the restriction came before you could call out what the data type is and kairos had to figure it out on its own.  I'll test and post back here.

Brian

Brian Hawkins

unread,
Oct 4, 2022, 12:00:21 AM10/4/22
to KairosDB
I  just made a change to develop branch that allows empty strings to be inserted as string data points.  You have to specify the type though.

Brian

Artyom Sivkov

unread,
Oct 6, 2022, 7:25:52 AM10/6/22
to Brian Hawkins, KairosDB
Thanks a lot Brian!

--
You received this message because you are subscribed to a topic in the Google Groups "KairosDB" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kairosdb-group/jDSfDxiMQzM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kairosdb-grou...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kairosdb-group/2a44fe7e-b5d4-416a-badf-263804cc827dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages