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

Changed of Date to epoch time in Table view - Superset - 0.25.6 #5182

Closed
3 tasks done
rohanagg opened this issue Jun 12, 2018 · 9 comments
Closed
3 tasks done

Changed of Date to epoch time in Table view - Superset - 0.25.6 #5182

rohanagg opened this issue Jun 12, 2018 · 9 comments

Comments

@rohanagg
Copy link

rohanagg commented Jun 12, 2018

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if any
  • I have reproduced the issue with at least the latest released version of superset
  • I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

0.25.6

Expected results

Expected result in 0.17.6 is :
image

Actual results

Actual result which I am getting in 0.25.6 is :
image

Steps to reproduce

Open the slice and select the table view.
In the group by select any column with date as datatype
select any metric against it.
Output is epoch time against the metric

@rumbin
Copy link
Contributor

rumbin commented Jun 13, 2018

@rohanagg I remember that this issue had been reported multiple times by now. However, I haven't looked up whether it has been fixed meanwhile and happened to reappear, or if your report is a duplicate.

Could you do the research, please?

@llozanoc
Copy link

I'm having the same problem with the timestamp types and Table views

This problem is reported in the issue #3027 for the "NOT GROUPED BY" colums, but in my case I'm selecting a timestamp value in the group by.

Anyway without grouping by date the problem persists.

image

However, with a Distribution - Bar Chart , the format of the date is correct

image

@amzhang
Copy link

amzhang commented Jun 27, 2018

+1

1 similar comment
@csc5k
Copy link

csc5k commented Jun 29, 2018

+1

@rohanagg
Copy link
Author

Issue still exists in Version 26.3.. Table view shows date in epoch format.. While it is solved in case of Pivot view

Table View -
image

Pivot View -
image

Are we doing anything to cater such things in future versions. Our company runs on Superset but because of such issues it becomes hectic for business owner to get attached to Superset as a visualisation tool

@rohanagg
Copy link
Author

Can someone help here. As it is becoming blocker for day to day activity and we are not able to superset to latest version

@awsiotdemo
Copy link

+1

@ngoclong19
Copy link

A temporary solution is casting the date to string. We create an additional dimension with this expression TO_CHAR(date, 'yyyy/mm/dd').

@kakoni
Copy link
Contributor

kakoni commented Dec 20, 2018

Still present in 0.29. It is caused by this commit
0ec9cd4

Basically datetime date field gets formatted by BaseViz.json_dumps that uses json_int_dttm_ser serializer which turns date into epoch.

@mistercrunch I guess that commit fixed non grouped options, but in turn broke grouped.
What happens if one would only do

    def json_dumps(self, obj, sort_keys=False):
        return json.dumps(
            obj,
            default=utils.json_iso_dttm_ser,
            sort_keys=sort_keys,
            ignore_nan=True
        )

in tableviz ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants