villebro commented on a change in pull request #9107: feat: add rolling window
support to 'Big Number with Trendline' viz
URL:
https://github.com/apache/incubator-superset/pull/9107#discussion_r389347251
##########
File path: superset/examples/world_bank.py
##########
@@ -97,31 +97,32 @@ def load_world_bank_health_n_pop(
db.session.commit()
tbl.fetch_metadata()
+ metric = "sum__SP_POP_TOTL"
+ metrics = ["sum__SP_POP_TOTL"]
Review comment:
This is more a general comment relating to the current structure of
examples, not specifically this PR. But given the fact that `metrics` is
already defined above (line 80), it might be a good idea to disambiguate here.
For example `default_metrics`, `total_population_metrics` or similar.
Another option, which I personally would prefer, would be to remove the
legacy metrics above, and replace both `metric` and `metrics` here with adhoc
metrics. Something like
```python
total_population_metric = {
...
}
```
and later on where a `metrics` list is expected, just passing a
`[total_population_metric]` to highlight that it's a single value list.
----------------------------------------------------------------
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]