You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "msyavuz (via GitHub)" <gi...@apache.org> on 2026/09/23 13:08:07 UTC

[I] MongoDB datasets with a schema return no rows in charts [superset]

msyavuz opened a new issue, #44576:
URL: https://github.com/apache/superset/issues/44576

   ### Bug description
   
   Charts on a MongoDB dataset with `schema` set return no rows. `SqlaTable.get_sqla_table` builds `table(table_name, schema=schema)`, so the chart query renders `FROM "testdb"."orders"`. PyMongoSQL treats the whole `FROM` reference as the collection name and always queries the database in the connection URI, so it looks for a collection literally named `testdb.orders`.
   
   #44141 fixes the same rendering for SQL Lab (Data Preview and the schema selector) through `MongoDBEngineSpec.quote_table` and `adjust_engine_params`, but datasets don't go through `quote_table`.
   
   ### How to reproduce
   
   1. `docker run -d --rm -p 27017:27017 mongo:7` and seed documents into `testdb.orders`.
   2. Add a database with `mongodb://localhost:27017/testdb?mode=superset`.
   3. Create a dataset on `testdb` / `orders` and build any chart on it.
   4. The chart returns no data; the generated SQL has `FROM "testdb"."orders"`.
   
   ### Expected
   
   The chart queries the `orders` collection in `testdb`, either by rendering the bare collection name with the dataset's schema applied to the connection (as SQL Lab does after #44141), or by PyMongoSQL resolving `schema.collection`.
   


-- 
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-unsubscribe@superset.apache.org.apache.org

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


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


Re: [I] MongoDB datasets with a schema return no rows in charts [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #44576: MongoDB datasets with a schema return no rows in charts
URL: https://github.com/apache/superset/issues/44576


-- 
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-unsubscribe@superset.apache.org

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


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