Starting with streamsheets

Hi Eckehard,

Bug: The white spaces are a known issue and will be fixed with the next release. This happens, if you zoom with your Browser instead with the Zoom Tool in the Streamsheets. Check if you can see this sign: image

MongoDB:
By trying to cover most of the MongoDB functions, I might have made the example a bit too complex. Sorry about the confusion. :confused:

Time Series:
It is possible to create a time series in MongoDB. You can sort by the creation time of the MONGO.STORE entities using either ā€œ1ā€ or ā€œ-1ā€ in the sort parameter of your Query. With every MONGO.STORE MongoDB automatically stores an ā€œ_idā€ Value to have a unique key this is used to sort items.
If you want to sort by other parameters you can add the data range of cells looking like this to the sort field,
image
{ arduino_test: 1}

or use MONGO.AGGREGATE and the MongoDB operators.

Did this answer your question?

Count:
The problem with MONGO.COUNT seems to be, that somehow there is a problem displaying a count number of 0. I will look into this. Thank you for bringing this to my attention!
Reason for the count number of 0 is, that Streamsheets usually calculate faster, then the information can be processed from the MONGO.STORE to the DB and back to the MONGO.COUNT within one step of a Streamsheet.

Since you are counting items, which are very likely to be unique key value pairs (I guess the combination of the values of ā€œarduino_testā€ and ā€œarduino_test_deltaā€ are always unique), the answer of the count will always be 0. Here you can also use the INBOX() entry if you want.

Query:
It can be easier to use the Inbox as a target for your query response (use INBOX() instead of a cell range). This way you have an overview over all data. The grid is only showing you the amount of data possible to display within the given TargetRange.

=MONGO.QUERY(|MongoStore,ā€œtest1ā€,,INBOX())

This seems to be the case for your query. The reason {JSON Object} is shown in column F is because there is not enough space left to display all your data. The parameter ā€œarduino_test_lostā€ and ā€œPacketDifferenceā€ donā€™t fit in one column. Further, we again have the issue, that zeros are not displayed very well. We are looking into this issue.

JSON():
You were right, I have missed the JSON() function. I added it to the documentation.
It basically structures the data in cells into a JSON Object. Streamsheets converts all data that flows into JSON. But also other Systems use JSON as a data format. E.g. MongoDB uses JSON to store information.

I hope this help :slight_smile:

Cheers

Tizian