支持Update的方式输出数据到Mysql
Options
name | type | required | default value |
---|---|---|---|
[url] url-string | |||
[user] user-string | |||
[password] password-string | |||
[save_mode] save_mode-string | |||
[dbtable] dbtable-string | |||
[customUpdateStmt] customUpdateStmt-string | |||
[duplicateIncs] duplicateIncs-string |
url [string]
JDBC连接的URL。参考一个案例: jdbc:mysql://localhost/dbName
user [string]
用户名
Password [string]
用户密码
save_mode [string]
存储模式,添加模式update
,在插入数据键冲突的时候进行可指定方式的数据覆盖
基本模式overwrite
,append
,ignore
以及error
。每个模式具体含义见save-modes
dbtable [string]
源数据表名
customUpdateStmt [string]
在save_mode
指定为update
时配置,用于指定键冲突的更新语句模板
参考mysql的INSERT INTO table (...) values (...) ON DUPLICATE KEY UPDATE...
的使用方式,values中使用占位符或固定值
duplicateIncs [string]
在save_mode
指定为update
时配置,指定键冲突时值更新为现有值加上原有值
Examples
Mysql {
save_mode = "update",
truncate = true,
url = "jdbc:mysql://192.168.1.1:3306/database",
user= "userName",
password = "***********",
dbtable = "tableName",
customUpdateStmt = "INSERT INTO table (column1, column2, created, modified, yn) values(?, ?, now(), now(), 1) ON DUPLICATE KEY UPDATE column1 = IFNULL(VALUES (column1), column1), column2 = IFNULL(VALUES (column2), column2)"
}
文章列表
- Apache Seatunnel-Roadmap
- Apache Seatunnel-Sink plugin : Clickhouse [Spark]
- Apache Seatunnel-Sink plugin : Console [Spark]
- Apache Seatunnel-Sink plugin : Elasticsearch [Spark]
- Apache Seatunnel-Sink plugin : Email [Spark]
- Apache Seatunnel-Sink plugin : File [Spark]
- Apache Seatunnel-Sink plugin : Hbase [Spark]
- Apache Seatunnel-Sink plugin : Hdfs [Spark]
- Apache Seatunnel-Sink plugin : Mysql [Spark]
- Apache Seatunnel-Sink plugin : Phoenix [Spark]
- Apache Seatunnel-Source plugin : Fake [Spark]
- Apache Seatunnel-Source plugin : FakeStream [Spark]
- Apache Seatunnel-Source plugin : Hive [Spark]
- Apache Seatunnel-Source plugin : JDBC [Spark]
- Apache Seatunnel-Source plugin : Kafka [Flink]
- Apache Seatunnel-Source plugin : Kafka [Spark]
- Apache Seatunnel-Source plugin : Socket [Flink]
- Apache Seatunnel-Source plugin : SocketStream [Spark]
- Apache Seatunnel-Transform Plugin
- Apache Seatunnel-Transform plugin : Json [Spark]
- Apache Seatunnel-Transform plugin : SQL [Spark]
- Apache Seatunnel-Transform plugin : Split [Spark]
- Apache Seatunnel-seatunnel v2.x 与 v1.x 的区别是什么?
- Apache Seatunnel-start-seatunnel-flink.sh 使用方法
- Apache Seatunnel-start-seatunnel-spark.sh 使用方法
- Apache Seatunnel-下载、安装
- Apache Seatunnel-为 seatunnel v2.x 贡献代码
- Apache Seatunnel-完整配置文件案例 [Spark]
- Apache Seatunnel-快速开始
- Apache Seatunnel-插件开发
- Apache Seatunnel-深入seatunnel
- Apache Seatunnel-部署与运行