nytai commented on a change in pull request #9530: [charts] adds new filters ui
URL:
https://github.com/apache/incubator-superset/pull/9530#discussion_r410429429
##########
File path: superset/charts/dao.py
##########
@@ -51,3 +56,25 @@ def bulk_delete(models: Optional[List[Slice]], commit: bool
= True) -> None:
if commit:
db.session.rollback()
raise ex
+
+ @staticmethod
+ def fetch_unique_column_values(column_name: str) -> List:
+ return [
+ val[0]
+ for val in db.session.query(getattr(Slice,
column_name)).distinct().all()
+ ]
+
+ @staticmethod
+ def fetch_unique_datasources() -> Optional[List["BaseDatasource"]]:
Review comment:
That's a good point. I originally implemented the viz_types by checking
unique vals in the db, which ended up informing the decision to go with this
implementation. Going to see if if there's a way to collect available viz types
instead of relying on created ones...
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]