Prerequisites
To follow the steps on this page:- Create a target with Real-time analytics enabled. You need your connection details. This procedure also works for .
Simulate a dataset
To simulate a dataset, run the following queries:-
Create the
sensorstable: -
Create the
sensor_datahypertableWhen you create a using CREATE TABLE … WITH …, the default partitioning column is automatically the first column with a timestamp data type. Also, creates a columnstore policy that automatically converts your data to the , after an interval equal to the value of the chunk_interval, defined throughcompress_afterin the policy. This columnar format enables fast scanning and aggregation, optimizing performance for analytical workloads while also saving significant storage space. In the conversion, s are compressed by up to 98%, and organized for efficient, large-scale queries. You can customize this policy later using alter_job. However, to changeafterorcreated_before, the compression settings, or the the policy is acting on, you must remove the columnstore policy and add a new one. You can also manually convert s in a to the . -
Populate the
sensorstable: -
Verify that the sensors have been added correctly:
Sample output:
-
Generate and insert a dataset for all sensors:
-
Verify the simulated dataset:
Sample output:
Run basic queries
After you simulate a dataset, you can run some basic queries on it. For example:-
Average temperature and CPU by 30-minute windows:
Sample output:
-
Average and last temperature, average CPU by 30-minute windows:
Sample output:
-
Query the metadata:
Sample output: