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/08 09:42:17 UTC

[GitHub] [superset] furyou81 opened a new issue #15034: no time grain available when using odelasticsearch

furyou81 opened a new issue #15034:
URL: https://github.com/apache/superset/issues/15034


   Hi, 
   
   I am using Superset with an odelasticsearch databases. I have a DateTime column and I am able to make queries in SQL Lab and to display graph. But I don't have any Time Grain available in the dropdown (it is working fine when using other databases).
   
   [
   ![Screenshot 2021-06-08 at 11 37 48](https://user-images.githubusercontent.com/33728425/121162447-378e2980-c84e-11eb-94fd-1e154e03796c.png)
   ](url)
   


-- 
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] villebro commented on issue #15034: no time grain available when using odelasticsearch

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


   @furyou81 what version are you on? Can you also show your redacted connection string?


-- 
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] furyou81 edited a comment on issue #15034: no time grain available when using odelasticsearch

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


   so when using v1.2 I the time grain are there but I have an other issue.
   
   I have a field called DATETIME. I noticed that when the request was done it is using "DATETIME" and it fails as it is a reserved SQL word so I added a calculated column which modifies it so `DATETIME` using ` instead of ". And everything is working fine until I try to add a time range.
   
   If I add a time range, it is adding an additiona "DATETIME" as bellow:
   
   `SELECT date_format(`DATETIME`, 'yyyy-MM-dd 00:00:00.000') AS __timestamp,
          COUNT(*) AS count
   FROM "default"."psr-2021-06"
   WHERE "DATETIME" >= '2021-05-31T00:00:00'
     AND "DATETIME" < '2021-06-07T00:00:00'
     AND `DATETIME` >= '2021-05-31T00:00:00'
     AND `DATETIME` < '2021-06-07T00:00:00'
   GROUP BY __timestamp
   LIMIT 10000;`
   
   
   I also tried to use an other field but it still tries to add "DATETIME". I also tried to delete DATETIME from the dataset on Superset and then it complains that the field DATETIME is not found event if I am not asking to use it


-- 
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] furyou81 edited a comment on issue #15034: no time grain available when using odelasticsearch

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


   so when using v1.2 I the time grain are there but I have an other issue.
   
   I have a field called DATETIME. I noticed that when the request was done it is using "DATETIME" and it fails as it is a reserved SQL word so I added a calculated column which modifies it so `` `DATETIME` `` using ` instead of ". And everything is working fine until I try to add a time range.
   
   If I add a time range, it is adding an additiona "DATETIME" as bellow:
   
   ``SELECT date_format(`DATETIME`, 'yyyy-MM-dd 00:00:00.000') AS __timestamp,
          COUNT(*) AS count
   FROM "default"."psr-2021-06"
   WHERE "DATETIME" >= '2021-05-31T00:00:00'
     AND "DATETIME" < '2021-06-07T00:00:00'
     AND `DATETIME` >= '2021-05-31T00:00:00'
     AND `DATETIME` < '2021-06-07T00:00:00'
   GROUP BY __timestamp
   LIMIT 10000;``
   
   
   I also tried to use an other field but it still tries to add "DATETIME". I also tried to delete DATETIME from the dataset on Superset and then it complains that the field DATETIME is not found event if I am not asking to use it


-- 
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] furyou81 commented on issue #15034: no time grain available when using odelasticsearch

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


   I am on version 1.0.1 and my connection string is as follow: odelasticsearch+https://xxx-xxx.eu-west-1.es.amazonaws.com:443/


-- 
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] furyou81 edited a comment on issue #15034: no time grain available when using odelasticsearch

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


   so when using v1.2 I the time grain are there but I have an other issue.
   
   I have a field called DATETIME. I noticed that when the request was done it is using "DATETIME" and it fails as it is a reserved SQL word so I added a calculated column which modifies it so `` `DATETIME` `` using ` instead of ". And everything is working fine until I try to add a time range.
   
   If I add a time range, it is adding an additiona "DATETIME" as bellow:
   
   `SELECT date_format(`` `DATETIME` ``, 'yyyy-MM-dd 00:00:00.000') AS __timestamp,
          COUNT(*) AS count
   FROM "default"."psr-2021-06"
   WHERE "DATETIME" >= '2021-05-31T00:00:00'
     AND "DATETIME" < '2021-06-07T00:00:00'
     AND `` `DATETIME` `` >= '2021-05-31T00:00:00'
     AND `` `DATETIME` `` < '2021-06-07T00:00:00'
   GROUP BY __timestamp
   LIMIT 10000;`
   
   
   I also tried to use an other field but it still tries to add "DATETIME". I also tried to delete DATETIME from the dataset on Superset and then it complains that the field DATETIME is not found event if I am not asking to use it


-- 
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] junlincc commented on issue #15034: no time grain available when using odelasticsearch

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


   @furyou81 try v1.2 or latest master? 


-- 
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] furyou81 commented on issue #15034: no time grain available when using odelasticsearch

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


   so when using v1.2 I the time grain are there but I have an other issue.
   
   I have a field called DATETIME. I noticed that when the request was done it is using "DATETIME" and it fails as it is a reserved SQL word so I added a calculated column which modifies it so `DATETIME`. And everything is working fine until I try to add a time range.
   
   If I add a time range, it is adding an additiona "DATETIME" as bellow:
   
   `SELECT date_format(`DATETIME`, 'yyyy-MM-dd 00:00:00.000') AS __timestamp,
          COUNT(*) AS count
   FROM "default"."psr-2021-06"
   WHERE "DATETIME" >= '2021-05-31T00:00:00'
     AND "DATETIME" < '2021-06-07T00:00:00'
     AND `DATETIME` >= '2021-05-31T00:00:00'
     AND `DATETIME` < '2021-06-07T00:00:00'
   GROUP BY __timestamp
   LIMIT 10000;`
   
   
   I also tried to use an other field but it still tries to add "DATETIME". I also tried to delete DATETIME from the dataset on Superset and then it complains that the field DATETIME is not found event if I am not asking to use it


-- 
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] furyou81 edited a comment on issue #15034: no time grain available when using odelasticsearch

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


   so when using v1.2 I the time grain are there but I have an other issue.
   
   I have a field called DATETIME. I noticed that when the request was done it is using "DATETIME" and it fails as it is a reserved SQL word so I added a calculated column which modifies it so `` `DATETIME` `` using ` instead of ". And everything is working fine until I try to add a time range.
   
   If I add a time range, it is adding an additiona "DATETIME" as bellow:
   
   ``SELECT date_format(`DATETIME`, 'yyyy-MM-dd 00:00:00.000') AS __timestamp,
          COUNT(*) AS count
   FROM "default"."psr-2021-06"
   WHERE "DATETIME" >= '2021-05-31T00:00:00'
     AND "DATETIME" < '2021-06-07T00:00:00'
     AND `DATETIME` >= '2021-05-31T00:00:00'
     AND `DATETIME` < '2021-06-07T00:00:00'
   GROUP BY __timestamp
   LIMIT 10000;``
   
   
   I also tried to use an other field but it still tries to add "DATETIME".
   `SELECT COUNT(*) AS count
   FROM "default"."psr-2021-06"
   WHERE "DATETIME" >= '2021-05-31T00:00:00'
     AND "DATETIME" < '2021-06-07T00:00:00'
     AND "TIMESTAMP" >= 1622419200
     AND "TIMESTAMP" < 1623024000
   ORDER BY count DESC
   LIMIT 10000;`
   
   
   I also tried to delete DATETIME from the dataset on Superset and then it complains that the field DATETIME is not found event if I am not asking to use it


-- 
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] furyou81 edited a comment on issue #15034: no time grain available when using odelasticsearch

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


   so when using v1.2 I the time grain are there but I have an other issue.
   
   I have a field called DATETIME. I noticed that when the request was done it is using "DATETIME" and it fails as it is a reserved SQL word so I added a calculated column which modifies it so `` `DATETIME` `` using ` instead of ". And everything is working fine until I try to add a time range.
   
   If I add a time range, it is adding an additiona "DATETIME" as bellow:
   
   ``SELECT date_format(`DATETIME`, 'yyyy-MM-dd 00:00:00.000') AS __timestamp,
          COUNT(*) AS count
   FROM "default"."xxx"
   WHERE "DATETIME" >= '2021-05-31T00:00:00'
     AND "DATETIME" < '2021-06-07T00:00:00'
     AND `DATETIME` >= '2021-05-31T00:00:00'
     AND `DATETIME` < '2021-06-07T00:00:00'
   GROUP BY __timestamp
   LIMIT 10000;``
   
   
   I also tried to use an other field but it still tries to add "DATETIME".
   `SELECT COUNT(*) AS count
   FROM "default"."xxx"
   WHERE "DATETIME" >= '2021-05-31T00:00:00'
     AND "DATETIME" < '2021-06-07T00:00:00'
     AND "TIMESTAMP" >= 1622419200
     AND "TIMESTAMP" < 1623024000
   ORDER BY count DESC
   LIMIT 10000;`
   
   
   I also tried to delete DATETIME from the dataset on Superset and then it complains that the field DATETIME is not found event if I am not asking to use it


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