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/08/12 06:49:47 UTC

[GitHub] [superset] mail2lawi commented on issue #15768: Postgresql DB Engine Error: '>=' not supported between instances of 'datetime.timedelta' and 'int'

mail2lawi commented on issue #15768:
URL: https://github.com/apache/superset/issues/15768#issuecomment-897392296


   Following on your suggestion, I fixed it by editing the date column expression in the dataset editor window:
   
   ![image](https://user-images.githubusercontent.com/29949457/129150752-51d3a959-29a7-471a-b665-13fc718c5012.png)
   
   
   > After further experimentation, the issue seems to be timezones. If I removed the timezone offset with to_char(), my query works.
   > 
   > **Update:**
   > 
   > I was able to work around the issue with the following query:
   > 
   > ```sql
   > SELECT (time at time zone 'CEST')::timestamp without time zone AS "time",
   >        ma_spo2,
   >        ma_bpm,
   >        ma_perf
   > FROM pulse_ox_moving_average
   > ```
   > 
   > ![superser_error_workaround](https://user-images.githubusercontent.com/22125622/126900290-2bd45d90-2389-44b2-9f59-2d12c0d9d197.png)
   > 
   > This hack would allow me to create time-series charts where as using to_char would not. Setting a timezone and then localizing by removing the timezone is not ideal for the long term.
   
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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