chuang-wang-pre opened a new pull request, #55:
URL: https://github.com/apache/doris-kafka-connector/pull/55
### One connector support writing data from one topic to multiple tables
By configuring `'doris.table.field'`, where the field value is used as the
table name to be written, if the data in the topic does not contain this field
or the field value is null or empty, the default configured
'doris.topic2table.map' will still be used. If the mapped table cannot be
obtained, the topic will be used as the table.
for example:
```
{
"name": "doris-json-test",
"config": {
"buffer.count.records": "10000",
"buffer.flush.time": "120",
"buffer.size.bytes": "10000000",
"connector.class": "org.apache.doris.kafka.connector.DorisSinkConnector",
"doris.database": "test",
"doris.http.port": "8030",
"doris.password": "",
"doris.query.port": "9030",
"doris.table.field": "table_name",
"doris.topic2table.map": "json_topic:json_table",
"doris.urls": "127.0.0.1",
"doris.user": "root",
"load.model": "stream_load",
"name": "doris-json-test",
"tasks.max": "3",
"topics": "json_topic"
}
}
```
if one data in json_topic as: {"table_name": "json_table2", "id":"1"}
the data will be write to json_table2 in test database
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]