444
社区成员




上次在文档中直接使用命令taosBenchmark生成一亿条数据,发现不满足要求,都是2017年开始的 数据,下面是用json格式生成2022-07-29开始,名为db的数据库,生成的列和标签都可以自定义。
参考资料
docker run -d --name iot-tdengine --hostname="tdengine-server" -v /home/taos/log:/var/log/taos -v /home/taos/data:/var/lib/taos -p 6030-6049:6030-6049 -p 6030-6049:6030-6049/udp tdengine/tdengine:2.6.0.8
{
"filetype": "insert",
"cfgdir": "/etc/taos",
"host": "127.0.0.1",
"port": 6030,
"user": "root",
"password": "taosdata",
"connection_pool_size": 8,
"thread_count": 4,
"result_file": "./insert_res.txt",
"confirm_parameter_prompt": "no",
"insert_interval": 0,
"interlace_rows": 100,
"num_of_records_per_req": 100,
"prepared_rand": 10000,
"chinese":"no",
"databases": [{
"dbinfo": {
"name": "db",
"drop": "yes",
"replica": 1,
"days": 10,
"cache": 16,
"blocks": 8,
"precision": "ms",
"keep": 3650,
"minRows": 100,
"maxRows": 4096,
"comp":2,
"walLevel":1,
"cachelast":0,
"quorum":1,
"fsync":3000,
"update": 0
},
"super_tables": [{
"name": "stb",
"child_table_exists":"no",
"childtable_count": 100,
"childtable_prefix": "stb_",
"escape_character": "no",
"auto_create_table": "yes",
"batch_create_tbl_num": 10,
"data_source": "rand",
"insert_mode": "taosc",
"line_protocol": "line",
"insert_rows": 10000,
"childtable_limit": 10,
"childtable_offset": 1000,
"interlace_rows": 0,
"insert_interval":0,
"partial_col_num": 0,
"disorder_ratio": 0,
"disorder_range": 1000,
"timestamp_step": 60000,
"start_timestamp": "2022-07-29 00:00:00.000",
"sample_format": "csv",
"sample_file": "./sample.csv",
"use_sample_ts": "yes",
"tags_file": "",
"columns": [{"type": "INT", "name": "id"}, {"type": "INT", "count":2}, {"type": "INT", "count":1,"max": 888, "min": 1}, {"type": "BINARY", "count":1}],
"tags": [{"type": "TINYINT", "count":2, "max": 99, "min": 1}, {"type": "BINARY", "len": 16, "count":2, "values":["beijing","shanghai"]}]
}]
}]
}