Skip to content

Commit 0fec8ca

Browse files
[Feature][Connector-V2] Add feishu sink (#2381)
* [Feature][Connector-V2] Add feishu sink (#1946) * [Feature][Connector-V2] Add feishu sink doc (#1946) * [Feature][Connector-V2] Add license header in pom (#1946) * [Feature][Connector-V2] Add feishu connector in dist pom (#1946)
1 parent 7376ec7 commit 0fec8ca

File tree

15 files changed

+173
-24
lines changed

15 files changed

+173
-24
lines changed

docs/en/connector-v2/sink/Feishu.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Feishu
2+
3+
> Feishu sink connector
4+
5+
## Description
6+
7+
Used to launch feishu web hooks using data.
8+
9+
> For example, if the data from upstream is [`age: 12, name: tyrantlucifer`], the body content is the following: `{"age": 12, "name": "tyrantlucifer"}`
10+
11+
**Tips: Feishu sink only support `post json` webhook and the data from source will be treated as body content in web hook.**
12+
13+
## Options
14+
15+
| name | type | required | default value |
16+
| --- |--------| --- | --- |
17+
| url | String | Yes | - |
18+
| headers | Map | No | - |
19+
20+
### url [string]
21+
22+
Feishu webhook url
23+
24+
### headers [Map]
25+
26+
Http request headers
27+
28+
## Example
29+
30+
simple:
31+
32+
```hocon
33+
Feishu {
34+
url = "https://www.feishu.cn/flow/api/trigger-webhook/108bb8f208d9b2378c8c7aedad715c19"
35+
}
36+
```
37+

plugin-mapping.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ seatunnel.sink.Console = connector-console
9393
seatunnel.sink.Assert = connector-assert
9494
seatunnel.source.Kafka = connector-kafka
9595
seatunnel.sink.Kafka = connector-kafka
96-
seatunnel.source.Http = connector-http
97-
seatunnel.sink.Http = connector-http
96+
seatunnel.source.Http = connector-http-base
97+
seatunnel.sink.Http = connector-http-base
98+
seatunnel.sink.Feishu = connector-http-feishu
9899
seatunnel.source.Socket = connector-socket
99100
seatunnel.sink.Hive = connector-hive
100101
seatunnel.source.Hive = connector-hive

seatunnel-connectors-v2-dist/pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@
5353
</dependency>
5454
<dependency>
5555
<groupId>org.apache.seatunnel</groupId>
56-
<artifactId>connector-http</artifactId>
56+
<artifactId>connector-http-base</artifactId>
57+
<version>${project.version}</version>
58+
</dependency>
59+
<dependency>
60+
<groupId>org.apache.seatunnel</groupId>
61+
<artifactId>connector-http-feishu</artifactId>
5762
<version>${project.version}</version>
5863
</dependency>
5964
<dependency>
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Licensed to the Apache Software Foundation (ASF) under one or more
5+
contributor license agreements. See the NOTICE file distributed with
6+
this work for additional information regarding copyright ownership.
7+
The ASF licenses this file to You under the Apache License, Version 2.0
8+
(the "License"); you may not use this file except in compliance with
9+
the License. You may obtain a copy of the License at
10+
11+
http://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
19+
-->
20+
<project xmlns="http://maven.apache.org/POM/4.0.0"
21+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23+
<parent>
24+
<artifactId>connector-http</artifactId>
25+
<groupId>org.apache.seatunnel</groupId>
26+
<version>${revision}</version>
27+
</parent>
28+
<modelVersion>4.0.0</modelVersion>
29+
30+
<artifactId>connector-http-base</artifactId>
31+
32+
<dependencies>
33+
<dependency>
34+
<groupId>org.apache.seatunnel</groupId>
35+
<artifactId>connector-common</artifactId>
36+
<version>${project.version}</version>
37+
</dependency>
38+
39+
<dependency>
40+
<groupId>org.apache.httpcomponents</groupId>
41+
<artifactId>httpclient</artifactId>
42+
</dependency>
43+
44+
<dependency>
45+
<groupId>org.apache.httpcomponents</groupId>
46+
<artifactId>httpcore</artifactId>
47+
</dependency>
48+
</dependencies>
49+
50+
</project>

0 commit comments

Comments
 (0)