Superset SQL Lab time field display problem
See original GitHub issueThe statement to build a table is:
CREATE TABLE test.dwd_mid_app_ctr_readtime_info_local
(
…
…
…
rectime
DateTime,
createTime
DateTime DEFAULT now()
)
ENGINE = ReplicatedMergeTree(‘/clickhouse/tables/shard01/table_dwd_mid_app_ctr_readtime_info_local’, ‘table_dwd_mid_app_ctr_readtime_info_local_r1’)
PARTITION BY (toYYYYMMDD(rectime), toHour(rectime))
ORDER BY (dev, rectime)
SETTINGS index_granularity = 8192;
Use the client to query clickhouse, the result is:
Use superset SQL Lab to query clickhouse, the result is:
I personally understand that this is due to the time zone issue that causes the time field to be formatted as utc? I tried to modify config.py and change.
But it still didn’t work. Please remind me how I should modify the time zone setting of superset to make the time consistent with the clickhouse server.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
Regarding the inaccuracy of the time and time zone displayed by Superset, please refer to the description of @zhaoyongjie for the description of the problem: related discussion at clickhouse: https://github.com/ClickHouse/ClickHouse/issues/4548
Finally, the time display problem is solved by adjusting the time offset in the dataset. This problem still needs to be solved, otherwise the icon display time will be incorrect, which is a wrong time.
Hope it could help everyone,GL .
In my environment:
(python37_evn) appops@clickhouse-docker-newsrec-superset-3-9psnn-0924x-5fcd5d8784rjcb:~$ pip list|grep numpy numpy 1.20.3
You can try to downgrade numpy to 1.19.5,If the error is reported, it will work normally.