This article demonstrates how to integrate TDengine with Perspective for real-time stream analytics.
Video
TDengine–Perspective Demo
You can explore the visualization options provided by Perspective in this demonstration environment.

Prerequisites
- Install Git. For more information, see the official website.
- Install Docker. For more information, see the official website.
Procedure
-
Clone the
perspective-examples
repository from GitHub to your local machine and open theexamples/tdengine/node
directory.git clone https://github.com/ProspectiveCo/perspective-examples cd examples/tdengine/node
-
Run the provided script to start TDengine in a Docker container:
./docker.sh
-
Install Node.js dependencies:
npm install
-
Run the producer script to create a database and table in TDengine and insert simulated data in real time:
node src/producer.js
-
Run the server script to construct a Perspective WebSocket server and a Perspective table:
node src/server.js
-
Host the Perspective front-end with Vite.
npm run dev
-
Open the URL of the Vite development server in a web browser. The default URL is
http://localhost:3000
.
You can now visualize the sample data in your browser as shown in the following figure.
