Skip to main content
Version: Next

DingTalk

DingTalk sink connector

Support Those Engines

Spark
Flink
SeaTunnel Zeta

Key features

Description

A sink plugin that sends SeaTunnel rows to a DingTalk group chat through a DingTalk custom robot webhook. The connector identifier used in job configuration is DingTalk. For each row, the connector signs the request with the configured robot secret and posts a message to the DingTalk robot address.

Data Type Mapping

The DingTalk connector serializes each row through SeaTunnelRow.toString() and posts the resulting plain-text message to the DingTalk robot. There is no per-field JSON structure on the wire — the entire row becomes a single text payload regardless of the underlying field types.

Sink Options

nametyperequireddefault valuedescription
urlStringYes-DingTalk robot webhook URL, format https://oapi.dingtalk.com/robot/send?access_token=XXXXXX.
secretStringYes-DingTalk robot secret used to sign the request.
common-optionsno-Sink plugin common parameters, please refer to Sink Common Options for details.

url [String]

DingTalk robot address format is https://oapi.dingtalk.com/robot/send?access_token=XXXXXX. The access_token is the robot token created in the DingTalk group settings.

secret [String]

DingTalk robot secret used to sign messages sent to the robot defined in url. The connector signs messages with the configured secret so DingTalk can verify the request source. The secret must match the one bound to the robot configured in url. The signed client is created lazily once per writer and reused for the writer's lifetime; the signature is not recomputed on every individual write.

common options

Sink plugin common parameters, please refer to Sink Common Options for details.

Task Example

Simple

Send rows to a DingTalk group through a configured robot.

sink {
DingTalk {
url = "https://oapi.dingtalk.com/robot/send?access_token=ec646cccd028d978a7156ceeac5b625ebd94f586ea0743fa501c100007890"
secret = "SEC093249eef7aa57d4388aa635f678930c63db3d28b2829d5b2903fc1e5c10000"
}
}

With upstream source

A typical end-to-end job that reads rows from a fake source and forwards them to DingTalk.

env {
parallelism = 1
job.mode = "BATCH"
}

source {
FakeSource {
schema = {
fields {
id = int
name = string
score = double
}
}
rows = [
{ kind = "INSERT", fields = [1, "alice", 9.5] }
]
}
}

sink {
DingTalk {
url = "https://oapi.dingtalk.com/robot/send?access_token=ec646cccd028d978a7156ceeac5b625ebd94f586ea0743fa501c100007890"
secret = "SEC093249eef7aa57d4388aa635f678930c63db3d28b2829d5b2903fc1e5c10000"
}
}

Changelog

Change Log
ChangeCommitVersion
[improve] dingtalk sink options (#8742)https://github.com/apache/seatunnel/commit/f2145dcc4f2.3.10
[Feature][Restapi] Allow metrics information to be associated to logical plan nodes (#7786)https://github.com/apache/seatunnel/commit/6b7c53d03c2.3.9
[Improve] Remove use SeaTunnelSink::getConsumedType method and mark it as deprecated (#5755)https://github.com/apache/seatunnel/commit/8de74081002.3.4
[Improve][build] Give the maven module a human readable name (#4114)https://github.com/apache/seatunnel/commit/d7cd6010512.3.1
[Improve][Project] Code format with spotless plugin. (#4101)https://github.com/apache/seatunnel/commit/a2ab1665612.3.1
[Improve][Connector-V2][DingTalk] Unified exception for dingtalk sink connector (#3678)https://github.com/apache/seatunnel/commit/0a095625152.3.0
[Hotfix][OptionRule] Fix option rule about all connectors (#3592)https://github.com/apache/seatunnel/commit/226dc6a1192.3.0
[improve][connector] The Factory#factoryIdentifier must be consistent with PluginIdentifierInterface#getPluginName (#3328)https://github.com/apache/seatunnel/commit/d9519d696a2.3.0
[Improve][Connector-V2][DingTalk] Add DingTalk Sink Factory (#3324)https://github.com/apache/seatunnel/commit/56be228ad22.3.0
[Improve][build] Improved scope of maven-shade-plugin (#2665)https://github.com/apache/seatunnel/commit/93bc8bd1162.2.0-beta
[#2606]Dependency management split (#2630)https://github.com/apache/seatunnel/commit/fc047be69b2.2.0-beta
[Feature][Connector-V2] Add Dingtalk Sink #2257 (#2285)https://github.com/apache/seatunnel/commit/88a26d5a292.2.0-beta