SeaTunnel
最新版本的 Apache SeaTunnel (原 waterdrop ) 已经支持 Doris 的连接器, SeaTunnel 可以用过 Spark 引擎和 Flink 引擎同步数据至 Doris 中.
事实上, SeaTunnel 通过 Stream Load 方式同步数据,性能强劲,欢迎大家使用
安装 SeaTunnel SeaTunnel 安装链接
Spark Sink Doris
插件代码
Spark Sink Doris 的插件代码在这里
参数列表
| 参数名 | 参数类型 | 是否必要 | 默认值 | 引擎类型 |
|---|---|---|---|---|
| fenodes | string | yes | - | Spark |
| database | string | yes | - | Spark |
| table | string | yes | - | Spark |
| user | string | yes | - | Spark |
| password | string | yes | - | Spark |
| batch_size | int | yes | 100 | Spark |
| doris.* | string | no | - | Spark |
fenodes [string]
Doris Fe节点地址:8030
database [string]
写入 Doris 的库名
table [string]
写入 Doris 的表名
user [string]
Doris 访问用户
password [string]
Doris 访问用户密码
batch_size [string]
Spark 通过 Stream Load 方式写入,每个批次提交条数
doris. [string]
Stream Load 方式写入的 Http 参数优化,在官网参数前加上’Doris.’前缀
Examples
Hive 迁移数据至 Doris
1. env{
2. spark.app.name = "hive2doris-template"
3. }
5. spark {
6. spark.sql.catalogImplementation = "hive"
7. }
9. source {
10. hive {
11. preSql = "select * from tmp.test"
12. result_table_name = "test"
13. }
14. }
16. transform {
17. }
20. sink {
22. Console {
24. }
26. Doris {
27. fenodes="xxxx:8030"
28. database="tmp"
29. table="test"
30. user="root"
31. password="root"
32. batch_size=1000
33. doris.column_separator="\t"
34. doris.columns="date_key,date_value,day_in_year,day_in_month"
35. }
36. }
启动命令
1. sh bin/start-waterdrop-spark.sh --master local[4] --deploy-mode client --config ./config/spark.conf
