Creating a time series through the wire listener

You can create time series with the MongoDB API through the wire listener. You create time series objects by adding definitions to time series collections.

Before you begin

You must understand time series concepts, the properties of your data, and how much storage space your data requires. For an overview of time series concepts and guidance on how to design your time series solution, see HCL OneDB™ TimeSeries solution.

Perform the following prerequisite tasks:

  • Connect to a database in which to create the time series table. You run all methods in the database.
  • Configure and start the wire listener for the MongoDB API. For more information, see Configuring the wire listener for the first time.
  • Configure storage spaces for your time series data.

Procedure

To create a time series through the wire listener:
  1. Choose a predefined calendar from the system.timeseries.calendar collection or create a calendar by adding a document to the system.timeseries.calendar collection.
  2. Create a TimeSeries row type by adding a document to the system.timeseries.rowType collection.
    The row type must include one BSON column for the JSON data.
  3. Create a container by adding a document to the system.timeseries.container collection.
  4. Create a time series table with the time series table format syntax.
  5. Instantiate the time series by creating a virtual table with the time series virtual table format syntax.
  6. Use the MongoDB API to load time series data through a through a virtual table.

What to do next

After you create and load a time series, you query the data though the virtual table with MongoDB clients.