kkalyan opened a new issue #4021: Question: How to configure Temporal fields on 
Presto 
URL: https://github.com/apache/incubator-superset/issues/4021
 
 
   I'm using Superset to query Hive database via Presto connector, which has 
partitions in this format: 20171201 (YYYYMMDD). SQL lab works fine. 
   
   What should be the configuration for Datetime Format and Database Expression 
to use the table Explore screen? 
   
   I've been using 
   
![image](https://user-images.githubusercontent.com/391567/33681767-65cc1138-da7a-11e7-90bd-a6d5ad1d1896.png)
   
   Is there a better way? 
   
   When 'Include time' is used, this fails with  the error 
   `Should not have nextUri if failed` because of using date_trunc 
   
   the query generated is
   ```
   SELECT "cluster_type" AS "cluster_type",
          date_trunc('day', CAST(dt AS TIMESTAMP)) AS "__timestamp",
          COUNT(*) AS "count"
   FROM "xxx"."xxx"
   WHERE "dt" >= REPLACE(SUBSTR('2017-12-04 00:00:00',1,10),'-','')
     AND "dt" <= REPLACE(SUBSTR('2017-12-06 11:33:53',1,10),'-','')
   GROUP BY "cluster_type",
            date_trunc('day', CAST(dt AS TIMESTAMP))
   ORDER BY "count" DESC
   LIMIT 50000
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to