You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/06/03 10:36:24 UTC

[GitHub] [superset] boomballa opened a new issue #14967: SQL_lab time field display problem

boomballa opened a new issue #14967:
URL: https://github.com/apache/superset/issues/14967


   The 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:
   ![image](https://user-images.githubusercontent.com/8543659/120630965-ea026d00-c499-11eb-9bb4-274d5572286b.png)
   
   Use superset SQL Lab to query clickhouse, the result is:
   
   ![image](https://user-images.githubusercontent.com/8543659/120631144-1cac6580-c49a-11eb-8602-8ae322c2d40b.png)
   
   
   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.
   
   ![image](https://user-images.githubusercontent.com/8543659/120631340-5a10f300-c49a-11eb-9276-081ef38cb2e2.png)
   
   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.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on issue #14967: Superset SQL Lab time field display problem

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on issue #14967:
URL: https://github.com/apache/superset/issues/14967#issuecomment-853845899


   >  sqlalchemy-clickhouse
   
   related discussion at clickhouse:
   https://github.com/ClickHouse/ClickHouse/issues/4548


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] boomballa commented on issue #14967: Superset SQL Lab time field display problem

Posted by GitBox <gi...@apache.org>.
boomballa commented on issue #14967:
URL: https://github.com/apache/superset/issues/14967#issuecomment-854469680






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] boomballa edited a comment on issue #14967: Superset SQL Lab time field display problem

Posted by GitBox <gi...@apache.org>.
boomballa edited a comment on issue #14967:
URL: https://github.com/apache/superset/issues/14967#issuecomment-854475143


   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](url)
   
   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.
   
   ![image](https://user-images.githubusercontent.com/8543659/120769748-01039680-c550-11eb-86d0-645dbeda4be6.png)
   
   ![image](https://user-images.githubusercontent.com/8543659/120770542-d239f000-c550-11eb-91f4-ed5a4637fcce.png)
   
   Hope it could help everyone,GL .
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on issue #14967: Superset SQL Lab time field display problem

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on issue #14967:
URL: https://github.com/apache/superset/issues/14967#issuecomment-853836891






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] boomballa commented on issue #14967: Superset SQL Lab time field display problem

Posted by GitBox <gi...@apache.org>.
boomballa commented on issue #14967:
URL: https://github.com/apache/superset/issues/14967#issuecomment-853842303


   @zhaoyongjie   thank u for u reply, i  use  sqlalchemy-clickhouse  to connect to clickhouse .
   
   Requirement already satisfied: sqlalchemy-clickhouse in /home/appops/python37_evn/lib/python3.7/site-packages (0.1.5.post0)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on issue #14967: Superset SQL Lab time field display problem

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on issue #14967:
URL: https://github.com/apache/superset/issues/14967#issuecomment-853836891


   Hi @boomballa , these settings are not for Clickhouse. which clickhouse driver do you use? is it have timezone setting in that driver(like JDBC parameters)?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] boomballa commented on issue #14967: Superset SQL Lab time field display problem

Posted by GitBox <gi...@apache.org>.
boomballa commented on issue #14967:
URL: https://github.com/apache/superset/issues/14967#issuecomment-853817501


   **supplement:**
   When I use superset sql lab to execute SQL, the following error is reported:
   
   2021-06-03T11:58:36.273503888Z -   File "/home/appops/python37_evn/lib/python3.7/site-packages/superset/result_set.py", line 144, in __init__
   2021-06-03T11:58:36.273506512Z -     series, type=pa.timestamp("ns", tz=tz)
   2021-06-03T11:58:36.273509037Z -   File "pyarrow/array.pxi", line 859, in pyarrow.lib.Array.from_pandas
   2021-06-03T11:58:36.273511719Z -   File "pyarrow/array.pxi", line 265, in pyarrow.lib.array
   2021-06-03T11:58:36.27351437Z -   File "pyarrow/array.pxi", line 80, in pyarrow.lib._ndarray_to_array
   2021-06-03T11:58:36.273516996Z -   File "pyarrow/error.pxi", line 107, in pyarrow.lib.check_status
   2021-06-03T11:58:36.27351961Z - pyarrow.lib.ArrowTypeError: Did not pass numpy.dtype object
   2021-06-03T11:58:36.313761232Z - INFO:werkzeug:10.189.123.212 - - [03/Jun/2021 19:58:36] "POST /superset/sql_json/ HTTP/1.1" 200 -


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] boomballa commented on issue #14967: Superset SQL Lab time field display problem

Posted by GitBox <gi...@apache.org>.
boomballa commented on issue #14967:
URL: https://github.com/apache/superset/issues/14967#issuecomment-853817501






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org