Docs Menu

Docs HomeNode.js

Time Series

On this page

  • Overview
  • Create a Time Series Collection
  • Query a Time Series Collection

In this guide, you can learn about time series collections in the MongoDB Node.js driver.

We recommend that you create a time series collection using the MongoDB Shell (mongosh). For detailed instructions on creating a time series collection using the MongoDB Shell, see our MongoDB Manual entry on time series collections.

Since you query a time series collection in the same way you query other collection types in MongoDB, the Node.js driver has no features specifically for querying time series data.

For more information on querying data in the MongoDB Node.js driver, see the following resources:


Window Functions

MongoDB version 5.0 introduces window functions into the MongoDB aggregation framework. You can use window functions to perform operations on a contiguous span of time series data. For more information, see the reference documentation for the $setWindowFields aggregation stage.

←  Encrypt FieldsTypeScript →
Share Feedback
© 2023 MongoDB, Inc.


  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.