TDengine API Documentation

website·Indexed 34 days ago

https://docs.taosdata.com

Technical reference and API documentation for TDengine connectors, including the C# Class Library with methods like FetchRows and SchemalessInsert, and the taospy Python library featuring TaosConnection, TaosBind, and taosrest for REST-based interactions and SQLAlchemy support.

Tokens
536.1K
Snippets
2.1K
Records
3.6K
Agent score
65%

What's inside TDengine

  1. Overview of taosperf performance testing tool

    taosperf is a benchmark performance testing tool used to evaluate the disk read/write and network transmission capabilities of a TDengine deployment environment. These factors directly impact the database's query and write performance. The tool leverages third-party utilities such as dd, fio, ping, and iperf3 to gather performance metrics.
  2. Overview of TDinsightV3 monitoring metrics

    TDinsightV3 provides a comprehensive view of TDengine resource usage and status across several categories:

    • Cluster Status: Tracks firstEp, server version, enterprise edition expiration/measuring points, total databases, connections, and the count/health percentage of DNodes, MNodes, VGroups, and VNodes.
    • DNodes & MNodes Overview: Provides status tables (show dnodes/show mnodes) and historical trends of node counts.
    • Request Statistics: Monitors the volume of SELECT, DELETE, and INSERT requests, total inserted rows, and the number of slow SQL queries.
    • Table Statistics: Tracks the number of Super Tables (STables), total tables, and table distribution across VGroups.
    • DNode Resource Usage: Detailed per-node metrics including uptime, CPU cores, VNode counts, taosd process CPU/Memory usage, disk usage (per level), Disk IO, and Network IO.
    • taosAdapter Monitoring: Statistics for REST and WebSocket requests, categorized by Total, Successful, Failed, Queries, and Writes.
  3. Overview of TDgpt algorithm extension

    TDgpt is an extensible time-series advanced analysis agent that allows developers to integrate custom Python-based analysis algorithms into the platform. These algorithms are loaded dynamically by Anode at startup and can be invoked directly via SQL commands in TDengine. Because Anode is loosely coupled with the TDengine main process (taosd), updating algorithms does not require restarting taosd.
  4. Overview of TDengine Edge-Cloud Collaboration

    TDengine Enterprise Edition provides a solution for edge-cloud collaboration in industrial IoT scenarios. It allows local data collected by edge devices (e.g., production line monitoring) to be synchronized to a centralized cloud platform for global insight and analysis. Key capabilities include high-efficiency synchronization (millions of records per second), compatibility with external sources (AVEVA PI System, OPC-UA, OPC-DA, MQTT), configurable synchronization rules (such as downsampling to reduce data volume), and support for disconnected reconnection (break-point transmission).
  5. Overview of MQTT data ingestion in TDengine

    TDengine uses an MQTT connector to subscribe to data from an external MQTT Broker and write it into TDengine for real-time data inflow. It supports QoS levels 0, 1, and 2 (depending on the Broker's capabilities). This is distinct from 'MQTT Subscription' where a client connects directly to a TDengine Bnode (which only supports QoS 0/1).
  6. Overview of TDengine License Center Architecture

    The License Center manages authorizations for TDengine TSDB and IDMP using a two-tier architecture consisting of the Enterprise License Server (ELS) and the Customer License Server (CLS).

    • Enterprise License Server (ELS): Deployed on the TDengine provider side. It is responsible for issuing, renewing, and revoking licenses, managing overall customer quotas and auditing, and setting the maximum number of allowed slots.
    • Customer License Server (CLS): Deployed in the customer's local or hosted environment. It receives licenses and distributes quotas to local TSDB/IDMP instances, aggregates usage, and adjusts individual slot quotas within the license limit.

    Typical Workflow: ELS manages overall authorization and max slots $\rightarrow$ Customer deploys CLS and imports/syncs the license $\rightarrow$ Multiple TSDB/IDMP instances connect to the local CLS to request authorization via slots and report heartbeats and usage.

  7. Overview of taosdump

    taosdump is a logical backup tool used to export data from a running TDengine cluster and restore it to the same or a different cluster. It supports backing up databases, super tables, or ordinary tables, including specific time ranges. Data is stored using the Apache AVRO format.

    Key Constraints:

    • It is a logical backup tool; it does not backup raw data, environment settings, hardware info, server configurations, or cluster topology.
    • Each backup directory must be unique. If the specified output path already contains files, taosdump will exit to prevent overwriting data.
  8. Overview of TDengine taosinstall tool

    The taosinstall tool is used for the automated installation and deployment of TDengine clusters, as the standard installation package scripts do not support cluster-wide automation. It supports the following operations:

    • Single-node deployment: Install TDengine on a single node.
    • Cluster deployment: Install TDengine across a cluster environment.
    • Targeted deployment: Install TDengine on specific nodes within a cluster.
    • Standard Upgrade: Upgrade TDengine after shutting down services (recommended for testing only).
    • Rolling Upgrade: Upgrade TDengine without service interruption (recommended for testing only).
  9. Overview of TDengine Query Capabilities

    TDengine uses SQL as its query language. Users can execute queries via the REST API, language-specific connectors, or the taos command-line tool. Key supported features include:

    • Single and multi-column data retrieval
    • Filtering using operators: >, <, =, <>, like, etc.
    • Result set management: GROUP BY, ORDER BY, LIMIT, and OFFSET
    • Window-based aggregation: INTERVAL (time windows), SESSION (session windows), and STATE_WINDOW (state windows)
    • Arithmetic operations on numeric columns and aggregation results
    • Implicit Join queries based on timestamp alignment
    • Specialized IoT aggregation functions: twa (time-weighted average), spread (max-min difference), last_row (most recent record), count, max, min, avg, sum, stddev, leastsquares, top, bottom, first, last, percentile, apercentile, and diff.
    -- Example: Query records from table d101 where voltage > 215, sorted by time descending, limited to 2 results
    select * from test.d101 where voltage > 215 order by ts desc limit 2;
  10. Overview of TDengine Dual-Replica High Availability

    The dual-replica solution is a TDengine TSDB Enterprise feature (introduced in v3.3.0.0) designed to reduce deployment costs while maintaining reliability. It provides fault tolerance for a single service failure, provided there are no consecutive failures. Unlike standard Raft groups, leader election in dual-replica mode is handled by an Arbitrator service provided by high-availability Mnodes.

    Key components:

    • Arbitrator: An arbitration service that does not store data. If a VGroup becomes unavailable due to a Vnode failure, the Arbitrator designates another Vnode in the VGroup as the Assigned Leader based on data synchronization status.
    • AssignedLeader: A Vnode forced into the Leader role that continues to respond to user requests regardless of other replica statuses.
  11. Overview of mcp-tdengine-tsdb capabilities

    mcp-tdengine-tsdb (MCP Server for TDengine) provides a read-only toolset for interacting with TDengine. It allows users to query data, view metadata, and retrieve service information. It explicitly does NOT support data writes, deletions, or changes to table structures. It is compatible with TDengine v3.3.6.0 and above (and is bundled with TSDB starting from v3.4.1.0). Supported platforms include Windows x64, Linux x64/arm64, and macOS x64/arm64.
  12. Overview of TDengine Internal Architecture and Design

    TDengine is a high-performance, distributed time-series database designed for IoT and industrial big data platforms. Its internal design encompasses several key components: cluster architecture, storage and query engines, virtual table query optimization, data subscription (TMQ), stream processing, caching, data compression, and logging systems.