Document Extensions: Time Series
- Time series are sets of numeric data items, associated with timestamps and ordered by time.
- The studio interface allows you to edit, query and index time series data, as well as view it as a list of entries or as a graph.
-
An Incremental Time Series is a special type of time series that allows you to handle time series values as counters.
Read more about incremental time series here, and learn how to define them through Studio below. -
In this page:
Document View
Time Series - Document View
Actions
- To view a document's time series, open its document view and click the time series tab on the right.
- Click 'Add Time Series' to create a new time series see more below.
- Click to view and modify time series data.
Info
-
A. Time series info:
- B. Name
Incremental Time Series names always begin with
INC:
E.g. INC: Downloads in the first time series listed above. - C. Number of entries
- D. Range of time from first to last entry
- B. Name
Time Series View
Time Series View
Actions
- Click to select another time series.
- Click to add a new entry to this time series (StockPrices), or click the dropdown to create a new time series.
- Delete all entries from a specified time range.
- Edit entry.
Info
-
Time series entry info:
- Timestamp
- Numerical data (1-32
double
values) - Optional tag
string
Create new Time Series (by Creating its First Entry)
-
A time series is created upon the creation of its first entry (and deleted once all entries have been deleted).
-
Click the Add Time Series button from the Document View to create the time series' first entry.
Add Time Series
Add Time Series Entry
-
Time Series Type
- Diasble to create a non-incremental time series.
(Learn now to create an incremental time series here)
- Diasble to create a non-incremental time series.
-
Time Series Name
- Enter time series' name.
- Name cannot start with 'INC:' as this prefix is reserved for incremental time series.
-
Entry Timestamp
- Select a timestamp for the new entry.
-
Tag (Optional)
- Optionally give the entry a tag.
-
Values
- Add one or more numerical values (up to 32 values).
- Time series entry values can be given meaningful names rather than labels like Value #0 and Value #1.
To set entry values' names, use Studio's Time Series Settings View.
- Add one or more numerical values (up to 32 values).
Editing an Entry
- Click the Edit Item button from the Time Series View to edit a time series' entry.
Edit Time Series
Edit Time Series Entry
- Edit the optional tag.
- Edit a numerical value.
- Delete value.
- Add an additional value (up to 32 values).
Deleting a Range of Entries
- Click the Delete Range button from the Time Series View to delete a range of time series entries.
Delete Range Button
Delete Range
To specify a range of time series entries:
- Start Date
Check Use minimum to use the first entry's timestamp as the start of the range, - End Date
Check Use maximum to use the last entry's timestamp as the end of the range.
- For either option, you can click the input bar and specify some other date in the date & time dialog shown below.
Delete Range - Pick Date and Time
Querying Time Series
Time Series Query
Actions
-
Enter your RQL query in the query box.
Depicted here is a query to get all the StockPrices time series values from documents in the Companies collection.
Learn more about time series queries here.Make sure that the time series Name is placed within double quotes (e.g. "StockPrices", "INC:Downloads", etc.), so special characters like ":" would not interfere with the query.
-
Click to run the query.
Info
-
Query Results - A list of time series that satisfy the query, with:
- The ID of the associated document.
- Number of entries and time range.
Time Series Query - Actions
- Click to open a tab with the time series query results shown in a table.
- Click to open a tab with the time series query results shown in a graph (see below).
-
Multiple documents selection
- A. Select multiple documents to plot their time series.
- B. Click to view the selected documents' time series results in a unified graph.
Results in Graph View
Time series results in a graph
- A graph of time series results in a selected time frame.
- A graph showing all the time series results over time.
- The selected time frame.
- A legend of time series entries' values.
The entry values names are set in Studio's Settings > Time Series view.
Time series results in a graph - Actions
- Click to go back to the query results tab.
- Display tabs with graph or table results.
- Drag or resize the selected time frame to view the corresponding results.
- Hover your mouse over the graph to view the data of one particular entry.
- Toggle viewing points or a continuous line.
- Check/Uncheck to plot or hide time series entries' values on the graph.
Incremental Time Series
-
Incremental Time Series are time series whose values behave as counters.
-
Similar to Counters, an incremental-time-series value can be increased/decreased by some delta on any node.
Each node manages and stores its own accumulated local changes per value. -
Simultaneous updates to the same value from multiple nodes do not create any conflict.
The value's total contents is simply the accumulation of that value's contents stored per node in the cluster for the same timestamp. -
This is opposed to non-incremental time series, where a value that is modified is intended to replace the existing value's contents on all other nodes.
-
learn more in Incremental Time Series -vs- Non-incremental Time Series.
Creating a new Incremental Time Series (by Creating its First Entry)
-
An incremental time series is created upon the creation of its first entry (and deleted once all entries have been deleted).
-
Click the Add Time Series button from the Document View to create the incremental time series' first entry.
Add Time Series
Add Incremental Time Series Entry
-
Time Series Type
- Enable to create an Incremental time series.
-
Time Series Name
- Enter time series' name.
- Incremental time series names must start with INC: (in either upper or lower case characters).
-
Entry Timestamp
- Select a timestamp for the new entry.
-
Values
- Add one or more numerical values (up to 32 values).
- Time series entry values can be given meaningful names rather than labels like Value #0 and Value #1.
To set entry values' names, use Studio's Time Series Settings View.
- Add one or more numerical values (up to 32 values).
Editing an Incremental Time Series Entry
- Click the Edit Item button from the Time Series View to edit a time series' entry.
Edit Time Series
Incrementall Time Series Entry Accumulated Value
-
Show values per node
- Enable to view the value's contents distribution per cluster node (see below).
When disabled, only the total value (the value's total contents) is visible.
- Enable to view the value's contents distribution per cluster node (see below).
-
Values
- Total Value
This is the value's total contents, which is the accumulation of this value's contents from all cluster nodes. - Increment By
The number you enter here is the delta that will be added to the value's contents on the current node.
Enter a positive number to increase the value or a negative number to decrease it.
The change in the value's total contents will be visible after you click the Save button.
- Total Value
- Add Value
Add an additional value (up to 32 values). - Save
Click to save your changes.
Incrementall Time Series Entry Node Values
-
Show values per node
- Enable to view the value's contents distribution per cluster node.
-
Values
- Total Value
This is the value's total contents, which is the accumulation of this value's contents from all cluster nodes. - Increment By
The number you enter here is the delta that will be added to the value's contents on the current node.
Enter a positive number to increase the value or a negative number to decrease it.
After clicking Save, both the current node and the total value will be updated with the new accumulated value.
The value will be modified only when you click the Save button.
- Total Value
- Add Value
Add an additional value (up to 32 values). - Save
Click to save your changes.