apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.82k stars 13.88k forks source link

Support postgis commands #24861

Closed jo-chemla closed 6 months ago

jo-chemla commented 1 year ago

A clear and concise description of what the bug is.

How to reproduce the bug

Apache Superset is installed via docker-compose. I'm connecting to one of my postgis DB through superset, but when in the SQL Lab in superset (or when computing additional columns), then it seems like the postgis extension is not installed since SELECT PostGIS_Full_Version() or SELECT ST_AsGeoJSON(location) FROM db; both result in an error, No function matches the given name and argument. Is there a way to enable the postgis extension within superset? The location column stores the polygon/point in WKB format.

What I've tried:

ST_xyz functions should be supported within the sqllab and column creation.

Actual results

ST_xyz functions should be supported within the sqllab and column creation.

Screenshots

image

Environment

(please complete the following information):

jo-chemla commented 1 year ago

Possible useful tool: have a look at GeoAlchemy2 which could be used to parse the sqllab query instead of sqlalchemy?

rkortekaas commented 10 months ago

@jo-chemla Any news on this? I'm running into the same issue..

rusackas commented 6 months ago

If anyone wants to contribute postgis support/drivers/docs, or anyone wants to open a SIP to introduce GeoAlchemy2 into Superset as an additional layer (perhaps alongside sqlalchemy?) that would be welcomed. Right now, this thread has been silent since last year, and doesn't seem to be a bug, per se. If you want, I'm happy to reopen this and convert it to a discussion to keep the ball rolling!

jo-chemla commented 6 months ago

Thanks @rusackas for the ping, indeed not a bug and would therefore be happy to move this to a discussion/reopen, to eventually lead to a SIP.

Improving superset support for geospatial databases via GeoAlchemy to enable PostGIS - indeed probably alongside sqlalchemy - would bring lots of users/orgs from geospatial communities a'd let them connect their DBs to superset for dashboarding and interactive exploration.

Happy to get some directions or provide feedback on this matter

rusackas commented 6 months ago

Yep, if we can connect to everything we do today and more, I think people would be all for it! Reopening and moving to a Discussion thread!