summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorlifengchao <[email protected]>2024-06-06 10:04:09 +0800
committerlifengchao <[email protected]>2024-06-06 10:04:09 +0800
commit4bb2b273c8d91246203300a983b4b2fe4664041e (patch)
tree0b52a6ea277712e14eedd3e31baf5de020ec5425 /docs
parent0f0f3b17b3036cd2f09ea6ff2737e5b6c555b704 (diff)
[feature][connector-mock] GAL-454 支持MockSource
Diffstat (limited to 'docs')
-rw-r--r--docs/connector/source/mock.md51
1 files changed, 51 insertions, 0 deletions
diff --git a/docs/connector/source/mock.md b/docs/connector/source/mock.md
new file mode 100644
index 0000000..42894c5
--- /dev/null
+++ b/docs/connector/source/mock.md
@@ -0,0 +1,51 @@
+# Mock
+
+> Mock source connector
+
+## Description
+
+Mock source connector is used to generate data. It is useful for testing.
+
+## Source Options
+
+File source custom properties.
+
+| Name | Type | Required | Default | Description |
+|---------------------|---------|----------|---------|------------------------------------------------------------------------------------------------|
+| mock.desc.file.path | String | Yes | (none) | mock schema file path. |
+| rows.per.second | Integer | No | 1000 | Rows per second to control the emit rate. |
+| number.of.rows | Long | No | -1 | Total number of rows to emit. By default, the source is unbounded. |
+| millis.per.row | Long | No | 0 | Millis per row to control the emit rate. If greater than 0, rows.per.second is not effective. |
+
+## Example
+
+This example mock source and print to console.
+
+```yaml
+sources:
+ mock_source:
+ type : mock
+ properties:
+ mock.desc.file.path: './mock_example.json'
+ rows.per.second: 1
+
+sinks:
+ print_sink:
+ type: print
+ properties:
+ format: json
+
+application:
+ env:
+ name: mock-to-print
+ parallelism: 2
+ pipeline:
+ object-reuse: true
+ topology:
+ - name: mock_source
+ downstream: [ print_sink ]
+ - name: print_sink
+ downstream: [ ]
+```
+
+