-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature][Connector-V2] Add Enterprise Wechat sink connector #2412
Conversation
This reverts commit b60060d.
|
||
A sink plugin which use Enterprise WeChart robot send message | ||
|
||
## Options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing description of other options, such as common options in http connector
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing description of other options, such as common options in http connector
I have added description of other options,detail in new commit
private final String webHookUrl = "url"; | ||
|
||
@Override | ||
public void prepare(Config pluginConfig) throws PrepareFailException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overwrite method is useless, because httpSink had checked the parameter url
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this method use to construct httpParameter which WeChatHttpSinkWriter constructor needed.
WeChatHttpSinkWriter redefind a SeaTunnelRowType for WeChat send content in constructor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my option, you can change httpParameter
that in connector-http-base from private
to protected
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my option, you can change
httpParameter
that in connector-http-base fromprivate
toprotected
.
Thx,i will try .this way is more convenient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is simply outputting the result without any formatting, then the sink is of little significance. For this kind of connector, what the user needs to see is a formatted result.
I have added a Commonly used output format ,detail in doc. |
## Description | ||
|
||
A sink plugin which use Enterprise WeChat robot send message | ||
> For example, if the data from upstream is [`"告警状态": "firing", "告警时间": "2022-08-03 01:38:49","告警内容": "磁盘使用超出阈值"`], the output content to WeChat Robot is the following: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest you change the chinese to english.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest you change the chinese to english.
Thx,i have changed in new committ
} | ||
HashMap<Object, Object> objectMap = new HashMap<>(); | ||
objectMap.put(WeChatSinkConfig.WECHAT_SEND_MSG_CONTENT_KEY, stringBuffer.toString()); | ||
if (!weChatSinkConfig.getMentionedMobileList().isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getMentionedMobileList()
may return null
value here. So I suggest you use CollectionUtils.isEmpty
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx,i have changed in new committ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getMentionedMobileList()
may returnnull
value here. So I suggest you useCollectionUtils.isEmpty
here.
Thx,i have changed in new committ
…incubator-seatunnel into wechat-connector-sink
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
fix code checkstyle problem,can you help me review or approve |
AFAIK, There are other things that enterprise WeChat can do, and it will be better if you can improve it. Looking forward to your optimization PR. |
Thx,I will try to do it. |
…#2412) * [Feature][Connector-V2] Add Enterprise WeChart source output format
#1946 Add Enterprise WeChart source base on HttpSink
Purpose of this pull request
Check list
New License Guide