You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.22.1
Expected results
Time series chat display correctly
In json format data, timestamp is correct unix timestamp format
Actual results
All time in time series become 1970
In json format data, timestamp become something like1517.2956000000001
At the same time, if use query tool execute raw query, time stamp is
1517295600.0
Steps to reproduce
Config kylin datasource
select table
build time with hour as timecolumn
select Timeseries-linechart
View the x ais
dowload the json format
The text was updated successfully, but these errors were encountered:
I debugged the code and found the problem happens in viz.py 114-122
if DTTM_ALIAS in df.columns:
if timestamp_format in ('epoch_s', 'epoch_ms'):
df[DTTM_ALIAS] = pd.to_datetime(df[DTTM_ALIAS], utc=False)
else:
df[DTTM_ALIAS] = pd.to_datetime(
df[DTTM_ALIAS], utc=False, format=timestamp_format)
if self.datasource.offset:
df[DTTM_ALIAS] += timedelta(hours=self.datasource.offset)
it use pandas.to_datetime to convert the timestamp value to datetime format. However, by default the to_datetime function us ns as original time unit. And the query result is in second. This make time value * 10e-9 after convert.
Surperset should use some code to determine the timestamp unit.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.
Make sure these boxes are checked before submitting your issue - thank you!
Superset version
0.22.1
Expected results
Time series chat display correctly
In json format data, timestamp is correct unix timestamp format
Actual results
All time in time series become 1970
In json format data, timestamp become something like1517.2956000000001
At the same time, if use query tool execute raw query, time stamp is
1517295600.0
Steps to reproduce
Config kylin datasource
select table
build time with hour as timecolumn
select Timeseries-linechart
View the x ais
dowload the json format
The text was updated successfully, but these errors were encountered: