24,000 Contact Us Cloud

Integrate TDengine with Perspective

TDengine Team

June 12, 2025 /

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.

Ingestion and visualization workflows in the demo environment

Prerequisites

Procedure

  1. Clone the perspective-examples repository from GitHub to your local machine and open the examples/tdengine/node directory.

    git clone https://github.com/ProspectiveCo/perspective-examples
    cd examples/tdengine/node
  2. Run the provided script to start TDengine in a Docker container:

    ./docker.sh
  3. Install Node.js dependencies:

    npm install
  4. Run the producer script to create a database and table in TDengine and insert simulated data in real time:

    node src/producer.js
  5. Run the server script to construct a Perspective WebSocket server and a Perspective table:

    node src/server.js
  6. Host the Perspective front-end with Vite.

    npm run dev
  7. 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.