TIMESTORE
Stores key-value pairs over a specified time period. To query stored values use TIMEQUERY. This function only stores data in memory. As soon as the app stops and restarts again the data collection starts over. To store data persistent use a Stream function connecting to a data base (e.g. TimescaleDB).
Syntax
=TIMESTORE(Json, [Period], [TimeSerial], [Limit])
Arguments
Name | Type | Description |
---|---|---|
Json | JSON | A JSON object which contains the key-value pairs to store. |
Period (optional) | Number | The time period in seconds over which data is collected. Older data is dropped. Default value: 60 |
TimeSerial (optional) | Number | A serial number to use as key for each stored value. Note: data is always sorted according to its corresponding timestamp. Default value: "Serial Number of now" |
Limit (optional) | Number | Specifies the maximum number of values stored. If limit is reached the function returns a #LIMIT error. Defaults to 1000. Default value: 1000 |
Return
Type | Description |
---|---|
Boolean | TRUE, if successful. |
Examples
Example Sheet
A | B | |
---|---|---|
1 | v1 | =A1+1 |
2 | v2 | =RANDBETWEEN(0,100) |
Formula | Result | Comment |
---|---|---|
| Stores the values for v1 and v2 on each step. | |
| Same as before but stores only over a period of 100 seconds and limits number of stored values to 10 |
Storing data from Berlin, Paris and London. Now a TIMEQUERY can be used to access the stored values