You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure whether this is even supposed to work, but storing both numeric and string data within a single channel results in three issues:
Doing an export on such a channel will only return the numeric data. However, doing a tile request returns both.
Inserting a sample with string data for a timestamp which has no numeric data causes a numeric data value to be inserted as well, apparently from the neighboring timestamp.
Doing a gettile for a data sample at a time that has a string value but no numeric value returns 0 for the value. One would expect null instead.
Before illustrating the steps to reproduce, assume we have the following two JSON data files to insert into the datastore:
So far, so good. Now, insert the second data file. Note that this data file contains two string values, one at time 1450000003 and another at time 1450000007. Looking at data1.json, we see that there's no existing numeric data value for this channel at time 1450000003, but there is one (70) for time 1450000007.
So, there are the first two problems: no string values are getting exported at all and a numeric value (which we never inserted) is getting returned at time 1450000003. There's of course the question of how to report 2 values for a single timestamp (as with time 1450000007), but that's more of an implementation detail. Regardless, one would expect to at least see a string value for time 1450000003.
For gettile, we get the string values, but notice that the value at time 1450000003 is no longer being reported as 40--it's now 0. One would expect a null value, just like there are null values for the comment fields.
The text was updated successfully, but these errors were encountered:
Problem Description
I'm not sure whether this is even supposed to work, but storing both numeric and string data within a single channel results in three issues:
null
instead.Before illustrating the steps to reproduce, assume we have the following two JSON data files to insert into the datastore:
data1.json
data2.json
Steps To Reproduce
begin by inserting the first data file:
./bin/import --format json ./data-test 100 cpb_device ./data1.json
It should succeed with the following response:
Now do an export to verify:
./bin/export --csv ./data-test 100.cpb_device.foo
It should print the following:
Also verify by requesting a tile:
./bin/gettile ./data-test 100 cpb_device.foo -5 90625000
You should get the following:
So far, so good. Now, insert the second data file. Note that this data file contains two string values, one at time
1450000003
and another at time1450000007
. Looking atdata1.json
, we see that there's no existing numeric data value for this channel at time1450000003
, but there is one (70) for time1450000007
../bin/import --format json ./data-test 100 cpb_device ./data2.json
It should succeed with the following response:
Now do another export to verify:
./bin/export --csv ./data-test 100.cpb_device.foo
So, there are the first two problems: no string values are getting exported at all and a numeric value (which we never inserted) is getting returned at time
1450000003
. There's of course the question of how to report 2 values for a single timestamp (as with time1450000007
), but that's more of an implementation detail. Regardless, one would expect to at least see a string value for time1450000003
.Now do a gettile to see the difference:
./bin/gettile ./data-test 100 cpb_device.foo -5 90625000
For gettile, we get the string values, but notice that the value at time
1450000003
is no longer being reported as 40--it's now 0. One would expect anull
value, just like there arenull
values for the comment fields.The text was updated successfully, but these errors were encountered: