Skip to content
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

[destination-postgres] postgis doesn't maintain geometry data #3199

Open
kevinob11 opened this issue May 4, 2021 · 2 comments
Open

[destination-postgres] postgis doesn't maintain geometry data #3199

kevinob11 opened this issue May 4, 2021 · 2 comments
Labels
area/connectors Connector related issues certified community connectors/destination/postgres frozen Not being actively worked on team/destinations Destinations team's backlog type/bug Something isn't working

Comments

@kevinob11
Copy link

kevinob11 commented May 4, 2021

Expected Behavior

Syncing MSSQL geometry column to a postgres database with postgis should keep the geometry column type

Current Behavior

The geometry column type is switched to varchar and the content is mangled
e.g. POINT (1118476.380824917 747196.45540725021) -> 6F0B0000010CE4BD7D610C1131419C232BE978CD2641

Steps to Reproduce

  1. Set up and run sync from geometry column mssql to postgres with postgis

Severity of the bug for you

Medium

Airbyte Version

0.20.0-alpha

Connector Version (if applicable)

MSSQL - 0.2.3
Postgres - 0.2.4

┆Issue is synchronized with this Asana task by Unito

@kevinob11 kevinob11 added the type/bug Something isn't working label May 4, 2021
@marcosmarxm
Copy link
Member

hey @kevinob11 thanks for reporting this. Another user had a similar problem using geometry data type.
Airbyte uses JDBC data types to map the source types, but I think this can be extended to support specific database types. Right now the fallback is trying to cast the value to Java String and probably convert the wrongly the POINT type.

@kevinob11
Copy link
Author

Thanks. For anyone else dealing with this you can convert to VARCHAR cast(Shape.STAsText() as varchar(max)) in a view then sync that view instead, converting back to geometry on the postgres server. I actually did mine in a foreign data wrapper, but I expect this would work with Airbyte as well.

@sherifnada sherifnada added the area/connectors Connector related issues label Jul 6, 2021
@grishick grishick added the team/destinations Destinations team's backlog label Sep 27, 2022
@marcosmarxm marcosmarxm changed the title Airbyte MSSQL -> Postgres with postgis doesn't maintain geometry data Destination Postgres: postgis doesn't maintain geometry data Nov 30, 2022
@marcosmarxm marcosmarxm added help-welcome Accepting external contributions needs-feedback and removed help-welcome Accepting external contributions labels Jun 27, 2023
@marcosmarxm marcosmarxm changed the title Destination Postgres: postgis doesn't maintain geometry data [destination-postgres] postgis doesn't maintain geometry data Feb 13, 2024
@marcosmarxm marcosmarxm added certified and removed type/bug Something isn't working community needs-feedback team/destinations Destinations team's backlog labels Feb 13, 2024
@marcosmarxm marcosmarxm added community type/bug Something isn't working and removed autoteam labels Feb 13, 2024
@bleonard bleonard added the frozen Not being actively worked on label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues certified community connectors/destination/postgres frozen Not being actively worked on team/destinations Destinations team's backlog type/bug Something isn't working
Projects
No open projects
Status: Backlog (unscoped)
Development

No branches or pull requests

7 participants