You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/09/16 08:30:02 UTC

[GitHub] [incubator-seatunnel] MRYOG opened a new pull request, #2757: [Feature][Connector2] Add DingTalk Source #2684

MRYOG opened a new pull request, #2757:
URL: https://github.com/apache/incubator-seatunnel/pull/2757

   Description
   support V2 Connector for DingTalk
   
   Usage Scenario
   use DingTalk API get data


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #2757: [Feature][Connector2] Add DingTalk Source #2684

Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #2757:
URL: https://github.com/apache/incubator-seatunnel/pull/2757#discussion_r973989815


##########
docs/en/connector-v2/source/dingtalk.md:
##########
@@ -0,0 +1,71 @@
+# DingTalk
+
+> DinkTalk source connector
+## Description
+
+A source plugin which use DingTalk
+
+## Key features
+
+- [x] [batch](../../concept/connector-v2-features.md)
+- [ ] [stream](../../concept/connector-v2-features.md)
+- [ ] [exactly-once](../../concept/connector-v2-features.md)
+- [ ] [schema projection](../../concept/connector-v2-features.md)
+- [ ] [parallelism](../../concept/connector-v2-features.md)
+- [ ] [support user-defined split](../../concept/connector-v2-features.md)
+
+## Options
+
+| name      | type        | required | default value |
+|-----------| ----------  | -------- | ------------- |
+| api_client       | string      | yes      | -             |
+| access_token    | string      | yes       | -             |
+| app_key    | string      | yes       | -             |

Review Comment:
   check style



##########
seatunnel-connectors-v2/connector-dingtalk/src/main/java/org/apache/seatunnel/connectors/seatunnel/common/DingTalkUtil.java:
##########
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.common;
+
+import com.aliyun.dingtalkoauth2_1_0.models.GetAccessTokenResponse;
+
+/**
+ * @description: Ding Talk util
+ **/
+
+public class DingTalkUtil {
+
+    /**
+     * @return Client
+     */
+    public static com.aliyun.dingtalkoauth2_1_0.Client createClient() throws Exception {
+        com.aliyun.teaopenapi.models.Config config = new com.aliyun.teaopenapi.models.Config();
+        config.protocol = "https";
+        config.regionId = "central";
+        return new com.aliyun.dingtalkoauth2_1_0.Client(config);
+    }
+
+    public static String getAppToken(String appKey, String appSecret) {
+        String appToken = null;
+        try {
+            com.aliyun.dingtalkoauth2_1_0.Client client = DingTalkUtil.createClient();
+            com.aliyun.dingtalkoauth2_1_0.models.GetAccessTokenRequest getAccessTokenRequest = new com.aliyun.dingtalkoauth2_1_0.models.GetAccessTokenRequest()
+                .setAppKey(appKey).setAppSecret(appSecret);
+            GetAccessTokenResponse res = client.getAccessToken(getAccessTokenRequest);
+            appToken = res.getBody().getAccessToken();
+        } catch (Exception e) {
+            e.printStackTrace();

Review Comment:
   Use slf4j logger error and throw Exception?



##########
seatunnel-connectors-v2/connector-dingtalk/src/main/java/org/apache/seatunnel/connectors/seatunnel/source/DingTalkSource.java:
##########
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.source;
+
+import org.apache.seatunnel.api.common.JobContext;
+import org.apache.seatunnel.api.common.PrepareFailException;
+import org.apache.seatunnel.api.serialization.DeserializationSchema;
+import org.apache.seatunnel.api.source.Boundedness;
+import org.apache.seatunnel.api.source.SeaTunnelSource;
+import org.apache.seatunnel.api.table.type.SeaTunnelDataType;
+import org.apache.seatunnel.api.table.type.SeaTunnelRow;
+import org.apache.seatunnel.api.table.type.SeaTunnelRowType;
+import org.apache.seatunnel.common.config.CheckConfigUtil;
+import org.apache.seatunnel.common.config.CheckResult;
+import org.apache.seatunnel.common.constants.JobMode;
+import org.apache.seatunnel.common.constants.PluginType;
+import org.apache.seatunnel.connectors.seatunnel.common.DingTalkConstant;
+import org.apache.seatunnel.connectors.seatunnel.common.DingTalkParameter;
+import org.apache.seatunnel.connectors.seatunnel.common.DingTalkUtil;
+import org.apache.seatunnel.connectors.seatunnel.common.schema.SeaTunnelSchema;
+import org.apache.seatunnel.connectors.seatunnel.common.source.AbstractSingleSplitReader;
+import org.apache.seatunnel.connectors.seatunnel.common.source.AbstractSingleSplitSource;
+import org.apache.seatunnel.connectors.seatunnel.common.source.SingleSplitReaderContext;
+
+import org.apache.seatunnel.shade.com.typesafe.config.Config;
+
+import com.google.auto.service.AutoService;
+
+@AutoService(SeaTunnelSource.class)
+public class DingTalkSource extends AbstractSingleSplitSource<SeaTunnelRow> {
+
+    protected final DingTalkParameter dtParameter = new DingTalkParameter();
+    protected SeaTunnelRowType rowType;
+    protected JobContext jobContext;
+    protected DeserializationSchema<SeaTunnelRow> deserializationSchema;
+
+    @Override
+    public String getPluginName() {
+        return "DingTalk";
+    }
+
+    @Override
+    public Boundedness getBoundedness() {
+        return JobMode.BATCH.equals(jobContext.getJobMode()) ? Boundedness.BOUNDED : Boundedness.UNBOUNDED;
+    }
+
+    @Override
+    public void prepare(Config pluginConfig) throws PrepareFailException {
+        CheckResult hasClient = CheckConfigUtil.checkAllExists(pluginConfig, DingTalkConstant.API_CLIENT);
+        if (!hasClient.isSuccess()) {
+            throw new PrepareFailException(getPluginName(), PluginType.SOURCE, hasClient.getMsg());
+        }
+        CheckResult hasToken = CheckConfigUtil.checkAllExists(pluginConfig, DingTalkConstant.ACCESS_TOKEN);
+        if (!hasToken.isSuccess()) {
+            CheckResult hasKey = CheckConfigUtil.checkAllExists(pluginConfig, DingTalkConstant.APP_KEY, DingTalkConstant.APP_SECRET);
+            if (!hasKey.isSuccess()) {
+                throw new PrepareFailException(getPluginName(), PluginType.SOURCE, hasKey.getMsg());
+            }
+            String appToken = DingTalkUtil.getAppToken(pluginConfig.getString(DingTalkConstant.APP_KEY), pluginConfig.getString(DingTalkConstant.APP_SECRET));
+            if (null == appToken) {
+                throw new PrepareFailException(getPluginName(), PluginType.SOURCE, "Get App Token Error!");
+            }
+            this.dtParameter.setAccessToken(appToken);
+        }
+        this.dtParameter.buildParameter(pluginConfig, hasToken.isSuccess());
+
+        if (pluginConfig.hasPath(DingTalkConstant.SCHEMA)) {
+            Config schema = pluginConfig.getConfig(DingTalkConstant.SCHEMA);
+            this.rowType = SeaTunnelSchema.buildWithConfig(schema).getSeaTunnelRowType();

Review Comment:
   Unused fields in schema?



##########
seatunnel-connectors-v2/connector-dingtalk/src/main/java/org/apache/seatunnel/connectors/seatunnel/source/DingTalkSourceReader.java:
##########
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.source;
+
+import org.apache.seatunnel.api.serialization.DeserializationSchema;
+import org.apache.seatunnel.api.source.Boundedness;
+import org.apache.seatunnel.api.source.Collector;
+import org.apache.seatunnel.api.table.type.SeaTunnelRow;
+import org.apache.seatunnel.common.utils.JsonUtils;
+import org.apache.seatunnel.connectors.seatunnel.common.DingTalkConstant;
+import org.apache.seatunnel.connectors.seatunnel.common.DingTalkParameter;
+import org.apache.seatunnel.connectors.seatunnel.common.source.AbstractSingleSplitReader;
+import org.apache.seatunnel.connectors.seatunnel.common.source.SingleSplitReaderContext;
+
+import com.dingtalk.api.DefaultDingTalkClient;
+import com.dingtalk.api.DingTalkClient;
+import com.dingtalk.api.request.OapiV2DepartmentListsubRequest;
+import com.dingtalk.api.response.OapiV2DepartmentListsubResponse;
+import com.fasterxml.jackson.databind.JsonNode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+public class DingTalkSourceReader extends AbstractSingleSplitReader<SeaTunnelRow> {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(DingTalkSourceReader.class);
+    protected final SingleSplitReaderContext context;
+    protected final DingTalkParameter dtParameter;
+    protected DingTalkClient dtClient;
+    protected OapiV2DepartmentListsubRequest dtRequest;
+    protected final DeserializationSchema<SeaTunnelRow> deserializationSchema;
+
+    public DingTalkSourceReader(DingTalkParameter dtParameter, SingleSplitReaderContext context, DeserializationSchema<SeaTunnelRow> deserializationSchema) {
+        this.context = context;
+        this.dtParameter = dtParameter;
+        this.deserializationSchema = deserializationSchema;
+    }
+
+    @Override
+    public void open() {
+        dtClient = new DefaultDingTalkClient(dtParameter.getApiClient());
+        dtRequest = new OapiV2DepartmentListsubRequest();
+        LOGGER.info("Ding Talk Access Token is :" + dtParameter.getAccessToken());
+    }
+
+    @Override
+    public void close() throws IOException {
+    }
+
+    @Override
+    public void pollNext(Collector<SeaTunnelRow> output) {
+        try {
+            OapiV2DepartmentListsubResponse response = dtClient.execute(dtRequest, dtParameter.getAccessToken());
+            if (DingTalkConstant.STATUS_OK.equals(response.getErrmsg())) {
+                String tmpContent = response.getBody();
+                JsonNode bodyJson = JsonUtils.stringToJsonNode(tmpContent);
+                JsonNode resJson = bodyJson.get(DingTalkConstant.BODY_RESULT);
+                if (resJson.isArray()) {

Review Comment:
   If it's not an array, do you need to log exception message?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] MRYOG commented on a diff in pull request #2757: [Feature][Connector2] Add DingTalk Source #2684

Posted by GitBox <gi...@apache.org>.
MRYOG commented on code in PR #2757:
URL: https://github.com/apache/incubator-seatunnel/pull/2757#discussion_r973592943


##########
seatunnel-connectors-v2/connector-dingtalk/pom.xml:
##########
@@ -48,6 +48,19 @@
         </exclusion>
       </exclusions>
     </dependency>
+
+    <dependency>
+      <groupId>com.aliyun</groupId>
+      <artifactId>dingtalk</artifactId>
+      <version>1.4.26</version>
+    </dependency>

Review Comment:
   old sdk version is used by sink plugin , next sink plugin update will be remove



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] EricJoy2048 commented on a diff in pull request #2757: [Feature][Connector2] Add DingTalk Source #2684

Posted by GitBox <gi...@apache.org>.
EricJoy2048 commented on code in PR #2757:
URL: https://github.com/apache/incubator-seatunnel/pull/2757#discussion_r972956340


##########
docs/en/connector-v2/source/dingtalk.md:
##########
@@ -0,0 +1,71 @@
+# DingTalk
+
+> DinkTalk source connector
+## Description
+
+A source plugin which use DingTalk
+
+## Key features
+
+- [x] [batch](../../concept/connector-v2-features.md)
+- [ ] [stream](../../concept/connector-v2-features.md)

Review Comment:
   It can be seen from the code that the connector supports the stream module. Please check it.



##########
seatunnel-connectors-v2/connector-dingtalk/src/main/java/org/apache/seatunnel/connectors/seatunnel/source/DingTalkSourceReader.java:
##########
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.source;
+
+import org.apache.seatunnel.api.serialization.DeserializationSchema;
+import org.apache.seatunnel.api.source.Boundedness;
+import org.apache.seatunnel.api.source.Collector;
+import org.apache.seatunnel.api.table.type.SeaTunnelRow;
+import org.apache.seatunnel.common.utils.JsonUtils;
+import org.apache.seatunnel.connectors.seatunnel.common.DingTalkConstant;
+import org.apache.seatunnel.connectors.seatunnel.common.DingTalkParameter;
+import org.apache.seatunnel.connectors.seatunnel.common.source.AbstractSingleSplitReader;
+import org.apache.seatunnel.connectors.seatunnel.common.source.SingleSplitReaderContext;
+
+import com.dingtalk.api.DefaultDingTalkClient;
+import com.dingtalk.api.DingTalkClient;
+import com.dingtalk.api.request.OapiV2DepartmentListsubRequest;
+import com.dingtalk.api.response.OapiV2DepartmentListsubResponse;
+import com.fasterxml.jackson.databind.JsonNode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+public class DingTalkSourceReader extends AbstractSingleSplitReader<SeaTunnelRow> {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(DingTalkSourceReader.class);
+    protected final SingleSplitReaderContext context;
+    protected final DingTalkParameter dtParameter;
+    protected DingTalkClient dtClient;
+    protected OapiV2DepartmentListsubRequest dtRequest;
+    protected final DeserializationSchema<SeaTunnelRow> deserializationSchema;
+
+    public DingTalkSourceReader(DingTalkParameter dtParameter, SingleSplitReaderContext context, DeserializationSchema<SeaTunnelRow> deserializationSchema) {
+        this.context = context;
+        this.dtParameter = dtParameter;
+        this.deserializationSchema = deserializationSchema;
+    }
+
+    @Override
+    public void open() {
+        dtClient = new DefaultDingTalkClient(dtParameter.getApiClient());
+        dtRequest = new OapiV2DepartmentListsubRequest();
+        LOGGER.info("Ding Talk Access Token is :" + dtParameter.getAccessToken());
+    }
+
+    @Override
+    public void close() throws IOException {
+    }
+
+    @Override
+    public void pollNext(Collector<SeaTunnelRow> output) {
+        try {
+            OapiV2DepartmentListsubResponse response = dtClient.execute(dtRequest, dtParameter.getAccessToken());
+            if (DingTalkConstant.STATUS_OK.equals(response.getErrmsg())) {
+                String tmpContent = response.getBody();
+                JsonNode bodyJson = JsonUtils.stringToJsonNode(tmpContent);
+                JsonNode resJson = bodyJson.get(DingTalkConstant.BODY_RESULT);
+                if (resJson.isArray()) {
+                    for (JsonNode tmpJson : resJson) {
+                        output.collect(new SeaTunnelRow(new Object[]{tmpJson.toString()}));
+                    }
+                }
+            }
+            LOGGER.error("Ding Talk client execute exception, response status code:[{}], content:[{}]", response.getErrorCode(), response.getBody());

Review Comment:
   Output error log under any circumstances?I think you need `else` here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] EricJoy2048 commented on pull request #2757: [Feature][Connector2] Add DingTalk Source #2684

Posted by "EricJoy2048 (via GitHub)" <gi...@apache.org>.
EricJoy2048 commented on PR #2757:
URL: https://github.com/apache/incubator-seatunnel/pull/2757#issuecomment-1464846299

   This pr will be closed because there is no response for too long.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] Hisoka-X commented on pull request #2757: [Feature][Connector2] Add DingTalk Source #2684

Posted by GitBox <gi...@apache.org>.
Hisoka-X commented on PR #2757:
URL: https://github.com/apache/incubator-seatunnel/pull/2757#issuecomment-1272501328

   Please solve conflict, thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] EricJoy2048 closed pull request #2757: [Feature][Connector2] Add DingTalk Source #2684

Posted by "EricJoy2048 (via GitHub)" <gi...@apache.org>.
EricJoy2048 closed pull request #2757: [Feature][Connector2] Add DingTalk Source #2684
URL: https://github.com/apache/incubator-seatunnel/pull/2757


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] ashulin commented on a diff in pull request #2757: [Feature][Connector2] Add DingTalk Source #2684

Posted by GitBox <gi...@apache.org>.
ashulin commented on code in PR #2757:
URL: https://github.com/apache/incubator-seatunnel/pull/2757#discussion_r972948457


##########
seatunnel-connectors-v2/connector-dingtalk/pom.xml:
##########
@@ -48,6 +48,19 @@
         </exclusion>
       </exclusions>
     </dependency>
+
+    <dependency>
+      <groupId>com.aliyun</groupId>
+      <artifactId>dingtalk</artifactId>
+      <version>1.4.26</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.seatunnel</groupId>
+      <artifactId>connector-http-base</artifactId>
+      <version>2.1.3-SNAPSHOT</version>

Review Comment:
   the dependency is not used.



##########
seatunnel-connectors-v2/connector-dingtalk/pom.xml:
##########
@@ -48,6 +48,19 @@
         </exclusion>
       </exclusions>
     </dependency>
+
+    <dependency>
+      <groupId>com.aliyun</groupId>
+      <artifactId>dingtalk</artifactId>
+      <version>1.4.26</version>
+    </dependency>

Review Comment:
   I checked the DingTalk documentation, this is the new version of the sdk; so can the old version of the sdk(`alibaba-dingtalk-service-sdk`) be removed?



##########
seatunnel-connectors-v2/connector-dingtalk/pom.xml:
##########
@@ -48,6 +48,19 @@
         </exclusion>
       </exclusions>
     </dependency>
+
+    <dependency>
+      <groupId>com.aliyun</groupId>
+      <artifactId>dingtalk</artifactId>
+      <version>1.4.26</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.seatunnel</groupId>
+      <artifactId>connector-http-base</artifactId>
+      <version>2.1.3-SNAPSHOT</version>

Review Comment:
   ```suggestion
         <version>${project.version}</version>
   ```



##########
seatunnel-connectors-v2/connector-dingtalk/src/main/java/org/apache/seatunnel/connectors/seatunnel/source/DingTalkSourceReader.java:
##########
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.seatunnel.connectors.seatunnel.source;
+
+import org.apache.seatunnel.api.serialization.DeserializationSchema;
+import org.apache.seatunnel.api.source.Boundedness;
+import org.apache.seatunnel.api.source.Collector;
+import org.apache.seatunnel.api.table.type.SeaTunnelRow;
+import org.apache.seatunnel.common.utils.JsonUtils;
+import org.apache.seatunnel.connectors.seatunnel.common.DingTalkConstant;
+import org.apache.seatunnel.connectors.seatunnel.common.DingTalkParameter;
+import org.apache.seatunnel.connectors.seatunnel.common.source.AbstractSingleSplitReader;
+import org.apache.seatunnel.connectors.seatunnel.common.source.SingleSplitReaderContext;
+
+import com.dingtalk.api.DefaultDingTalkClient;
+import com.dingtalk.api.DingTalkClient;
+import com.dingtalk.api.request.OapiV2DepartmentListsubRequest;
+import com.dingtalk.api.response.OapiV2DepartmentListsubResponse;
+import com.fasterxml.jackson.databind.JsonNode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+public class DingTalkSourceReader extends AbstractSingleSplitReader<SeaTunnelRow> {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(DingTalkSourceReader.class);
+    protected final SingleSplitReaderContext context;
+    protected final DingTalkParameter dtParameter;
+    protected DingTalkClient dtClient;
+    protected OapiV2DepartmentListsubRequest dtRequest;
+    protected final DeserializationSchema<SeaTunnelRow> deserializationSchema;

Review Comment:
   The filed is not used.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] MonsterChenzhuo commented on pull request #2757: [Feature][Connector2] Add DingTalk Source #2684

Posted by GitBox <gi...@apache.org>.
MonsterChenzhuo commented on PR #2757:
URL: https://github.com/apache/incubator-seatunnel/pull/2757#issuecomment-1385407885

   @MRYOG Will this pr go ahead? If not, I would like to take over and finish it


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org