Example for JSON data: Create and load a time series with JSON documents
These examples show how to create, load, and query a time series that stores JSON data.
The way that you load time series data with JSON documents
depends on whether the data is a hybrid of text data and JSON documents,
or completely within JSON documents:
Example: Load hybrid data that includes JSON documents
In this example, you create a time series that contains meter
readings. The meter ID and time stamp values are in plain text format
and the sensor readings are in JSON documents. Readings are taken
every 15 minutes. The following table lists the time series properties
that are used in this example.
Time series property | Definition |
---|---|
Timepoint size | 15 minutes |
When timepoints are valid | Every 15 minutes with no invalid times |
Data in the time series |
|
Time series table |
|
Origin | 2014-01-01 00:00:00.00000 |
Regularity | Regular |
Metadata | No metadata |
Where to store the data | In a container that you create |
How to load the data | Through an external table and a loader program |
How to access the data | Through a virtual table |
To create, load, and query a time series that contains JSON data:
Example: Load pure JSON documents
In this example, you create a time series that contains meter
readings. The meter IDs, time stamps, and meter readings are in JSON
documents. Readings are taken every 15 minutes. The following table
lists the time series properties that are used in this example.
Time series property | Definition |
---|---|
Timepoint size | 15 minutes |
When timepoints are valid | Every 15 minutes with no invalid times |
Data in the time series |
|
Time series table |
|
Origin | 2014-01-01 00:00:00.00000 |
Regularity | Regular |
Metadata | No metadata |
Where to store the data | In a container that you create |
How to load the data | Through a loader program |
To load pure JSON documents into a time series: