diff options
| author | 李奉超 <[email protected]> | 2024-06-06 02:20:17 +0000 |
|---|---|---|
| committer | 李奉超 <[email protected]> | 2024-06-06 02:20:17 +0000 |
| commit | 80769f631cfdd66ae5b5f1824a00d12fa2e5e43a (patch) | |
| tree | 015336f56d0d9b1446da3864e223ffbb82097365 /docs | |
| parent | 82c3dd2ab3f6863c91bcb9d4a638242ecfeb1df8 (diff) | |
| parent | 4bb2b273c8d91246203300a983b4b2fe4664041e (diff) | |
Merge branch 'feature/mock-connector' into 'develop'
[feature][connector-mock] GAL-454 支持MockSource
See merge request galaxy/platform/groot-stream!62
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/connector/source/mock.md | 51 |
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: [ ] +``` + + |
