Page MenuHomePhabricator

Superset Date Filter fix needed
Closed, ResolvedPublic

Assigned To
Authored By
Iflorez
Sep 21 2022, 11:26 PM
Referenced Files
F36439642: image.png
Jan 23 2023, 2:07 PM
F36439640: image.png
Jan 23 2023, 2:07 PM
F36439638: image.png
Jan 23 2023, 2:07 PM
F36439636: image.png
Jan 23 2023, 2:07 PM
F35536621: Screen Shot 2022-09-26 at 9.56.19 AM.png
Sep 27 2022, 6:10 PM
F35536605: Screen Shot 2022-09-26 at 9.56.02 AM.png
Sep 27 2022, 6:10 PM

Description

Previous efforts to update Superset topmost date filters on the Readers and Editors dashboards are not working at this time.
We document the previous approaches in T298578.

Issues

  1. Perpetuity. when we open to explore the chart, make changes, and then save & overwrite the filter, the change doesn't ultimately overwrite the dashboard filter
    • Changed dates in the filterbox chart and did a Save Overwrite

Screen Shot 2022-09-26 at 9.56.02 AM.png (891×1 px, 67 KB)

  • However, Dates do not get updated on the dashboard

Screen Shot 2022-09-26 at 9.56.19 AM.png (385×1 px, 54 KB)

  1. The expected fix, setting the date filter as below at present only gives us partial July data
    • Start date: Last July 1st
    • End date: Last July 1st plus 1 year

Impact:
These two issues reduce the ux quality for both maintainers and viewers of the charts and add additional steps which require identifying that the preset filter is off at first load and the dashboard is not actually updated.

Event Timeline

We discussed this in the Data Engineering office hours. We understand the the filter issue is still not fixed, but that using a Superset template might be a workaround. See T312134: Request for SQL Templating to be enabled in Superset for when templating was enabled.

See also: https://superset.apache.org/docs/installation/sql-templating/

I will not be able to try this workaround this quarter.
@Iflorez would you like to give it a try? I could assign this task to you OR we can move it to the backlog.

So, when SQL templating was enabled I played around with it to try it out. I do not recommend it as a workaround – it will be difficult to implement.

@BTullis : assigning to you. As discussed during the DE office hours - "Need to check the CHANGELOG and upgrade to 1.5.2 to see if it fixes things" , Can we try upgrading Superset ?

As mentioned by mpopov above, we (Product Analytics) don't want to try SQL templating.

Confirmed! Superset will be upgraded to v2.0. @BTullis will create a new task and DE will try to prioritize it to be done by end of Q2.
Request to DE: Please let Product-Analytics know for any testing support and communicate these changes well in advance.

Moving to Blocked until the upgrade is completed and until we confirm if this issue is fixed after the upgrade.

Correction, Superset is being upgraded to v1.5.3 T323458
I will test the date filter box and report on any issues.

Change 881510 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Enable dashboard native filtering in Superset

https://gerrit.wikimedia.org/r/881510

Change 881510 merged by Btullis:

[operations/puppet@production] Enable dashboard native filtering in Superset

https://gerrit.wikimedia.org/r/881510

Change 881596 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] Enable filterbox migration tool for superset

https://gerrit.wikimedia.org/r/881596

Change 881596 merged by Btullis:

[operations/puppet@production] Enable filterbox migration tool for superset

https://gerrit.wikimedia.org/r/881596

Adding this update retrospectively. it was first mentioned in the Product-Analytics channel on Slack.

I have enabled two new features in superset ( and also in superset-next ) so I'm hoping that you will be able to try them out and provide a little feedback, please. These features are:

I've enabled them as a way of trying to find a solution for a long-standing issue with filtering dashboards by date.

Essentially, the authors of Superset have decided to deprecate the use of the filter box on dashboards, instead replacing it with native dashboard filtering. Native filtering provides a new pane on the left-hand side of the dashboard where your filters can be defined, whereas the filterbox mechanism is actually a chart in itself, which needs to be added to the dashboard. The screenshots below are intended to illustrate this.
A tool has been created, which aims to help users migrate from filterbox to native filters. I have enabled this feature, so when a dashboard containing a filterbox is loaded, and you are an owner of that dashboard, an option to review and migrate or defer, is shown.

Hopefully this will help to address the deficiencies identified in this ticket.

image.png (1×3 px, 308 KB)

image.png (943×3 px, 209 KB)

image.png (1×3 px, 284 KB)

image.png (1×746 px, 118 KB)

Please do let me know if this is sufficient, or if you have any other queries.

mpopov triaged this task as Medium priority.
mpopov moved this task from Doing to Needs Investigation on the Product-Analytics (Kanban) board.