Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 88 additions & 14 deletions docs/doxgen/taosgen_config.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//ANCHOR: tdengine_gen_stmt_insert_config

```yaml
tdengine:
dsn: taos+ws://root:taosdata@127.0.0.1:6041/tsbench
drop_if_exists: true
Expand All @@ -22,7 +24,7 @@ schema:
max: 100
- name: voltage
type: int
expr: 220 * math.sqrt(2) * math.sin(_i)
expr: '220 * math.sqrt(2) * math.sin(_i)'
- name: phase
type: float
min: 0
Expand Down Expand Up @@ -53,7 +55,7 @@ schema:

jobs:
# TDengine insert job
insert-data:
insert:
steps:
- uses: tdengine/create-super-table
- uses: tdengine/create-child-table
Expand All @@ -62,12 +64,16 @@ jobs:
size: 1000
concurrency: 10

- uses: tdengine/insert-data
- uses: tdengine/insert
with:
concurrency: 8
```

//ANCHOR_END: tdengine_gen_stmt_insert_config

//ANCHOR: tdengine_gen_stmt_insert_simple

```yaml
schema:
columns:
- name: ts
Expand All @@ -81,7 +87,7 @@ schema:
max: 100
- name: voltage
type: int
expr: 220 * math.sqrt(2) * math.sin(_i)
expr: '220 * math.sqrt(2) * math.sin(_i)'
- name: phase
type: float
min: 0
Expand All @@ -92,14 +98,18 @@ schema:

jobs:
# TDengine insert job
insert-data:
insert:
steps:
- uses: tdengine/create-super-table
- uses: tdengine/create-child-table
- uses: tdengine/insert-data
- uses: tdengine/insert
```

//ANCHOR_END: tdengine_gen_stmt_insert_simple

//ANCHOR: tdengine_csv_stmt_insert_config

```yaml
tdengine:
dsn: taos+ws://root:taosdata@127.0.0.1:6041/tsbench
drop_if_exists: true
Expand Down Expand Up @@ -145,26 +155,28 @@ schema:

jobs:
# TDengine insert job
insert-data:
insert:
steps:
- uses: tdengine/create-super-table
- uses: tdengine/create-child-table
with:
batch:
size: 1000
concurrency: 10
- uses: tdengine/insert-data
- uses: tdengine/insert
with:
concurrency: 8
```

//ANCHOR_END: tdengine_csv_stmt_insert_config

//ANCHOR: mqtt_publish_config

```yaml
mqtt:
uri: tcp://localhost:1883
user: root
password: taosdata
topic: factory/{table}/{location}
qos: 0

schema:
name: meters
Expand All @@ -184,7 +196,7 @@ schema:
max: 100
- name: voltage
type: int
expr: 220 * math.sqrt(2) * math.sin(_i)
expr: '220 * math.sqrt(2) * math.sin(_i)'
- name: phase
type: float
min: 0
Expand All @@ -202,14 +214,76 @@ schema:
interlace: 1
concurrency: 8
rows_per_table: 10000
rows_per_batch: 1000
rows_per_batch: 10000
num_cached_batches: 0

jobs:
# MQTT publish job
publish-data:
steps:
- uses: mqtt/publish-data
- uses: mqtt/publish
with:
concurrency: 8
//ANCHOR_END: mqtt_publish_config
topic: factory/{table}/{location}
qos: 1
```

//ANCHOR_END: mqtt_publish_config

//ANCHOR: kafka_produce_config

```yaml
kafka:
bootstrap_servers: localhost:9092
topic: factory-electric-meter

schema:
name: meters
tbname:
prefix: d
count: 10000
from: 0
columns:
- name: ts
type: timestamp
start: 1700000000000
precision : ms
step: 300s
- name: current
type: float
min: 0
max: 100
- name: voltage
type: int
expr: '220 * math.sqrt(2) * math.sin(_i)'
- name: phase
type: float
min: 0
max: 360
- name: location
type: varchar(20)
values:
- Chicago
- Houston
- Phoenix
- Philadelphia
- Dallas
- Austin
generation:
interlace: 1
concurrency: 8
rows_per_table: 10000
rows_per_batch: 10000
num_cached_batches: 0

jobs:
# Kafka produce job
produce-data:
steps:
- uses: kafka/produce
with:
concurrency: 8
acks: 1
```

//ANCHOR_END: kafka_produce_config
Loading
Loading