提供行业领先的
物联网时序数据库
管理系统及服务
聚焦大数据底层技术软件研发,实现时序数据采集、写入、存储、查询、分析、应用全周期生命覆盖,让企业用更低的成本挖掘更大的数据价值。
应用编程示意
选择你想查看的语言 查看相应源代码
package org.apache.iotdb;
import org.apache.iotdb.isession.SessionDataSet;
import org.apache.iotdb.rpc.IoTDBConnectionException;
import org.apache.iotdb.rpc.StatementExecutionException;
import org.apache.iotdb.session.Session;
import org.apache.iotdb.tsfile.write.record.Tablet;
import org.apache.iotdb.tsfile.write.schema.MeasurementSchema;
import java.util.ArrayList;
import java.util.List;
public class SessionExample {
private static Session session;
public static void main(String[] args)
throws IoTDBConnectionException, StatementExecutionException {
session =
new Session.Builder()
.host("172.0.0.1")
.port(6667)
.username("root")
.password("root")
.build();
session.open(false);
List<MeasurementSchema> schemaList = new ArrayList<>();
schemaList.add(new MeasurementSchema("s1", TSDataType.FLOAT));
schemaList.add(new MeasurementSchema("s2", TSDataType.FLOAT));
schemaList.add(new MeasurementSchema("s3", TSDataType.FLOAT));
Tablet tablet = new Tablet("root.db.d1", schemaList, 10);
tablet.addTimestamp(0, 1);
tablet.addValue("s1", 0, 1.23f);
tablet.addValue("s2", 0, 1.23f);
tablet.addValue("s3", 0, 1.23f);
tablet.rowSize++;
session.insertTablet(tablet);
tablet.reset();
try (SessionDataSet dataSet = session.executeQueryStatement("select ** from root.db")) {
while (dataSet.hasNext()) {
System.out.println(dataSet.next());
}
}
session.close();
}
}
from iotdb.Session import Session
from iotdb.utils.IoTDBConstants import TSDataType
from iotdb.utils.Tablet import Tablet
ip = "127.0.0.1"
port = "6667"
username = "root"
password = "root"
session = Session(ip, port, username, password)
session.open(False)
measurements = ["s_01", "s_02", "s_03", "s_04", "s_05", "s_06"]
data_types = [
TSDataType.BOOLEAN,
TSDataType.INT32,
TSDataType.INT64,
TSDataType.FLOAT,
TSDataType.DOUBLE,
TSDataType.TEXT,
]
values = [
[False, 10, 11, 1.1, 10011.1, "test01"],
[True, 100, 11111, 1.25, 101.0, "test02"],
[False, 100, 1, 188.1, 688.25, "test03"],
[True, 0, 0, 0, 6.25, "test04"],
]
timestamps = [1, 2, 3, 4]
tablet = Tablet(
"root.db.d_03", measurements, data_types, values, timestamps
)
session.insert_tablet(tablet)
with session.execute_statement(
"select ** from root.db"
) as session_data_set:
while session_data_set.has_next():
print(session_data_set.next())
session.close()
#include "Session.h"
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
int main(int argc, char **argv) {
Session *session = new Session("127.0.0.1", 6667, "root", "root");
session->open();
std::vector<std::pair<std::string, TSDataType::TSDataType>> schemas;
schemas.push_back({"s0", TSDataType::INT64});
schemas.push_back({"s1", TSDataType::INT64});
schemas.push_back({"s2", TSDataType::INT64});
int64_t val = 0;
Tablet tablet("root.db.d1", schemas, /*maxRowNum=*/ 10);
tablet.rowSize++;
tablet.timestamps[0] = 0;
val=100; tablet.addValue(/*schemaId=*/ 0, /*rowIndex=*/ 0, /*valAddr=*/ &val);
val=200; tablet.addValue(/*schemaId=*/ 1, /*rowIndex=*/ 0, /*valAddr=*/ &val);
val=300; tablet.addValue(/*schemaId=*/ 2, /*rowIndex=*/ 0, /*valAddr=*/ &val);
session->insertTablet(tablet);
tablet.reset();
std::unique_ptr<SessionDataSet> res = session->executeQueryStatement("select ** from root.db");
while (res->hasNext()) {
std::cout << res->next()->toString() << std::endl;
}
res.reset();
session->close();
delete session;
return 0;
}
package main
import (
"fmt"
"log"
"github.com/apache/iotdb-client-go/client"
)
func main() {
config := &client.Config{
Host: "127.0.0.1",
Port: "6667",
UserName: "root",
Password: "root",
}
session := client.NewSession(config)
if err := session.Open(false, 0); err != nil {
log.Fatal(err)
}
defer session.Close() // close session at end of main()
rowCount := 3
tablet, err := client.NewTablet("root.db.d1", []*client.MeasurementSchema{
{
Measurement: "restart_count",
DataType: client.INT32,
Encoding: client.RLE,
Compressor: client.SNAPPY,
}, {
Measurement: "price",
DataType: client.DOUBLE,
Encoding: client.GORILLA,
Compressor: client.SNAPPY,
}, {
Measurement: "description",
DataType: client.TEXT,
Encoding: client.PLAIN,
Compressor: client.SNAPPY,
},
}, rowCount)
if err != nil {
fmt.Errorf("Tablet create error:", err)
return
}
timestampList := []int64{0, 1, 2}
valuesInt32List := []int32{5, -99999, 123456}
valuesDoubleList := []float64{-0.001, 10e5, 54321.0}
valuesTextList := []string{"test1", "test2", "test3"}
for row := 0; row < rowCount; row++ {
tablet.SetTimestamp(timestampList[row], row)
tablet.SetValueAt(valuesInt32List[row], 0, row)
tablet.SetValueAt(valuesDoubleList[row], 1, row)
tablet.SetValueAt(valuesTextList[row], 2, row)
}
session.InsertTablet(tablet, false)
var timeoutInMs int64
timeoutInMs = 1000
sql := "select ** from root.db"
dataset, err := session.ExecuteQueryStatement(sql, &timeoutInMs)
defer dataset.Close()
if err == nil {
for next, err := dataset.Next(); err == nil && next; next, err = dataset.Next() {
record, _ := dataset.GetRowRecord()
fields := record.GetFields()
for _, field := range fields {
fmt.Print(field.GetValue(), "\t")
}
fmt.Println()
}
} else {
log.Println(err)
}
}
Java
Python
C++
Go
-
千万点
每秒单节点每秒千万级
数据写入 -
10X
倍10X倍无损压缩
100X倍有损压缩 -
毫秒
查询TB数据
毫秒级查询响应 -
亿级
点位单设备万级点位
多设备亿级点位
获得学术界和工业界的高度认可
吸引全球贡献者共建开源社区
![时序数据库 IoTDB 赋能上海电气国轩智慧储能运营云平台建设](https://alioss.timecho.com/upload/%E4%B8%8A%E6%B5%B7%E7%94%B5%E6%B0%94%E5%82%A8%E8%83%BD%E5%A4%B4%E5%9B%BE-20240509.jpg)
时序数据库 IoTDB 赋能上海电气国轩智慧储能运营云平台建设
IoTDB 有效破解大规模储能场景下,海量时序数据接入和多终端、多环境云边协同等难题。
![天谋科技成为中国工业大数据创新发展联盟专业委员会副主任单位](https://alioss.timecho.com/upload/%E4%B8%AD%E5%9B%BD%E5%B7%A5%E4%B8%9A%E5%A4%A7%E6%95%B0%E6%8D%AE%E5%88%9B%E6%96%B0%E5%8F%91%E5%B1%95%E8%81%94%E7%9B%9F%E6%96%B0%E9%97%BB%E7%A8%BF%E5%A4%B4%E5%9B%BE-20240723.png)
天谋科技成为中国工业大数据创新发展联盟专业委员会副主任单位
2024-07-235 月 24 日上午,中国工业大数据创新发展联盟(以下简称联盟)第二届理事会第二次会议在北京顺利召开。中国工业互联网研究院、中国电子学会、国家工业信息安全发展研究中心、中国电子技术标准化研究院、中国电子产品可靠性与环境试验研究所、北京航空航天大学计算机学院等 13 家理事单位代表出席会议。会上,全体
![天谋科技连续获中国信通院认可,认定为时序数据库领航者厂商](https://alioss.timecho.com/upload/%E4%BF%A1%E9%80%9A%E9%99%A2%E8%8D%A3%E8%AA%89%E5%A4%B4%E5%9B%BE-20240719.jpg)
天谋科技连续获中国信通院认可,认定为时序数据库领航者厂商
2024-07-197 月 16 - 17 日,2024 可信数据库发展大会在北京召开。会上正式发布《中国数据库产业图谱(2024年)》、《数据库发展研究报告(2024年)》等一系列数据库领域重磅研究成果。 天谋科技连续 2 年深度参与《数据库发展研究报告》的编制工作,并连续 2 年被收录至产业图谱,今年更被认定为时序
![时序数据库如何选型?详细指标总结!](https://alioss.timecho.com/upload/%E6%97%B6%E5%BA%8F%E6%95%B0%E6%8D%AE%E5%BA%93%E9%80%89%E5%9E%8B%E6%8C%87%E6%A0%87%E5%A4%B4%E5%9B%BE-20240718.jpg)
时序数据库如何选型?详细指标总结!
2024-07-18工业物联网将机器设备、控制系统与信息系统、业务过程连接起来,利用海量数据进行分析决策,是智能制造的基础设施,并影响整个工业价值链。工业物联网机器设备感知形成了海量时间序列数据(带时间标签的数据,每条时间序列是按时间戳顺序存贮的一组数据点),蕴含丰富的工业语义,是工业大数据的规模与价值主体。 为应对海