You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "ic4y (via GitHub)" <gi...@apache.org> on 2023/04/23 10:41:06 UTC

[GitHub] [incubator-seatunnel] ic4y opened a new issue, #4652: [Feature][PostgreSQL-jdbc] Supports GEOMETRY data type for PostgreSQL

ic4y opened a new issue, #4652:
URL: https://github.com/apache/incubator-seatunnel/issues/4652

   ### Search before asking
   
   - [X] I had searched in the [feature](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22Feature%22) and found no similar feature requirement.
   
   
   ### Description
   
   Currently, the Pg source connector does not support the GEOMETRY data type. We can convert the GEOMETRY data type to the String data type in Zeta to support the reading of GEOMETRY data types, like pg(GEOMETRY) -> zeta(String).
   
   You may need to modify the following files in the JDBC connector:
   src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/psql/PostgresTypeMapper.java
   src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/psql/PostgresJdbcRowConverter.java
   
   When testing, note that Pg needs to install the PostGIS plugin:
   ```
   apt-get install postgis postgresql-12-postgis-3
   CREATE EXTENSION IF NOT EXISTS postgis;
   ```
   
   Create a table and insert data:
   ```
   CREATE TABLE spatial_data (
       id SERIAL PRIMARY KEY,
       name VARCHAR(255),
       geometry_data GEOMETRY
   );
   
   -- Insert a point
   INSERT INTO spatial_data (name, geometry_data)
   VALUES ('Test Point', ST_GeomFromText('POINT(30 10)'));
   
   -- Insert a linestring
   INSERT INTO spatial_data (name, geometry_data)
   VALUES ('Test LineString', ST_GeomFromText('LINESTRING(30 10, 40 40, 50 50, 60 60)'));
   ```
   
   Add the GEOMETRY data type in the e2e test and check the synchronized results.
   
   ### Usage Scenario
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.apache.org

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


[GitHub] [incubator-seatunnel] ic4y commented on issue #4652: [Feature][PostgreSQL-jdbc] Supports GEOMETRY data type for PostgreSQL

Posted by "ic4y (via GitHub)" <gi...@apache.org>.
ic4y commented on issue #4652:
URL: https://github.com/apache/incubator-seatunnel/issues/4652#issuecomment-1522664309

   > I understand it's just converted to String on the Source side because we don't know what type is downstream, right
   > @ic4y @EricJoy2048
   You're right
   


-- 
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] zhilinli123 commented on issue #4652: [Feature][PostgreSQL-jdbc] Supports GEOMETRY data type for PostgreSQL

Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on issue #4652:
URL: https://github.com/apache/incubator-seatunnel/issues/4652#issuecomment-1519303377

   I'd like to finish it 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] zhilinli123 commented on issue #4652: [Feature][PostgreSQL-jdbc] Supports GEOMETRY data type for PostgreSQL

Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on issue #4652:
URL: https://github.com/apache/incubator-seatunnel/issues/4652#issuecomment-1521815857

   I understand it's just converted to String on the Source side because we don't know what type is downstream, right
   @ic4y @EricJoy2048 


-- 
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 closed issue #4652: [Feature][PostgreSQL-jdbc] Supports GEOMETRY data type for PostgreSQL

Posted by "ic4y (via GitHub)" <gi...@apache.org>.
ic4y closed issue #4652: [Feature][PostgreSQL-jdbc] Supports GEOMETRY data type for PostgreSQL
URL: https://github.com/apache/incubator-seatunnel/issues/4652


-- 
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] zhilinli123 commented on issue #4652: [Feature][PostgreSQL-jdbc] Supports GEOMETRY data type for PostgreSQL

Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on issue #4652:
URL: https://github.com/apache/incubator-seatunnel/issues/4652#issuecomment-1548075365

   Closing issues
   feature pr:https://github.com/apache/incubator-seatunnel/pull/4673


-- 
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 issue #4652: [Feature][PostgreSQL-jdbc] Supports GEOMETRY data type for PostgreSQL

Posted by "ic4y (via GitHub)" <gi...@apache.org>.
ic4y commented on issue #4652:
URL: https://github.com/apache/incubator-seatunnel/issues/4652#issuecomment-1521386879

   > I'd like to finish it thanks
   Great, looking forward to submitting a pull request.
   


-- 
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