jo-chemla opened a new issue, #24861:
URL: https://github.com/apache/superset/issues/24861

   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:
    - Inside the docker-compose file, I replaced the `image: postgres:14` with 
`image: postgis/postgis:14-master` 
    - then created a superset user via the container console with `adduser 
superset`
    - to then connect to the DB via `psql`, list db via `\l`  then connect to 
superset db via `\c superset`
    - and finally enable extension via `CREATE EXTENSION postgis;`
    - Running SELECT PostGIS_Full_Version();  in the container console do work, 
but running the same command in the sqllab within superset web ui still fails : 
No function matches the given name and argument types. You might need to add 
explicit type casts.
   
   
   
   `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](https://github.com/apache/superset/assets/16822841/ec399aa9-c338-490e-8ad3-0c526aef5752)
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version: Chrome 115.0.5790.110
   - superset version: `2.1.0`
   


-- 
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: notifications-unsubscr...@superset.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to