---
title: "Time Series and Other Features"
url: "https://docs.ravendb.net/6.2/document-extensions/timeseries/time-series-and-other-features"
version: "6.2"
language: "nodejs"
---

# Time Series and Other Features

> Client language: Node.js. Also available for [C#](https://docs.ravendb.net/6.2/document-extensions/timeseries/time-series-and-other-features.md).
>
> RavenDB publishes an official agent skill for coding assistants at https://docs.ravendb.net/skills/ravendb/SKILL.md (also installable with `npx skills add ravendb/skills`). The skill describes itself as: "Read this before writing any RavenDB query, client call or /databases/ request. Covers server setup, document modelling, the Node.js, .NET and Python clients, RQL, indexes, vector search and AI agents. Code written from recall tends to run and return the wrong rows, because RQL resembles SQL and the clients take field names as plain strings."

> **Note**
>
> - This page describes how time series interact with various other RavenDB features.
>
> - Features not listed here either have no special behavior regarding time series,  
>   or they have their own pages describing their interaction with time series (such as [indexing](https://docs.ravendb.net/6.2/document-extensions/timeseries/indexing.nodejs.md)).
>
> - In this page:
>   - [General features](#general-features)
>   - [Smuggler](#smuggler)
>   - [Ongoing tasks](#ongoing-tasks)
>   - [Revisions](#revisions)

## General features

- The Document Session [tracks](https://docs.ravendb.net/6.2/client-api/session/what-is-a-session-and-how-does-it-work.nodejs.md#tracking-changes) changes to time series data.
- The [Changes API](https://docs.ravendb.net/6.2/client-api/changes/what-is-changes-api.nodejs.md) service is triggered by changes to time series data.
- Learn about how to **index** time series [here](https://docs.ravendb.net/6.2/document-extensions/timeseries/indexing.nodejs.md).
- Learn about how to **query** time series data [here](https://docs.ravendb.net/6.2/document-extensions/timeseries/querying/overview-and-syntax.nodejs.md).
- Learn how to **include** time series with `session.Load()` and in queries [here](https://docs.ravendb.net/6.2/document-extensions/timeseries/client-api/session/include/overview.nodejs.md).

## Smuggler

[Smuggler](https://docs.ravendb.net/6.2/client-api/smuggler/what-is-smuggler.nodejs.md) is a DocumentStore property that can be used to export selected database items to an external file
or import database items from an existing file into the database.

To [configure smuggler](https://docs.ravendb.net/6.2/client-api/smuggler/what-is-smuggler.nodejs.md#databasesmugglerexportoptions) to handle time series,
add the string `TimeSeries` to the `operateOnTypes` array:

```javascript
const options = new DatabaseSmugglerExportOptions();
options.operateOnTypes = ["Documents", "TimeSeries"];
```

## Ongoing tasks

[Ongoing tasks](https://docs.ravendb.net/6.2/studio/database/tasks/ongoing-tasks/general-info.md) are various automatic processes that operate on the database.  
Some of these apply to time series data, while others do not.

#### Tasks that apply to time series

- [External replication](https://docs.ravendb.net/6.2/server/ongoing-tasks/external-replication.md) creates a complete copy of a database, including documents and their extensions.
- [Hub/Sink replication](https://docs.ravendb.net/6.2/server/ongoing-tasks/hub-sink-replication.md) allows you to create a live replica of a database or a part of it,  
  including documents' time series, using Hub and Sink tasks.
- [Backups](https://docs.ravendb.net/6.2/client-api/operations/maintenance/backup/backup-overview.md) save the whole database at a certain point in time and can be used to restore the database later.  
  All kinds of backups include time series data: logical-backup and snapshot, full and incremental.
- [RavenDB ETL](https://docs.ravendb.net/6.2/server/ongoing-tasks/etl/raven.md#time-series) is a type of task that *extracts* some portion of the data from a database, *transforms* it according to a script,  
  and *loads* it to another RavenDB database on another server.

#### Tasks that cannot be applied to time series

- [SQL ETL](https://docs.ravendb.net/6.2/server/ongoing-tasks/etl/basics.md), another type of ETL that can set a relational database as its target.
- [Data Subscriptions](https://docs.ravendb.net/6.2/client-api/data-subscriptions/what-are-data-subscriptions.nodejs.md) send data to "worker" clients in batches.

> **Info**
>
> Support for time series in ETL is planned for one of the next releases.

## Revisions

[Revisions](https://docs.ravendb.net/6.2/document-extensions/revisions/overview.nodejs.md) are old versions of a document.  
They can be created manually or by setting a policy that creates them automatically on selected collections.

Revisions do not preserve time series data, and editing a time series does not trigger the creation of a new revision as editing a document would.
This is because time series are designed to accommodate frequent additions of new entries quickly, and creating revisions each time would significantly slow down this process.

However, revisions are triggered / created manually if a *new* time series is added to the document,  
or an existing time series is deleted. (Remember that a time series is deleted by deleting all of its entries).

#### The `@timeseries-snapshot` metadata property

While revisions don't contain the time series data themselves, they do include few details about the time series the document had at the time.
These details appear in the `@timeseries-snapshot` property within the document's metadata.
When a revision is viewed in the studio, this metadata property looks like this:

![NoSQL Database Time Series Feature](https://docs.ravendb.net/assets/images/TSSnapshot-5ae61cff4cbef36bf23922d3b4b68226.png)

This time series snapshot property can also be accessed by loading a revision in the client.  
This is the general JSON format of the time series snapshot:

```json
"@metadata": {
  ...
  "@timeseries-snapshot": {
      "<the name of a time series>": {
          "Count": <the number of entries>,
          "Start": "<timestamp of first entry>",
          "End": "<timestamp of last entry>"
      },
      "<the name of the next time series>": { ... }
  }
```

## See also

- [Time Series Overview](https://docs.ravendb.net/6.2/document-extensions/timeseries/overview.md)
- [What is a Session and How Does it Work](https://docs.ravendb.net/6.2/client-api/session/what-is-a-session-and-how-does-it-work.nodejs.md)
- [External Replication](https://docs.ravendb.net/6.2/server/ongoing-tasks/external-replication.md)
- [Ongoing Tasks](https://docs.ravendb.net/6.2/studio/database/tasks/ongoing-tasks/general-info.md)
