Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: show formatted date instead of epoch on results #10268

Merged
merged 1 commit into from Jul 9, 2020

Conversation

villebro
Copy link
Member

@villebro villebro commented Jul 9, 2020

SUMMARY

When pressing "View results" on Explore View, the primary temporal column is displayed as epochs. This applies a typical %Y-%m-%d %H:%M:%S format to the __timestamp column to make the results slightly more legible.

BEFORE

image

AFTER

image

TEST PLAN

CI + new tests

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

Copy link
Member

@pkdotson pkdotson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@villebro villebro added the v0.37 label Jul 9, 2020
@ktmud
Copy link
Member

ktmud commented Jul 9, 2020

Does this table use the new chart data API? What about other datetime columns? If I'm understanding the code right, all datetime columns will return epochs? I think it would be best if the new API response payload will include data type info, what do you think?

And how about replacing this table with the TableChart? There seems to be some overlapping work here.

@villebro
Copy link
Member Author

villebro commented Jul 9, 2020

@ktmud this is only being used on the DisplayQueryButton on Explore View to show what data is coming from the backend. It's being used to display whatever data is coming back from both the legacy and new chart data endpoint. I also believe it doesn't know any context about datatypes, so this is just a quick fix to make chart/data debugging slightly easier.

@villebro
Copy link
Member Author

villebro commented Jul 9, 2020

Oh sorry @ktmud , I hadn't seen that PR, cool! Yeah, let's use that info once that PR gets merged!

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for making it human-readable, and thanks for the tests.

@villebro villebro merged commit c0d663d into apache:master Jul 9, 2020
@villebro villebro deleted the villebro/format-results branch July 9, 2020 17:51
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
@PiyushGupta3108
Copy link

Hi guys, i'm pretty new to Superset and have recently upgraded to superset 1.1 and i am getting the UNIX timestamp in filter box. Could you please suggest how to resolve it.

@musthak24
Copy link

Same problem here

@villebro
Copy link
Member Author

villebro commented Sep 1, 2021

@PiyushGupta3108 @musthak24 this is a known limitation of Filter Box. Since Filter Box is in the process of being deprecated, and the native value filter properly formats timestamps, I don't expect this to be fixed. If you want to enable native filters, just enable the DASHBOARD_NATIVE_FILTERS feature flag in your superset_config.py.

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.37.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M v0.37 🚢 0.37.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants