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/08/16 10:17:25 UTC
[GitHub] [incubator-seatunnel] hailin0 opened a new pull request, #2429: [Connector-V2][JDBC] Support database: greenplum
hailin0 opened a new pull request, #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429
Support connect greenplum drivers:
* postgresql driver: org.postgresql.Driver
* greenplum driver: com.pivotal.jdbc.GreenplumDriver
<!--
Thank you for contributing to SeaTunnel! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
## Contribution Checklist
- Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-seatunnel/issues).
- Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
- Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
-->
## Purpose of this pull request
Support jdbc connect greenplum
## Check list
* [x] Code changed are covered with tests, or it does not need tests for reason:
* [ ] If any new Jar binary package adding in your PR, please add License Notice according
[New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
* [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
--
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 #2429: [Connector-V2][JDBC] Support database: greenplum
Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429#discussion_r951103162
##########
docs/en/connector-v2/sink/Greenplum.md:
##########
@@ -0,0 +1,17 @@
+# Greenplum
+
+> Greenplum sink connector
Review Comment:
XA transaction is not yet supported in Greenplum Database
--
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 pull request #2429: [Connector-V2][JDBC] Support database: greenplum
Posted by GitBox <gi...@apache.org>.
hailin0 commented on PR #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429#issuecomment-1222082237
> Can we also add tests for Stream mode and tests for XA transaction(two-phase commit)
@ic4y updated
--
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 #2429: [Connector-V2][JDBC] Support database: greenplum
Posted by GitBox <gi...@apache.org>.
ashulin commented on code in PR #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429#discussion_r947399298
##########
seatunnel-e2e/seatunnel-flink-connector-v2-e2e/src/test/java/org/apache/seatunnel/e2e/flink/v2/jdbc/FakeSourceToJdbcGreenplumIT.java:
##########
@@ -0,0 +1,121 @@
+/*
+ * 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.e2e.flink.v2.jdbc;
+
+import static org.testcontainers.shaded.org.awaitility.Awaitility.given;
+
+import org.apache.seatunnel.e2e.flink.FlinkContainer;
+
+import com.google.common.collect.Lists;
+import lombok.extern.slf4j.Slf4j;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.testcontainers.containers.Container;
+import org.testcontainers.containers.GenericContainer;
+import org.testcontainers.containers.output.Slf4jLogConsumer;
+import org.testcontainers.lifecycle.Startables;
+
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Stream;
+
+@SuppressWarnings("checkstyle:MagicNumber")
Review Comment:
```suggestion
```
Currently IT and Test classes will automatically ignore magic number.
If it cannot be automatically ignored, please give me feedback.
--
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 pull request #2429: [Connector-V2][JDBC] Support database: greenplum
Posted by GitBox <gi...@apache.org>.
hailin0 commented on PR #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429#issuecomment-1219647999
> Please add the `document` of this connector.
updated
--
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] ic4y commented on pull request #2429: [Connector-V2][JDBC] Support database: greenplum
Posted by GitBox <gi...@apache.org>.
ic4y commented on PR #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429#issuecomment-1223895988
@hailin0 Thanks
+1
--
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 #2429: [Connector-V2][JDBC] Support database: greenplum
Posted by GitBox <gi...@apache.org>.
EricJoy2048 commented on PR #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429#issuecomment-1218999905
Please add the `document` of this connector.
--
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] ic4y commented on pull request #2429: [Connector-V2][JDBC] Support database: greenplum
Posted by GitBox <gi...@apache.org>.
ic4y commented on PR #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429#issuecomment-1223585560
> > @hailin0 JDBC Sink supports Stream mode. Can it be covered in tests?
>
> Stream mode only dedicated to source?
No. Stream mode only dedicated to Sink
--
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 #2429: [Connector-V2][JDBC] Support database: greenplum
Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429#discussion_r951103887
##########
docs/en/connector-v2/sink/Greenplum.md:
##########
@@ -0,0 +1,17 @@
+# Greenplum
+
+> Greenplum sink connector
Review Comment:
https://docs.vmware.com/en/VMware-Tanzu-Greenplum/6/greenplum-database/GUID-ref_guide-feature_summary.html
--
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] ic4y commented on a diff in pull request #2429: [Connector-V2][JDBC] Support database: greenplum
Posted by GitBox <gi...@apache.org>.
ic4y commented on code in PR #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429#discussion_r949745863
##########
docs/en/connector-v2/sink/Greenplum.md:
##########
@@ -0,0 +1,17 @@
+# Greenplum
+
+> Greenplum sink connector
Review Comment:
Need to indicate whether two-phase commit is supported, which is related to exactly-once semantics.
How to configure `xa_data_source_class_name` if you perform a two-phase commit.
It's better to add a job configuration example.
##########
seatunnel-e2e/seatunnel-flink-connector-v2-e2e/src/test/java/org/apache/seatunnel/e2e/flink/v2/jdbc/JdbcGreenplumIT.java:
##########
@@ -0,0 +1,151 @@
+/*
+ * 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.e2e.flink.v2.jdbc;
+
+import static org.testcontainers.shaded.org.awaitility.Awaitility.given;
+
+import org.apache.seatunnel.e2e.flink.FlinkContainer;
+
+import com.google.common.collect.Lists;
+import lombok.extern.slf4j.Slf4j;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.testcontainers.containers.Container;
+import org.testcontainers.containers.GenericContainer;
+import org.testcontainers.containers.output.Slf4jLogConsumer;
+import org.testcontainers.lifecycle.Startables;
+
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Stream;
+
+@Slf4j
+public class JdbcGreenplumIT extends FlinkContainer {
+
+ private static final String GREENPLUM_IMAGE = "datagrip/greenplum:6.8";
+ private static final String GREENPLUM_CONTAINER_HOST = "flink_e2e_greenplum";
+ private static final int GREENPLUM_CONTAINER_PORT = 5432;
+ private static final String GREENPLUM_HOST = "localhost";
+ private static final int GREENPLUM_PORT = 5435;
+ private static final String GREENPLUM_USER = "tester";
+ private static final String GREENPLUM_PASSWORD = "pivotal";
+ private static final String GREENPLUM_DRIVER = "org.postgresql.Driver";
+ private static final String GREENPLUM_JDBC_URL = String.format(
+ "jdbc:postgresql://%s:%s/testdb", GREENPLUM_HOST, GREENPLUM_PORT);
+
+ private GenericContainer<?> greenplumServer;
+ private Connection jdbcConnection;
+
+ @BeforeEach
+ public void startGreenplumContainer() throws ClassNotFoundException, SQLException {
+ greenplumServer = new GenericContainer<>(GREENPLUM_IMAGE)
+ .withNetwork(NETWORK)
+ .withNetworkAliases(GREENPLUM_CONTAINER_HOST)
+ .withLogConsumer(new Slf4jLogConsumer(log));
+ greenplumServer.setPortBindings(Lists.newArrayList(
+ String.format("%s:%s", GREENPLUM_PORT, GREENPLUM_CONTAINER_PORT)));
+ Startables.deepStart(Stream.of(greenplumServer)).join();
+ log.info("Greenplum container started");
+ // wait for Greenplum fully start
+ Class.forName(GREENPLUM_DRIVER);
+ given().ignoreExceptions()
+ .await()
+ .atMost(180, TimeUnit.SECONDS)
+ .untilAsserted(() -> initializeJdbcConnection());
+ initializeJdbcTable();
+ batchInsertData();
+ }
+
+ @Test
+ public void testJdbcGreenplumSourceAndSink() throws IOException, InterruptedException, SQLException {
+ Container.ExecResult execResult = executeSeaTunnelFlinkJob("/jdbc/jdbc_greenplum_source_and_sink.conf");
+ Assertions.assertEquals(0, execResult.getExitCode());
+
+ // query result
+ String sql = "select age, name from sink";
+ List<Object> result = new ArrayList<>();
+ try (Statement statement = jdbcConnection.createStatement()) {
+ ResultSet resultSet = statement.executeQuery(sql);
+ while (resultSet.next()) {
+ result.add(Arrays.asList(
+ resultSet.getInt("age"),
+ resultSet.getString("name")));
+ }
+ }
+ Assertions.assertEquals(100, result.size());
Review Comment:
Only check the amount of data ? Is it possible to add data type and value validation
--
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 #2429: [Connector-V2][JDBC] Support database: greenplum
Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429#discussion_r947429146
##########
seatunnel-e2e/seatunnel-flink-connector-v2-e2e/src/test/java/org/apache/seatunnel/e2e/flink/v2/jdbc/FakeSourceToJdbcGreenplumIT.java:
##########
@@ -0,0 +1,121 @@
+/*
+ * 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.e2e.flink.v2.jdbc;
+
+import static org.testcontainers.shaded.org.awaitility.Awaitility.given;
+
+import org.apache.seatunnel.e2e.flink.FlinkContainer;
+
+import com.google.common.collect.Lists;
+import lombok.extern.slf4j.Slf4j;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.testcontainers.containers.Container;
+import org.testcontainers.containers.GenericContainer;
+import org.testcontainers.containers.output.Slf4jLogConsumer;
+import org.testcontainers.lifecycle.Startables;
+
+import java.io.IOException;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Stream;
+
+@SuppressWarnings("checkstyle:MagicNumber")
Review Comment:
👌 ok
--
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 pull request #2429: [Connector-V2][JDBC] Support database: greenplum
Posted by GitBox <gi...@apache.org>.
hailin0 commented on PR #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429#issuecomment-1223576153
> @hailin0 JDBC Sink supports Stream mode. Can it be covered in tests?
Streaming mode only dedicated to source?
--
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 #2429: [Connector-V2][JDBC] Support database: greenplum
Posted by GitBox <gi...@apache.org>.
EricJoy2048 commented on code in PR #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429#discussion_r948613106
##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/greenplum/GreenplumDialectFactory.java:
##########
@@ -0,0 +1,39 @@
+/*
+ * 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.jdbc.internal.dialect.greenplum;
+
+import org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.JdbcDialect;
+import org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.JdbcDialectFactory;
+import org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.psql.PostgresDialect;
+
+import com.google.auto.service.AutoService;
+
+@AutoService(JdbcDialectFactory.class)
+public class GreenplumDialectFactory implements JdbcDialectFactory {
+
+ @Override
+ public boolean acceptsURL(String url) {
+ // Support greenplum native driver: com.pivotal.jdbc.GreenplumDriver
+ return url.startsWith("jdbc:pivotal:greenplum:");
Review Comment:
If `url` must not be `null`, please use `@Nonnull` to mark 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
[GitHub] [incubator-seatunnel] hailin0 commented on pull request #2429: [Connector-V2][JDBC] Support database: greenplum
Posted by GitBox <gi...@apache.org>.
hailin0 commented on PR #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429#issuecomment-1223724766
@CalvinKirs please review
--
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] ic4y commented on pull request #2429: [Connector-V2][JDBC] Support database: greenplum
Posted by GitBox <gi...@apache.org>.
ic4y commented on PR #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429#issuecomment-1222126734
@hailin0 JDBC Sink supports Stream mode. Can it be covered in tests?
--
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] CalvinKirs merged pull request #2429: [Connector-V2][JDBC] Support database: greenplum
Posted by GitBox <gi...@apache.org>.
CalvinKirs merged PR #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429
--
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 pull request #2429: [Connector-V2][JDBC] Support database: greenplum
Posted by GitBox <gi...@apache.org>.
hailin0 commented on PR #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429#issuecomment-1223634513
> > > @hailin0 JDBC Sink supports Stream mode. Can it be covered in tests?
> >
> >
> > Stream mode only dedicated to source?
>
> No. Stream mode only dedicated to Sink
Not support exactly-once semantics (XA transaction is not yet supported in Greenplum database).
--
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 #2429: [Connector-V2][JDBC] Support database: greenplum
Posted by GitBox <gi...@apache.org>.
hailin0 commented on code in PR #2429:
URL: https://github.com/apache/incubator-seatunnel/pull/2429#discussion_r949303901
##########
seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/greenplum/GreenplumDialectFactory.java:
##########
@@ -0,0 +1,39 @@
+/*
+ * 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.jdbc.internal.dialect.greenplum;
+
+import org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.JdbcDialect;
+import org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.JdbcDialectFactory;
+import org.apache.seatunnel.connectors.seatunnel.jdbc.internal.dialect.psql.PostgresDialect;
+
+import com.google.auto.service.AutoService;
+
+@AutoService(JdbcDialectFactory.class)
+public class GreenplumDialectFactory implements JdbcDialectFactory {
+
+ @Override
+ public boolean acceptsURL(String url) {
+ // Support greenplum native driver: com.pivotal.jdbc.GreenplumDriver
+ return url.startsWith("jdbc:pivotal:greenplum:");
Review Comment:
ok
--
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