You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "alfredho811 (via GitHub)" <gi...@apache.org> on 2023/04/12 21:47:40 UTC

[GitHub] [superset] alfredho811 opened a new issue, #21508: Date column in superset displayed as unix timestamp

alfredho811 opened a new issue, #21508:
URL: https://github.com/apache/superset/issues/21508

   A clear and concise description of what the bug is.
   
   #### How to reproduce the bug
   
   Using `Superset verion 2.0.0` and `postgres as data warehouse`,
   
   I created a heatmap where the x-axis are the dates and y-axis stock codes.
   
   
   <img width="889" alt="image" src="https://user-images.githubusercontent.com/69471240/190916959-ed6b5053-0f19-40de-916e-da62b65b77de.png">
   
   The SQL is as follows
   
   ```
   SELECT date_trunc('month', release_time_hkt) AS release_month,
          sehk_code AS sehk_code,
          COUNT(*) AS count
   FROM l1_trading.vw_trd_hkex_listed_company_publication
   GROUP BY date_trunc('month', release_time_hkt),
            sehk_code
   ORDER BY count DESC
   LIMIT 10000;
   ```
   
   I would expect that the x-axis would show the dates in the standard format (e.g. 2022-08-01), not in unix timestamp.
   
   
   I found a similar issue reported here:  https://github.com/apache/superset/issues/3027
   
   but that's for older superset version.
   
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version:
   - superset version: `superset version` ---> 2.0.0
   - python version: `python --version` (I did not check, because I am simply using the official apache superset docker image `apache/superset:2.0.0`)
   
   - node.js version: `node -v`
   - any feature flags active:
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   ---> I don't see any logs specific to this conversion to unix timestamp
   
   - [ ] I have reproduced the issue with at least the latest released version of superset.
   --> 2.0.0 is the latest superset version
   
   - [ ] I have checked the issue tracker for the same issue and I haven't found one similar.
   ---> I cannot find a similar issue with superset version `2.0.0`
   
   
   ### Additional context
   
   Add any other context about the problem here.
   


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


[GitHub] [superset] michael-s-molina commented on issue #21508: Date column in superset displayed as unix timestamp

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on issue #21508:
URL: https://github.com/apache/superset/issues/21508#issuecomment-1658188677

   > Is there currently any plan in your roadmap to migrate Heatmap to EChart ?
   
   Yes. We're planning to migrate more charts after 3.0. We already have some PRs in the works [here](https://github.com/apache/superset/pull/23973) an [here](https://github.com/apache/superset/pull/23870). I added a card to our roadmap to ensure this chart gets prioritized given this problem.


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


[GitHub] [superset] sfirke commented on issue #21508: Date column in superset displayed as unix timestamp

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on issue #21508:
URL: https://github.com/apache/superset/issues/21508#issuecomment-1444373723

   This is fixed in 2.0.1 for me, is this still an issue for you?


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


[GitHub] [superset] sqja commented on issue #21508: Date column in superset displayed as unix timestamp

Posted by "sqja (via GitHub)" <gi...@apache.org>.
sqja commented on issue #21508:
URL: https://github.com/apache/superset/issues/21508#issuecomment-1656597611

   > I don't know how this was working before given that this control never existed in this chart? Did it assumed a specific format by default?
   
   Indeed in this regards here is an example of a currently working Heatmap we use (superset 2.0.1, last working version) with same data and displaying properly formatted date on X. Visible also on the screenshot some settings currently applied to configure it
   
   ![image](https://github.com/apache/superset/assets/130609036/6b6f3f6d-859e-4042-887e-4920cd37add0)
   
   > The problem is that Heatmap is a legacy chart so it would be more valuable if we did this fix when migrating it to ECharts to avoid duplicated work.
   
   Is there currently any plan in your roadmap to migrate Heatmap to EChart ? 


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


[GitHub] [superset] michael-s-molina commented on issue #21508: Date column in superset displayed as unix timestamp

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on issue #21508:
URL: https://github.com/apache/superset/issues/21508#issuecomment-1655980443

   It seems that to resolve this problem we need to add a control to the Heatmap chart so that users can select the appropriate time format similar to what other chart types do. This is an example from Bar chart:
   
   <img width="294" alt="Screenshot 2023-07-28 at 12 07 45" src="https://github.com/apache/superset/assets/70410625/6ba70815-3773-4df0-b552-83ce937efb35">
   
   The problem is that Heatmap is a legacy chart so it would be more valuable if we did this fix when migrating it to ECharts to avoid duplicated work. 
   
   > This problem with timestamp field on X axis seems to be back in 2.1.0, the same was working well with 2.0.1
   
   I don't know how this was working before given that this control never existed in this chart? Did it assumed a specific format by default?


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


[GitHub] [superset] mdeshmu commented on issue #21508: Date column in superset displayed as unix timestamp

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

   You will have to mark column as "is temporal" in dataset settings and specify date format as epoch_s or epoch_ms based on the granularity of the stored values.


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


[GitHub] [superset] alfredho811 commented on issue #21508: Date column in superset displayed as unix timestamp

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

   I have created a `varchar` version of the timestamp/date in postgres and it's working like a charm.
   
   ![image](https://user-images.githubusercontent.com/69471240/191022430-e39c6e79-0261-42a3-84f4-ddae82ef6092.png)
   


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


[GitHub] [superset] sfirke commented on issue #21508: Date column in superset displayed as unix timestamp

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

   Is this same / related to https://github.com/apache/superset/issues/20074 ?  That one should be fixed in upcoming 2.0.1


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


[GitHub] [superset] sqjw commented on issue #21508: Date column in superset displayed as unix timestamp

Posted by "sqjw (via GitHub)" <gi...@apache.org>.
sqjw commented on issue #21508:
URL: https://github.com/apache/superset/issues/21508#issuecomment-1505967346

   This problem with timestamp field on X axis seems to be back in 2.1.0, the same was working well with 2.0.1
   
   ![image](https://user-images.githubusercontent.com/130609036/231587561-ef5fee62-d155-4fec-9274-b8fe73f77986.png)
   


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


[GitHub] [superset] alfredho811 commented on issue #21508: Date column in superset displayed as unix timestamp

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

   Hey @mdeshmu 
   
   Thanks for your reply.
   
   I guess I did not phrase my problem correcty.
   
   ![image](https://user-images.githubusercontent.com/69471240/191019554-ee635480-031d-4b61-a632-50897afebd47.png)
   
   As you can see from the above screenshot, the problem is that the column `date_trunc('month', release_time_hkt)` becomes `unix timestamp`.
   
   Instead, I want it to be like `2022-08-01`, `2022-09-01` instead.
   
   
   =============
   
   
   For the column `release_time_hkt`, I notice that Superset marked it as `TIMESTAMP WITHOUT TIME ZONE`
   
   ![image](https://user-images.githubusercontent.com/69471240/191019822-14ae2d2c-8d8a-471a-b3c4-47866cfef961.png)
   
   
   ==========
   **Similar problem**
   
   Given that I am using Postgres as my database and the problematic column is of type `date` in postgres, I find that the below issue is quite similar to mine.
   
   - Link: https://github.com/apache/superset/issues/13295
   
   The solution here is to format the datetime as string
   
   https://github.com/apache/superset/issues/13295#issuecomment-783986140
   
   
   Is that the only solution?
   
   Thanks


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


[GitHub] [superset] rusackas commented on issue #21508: Date column in superset displayed as unix timestamp

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #21508:
URL: https://github.com/apache/superset/issues/21508#issuecomment-1458579592

   Closing since this appears to be fixed :)


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


[GitHub] [superset] rusackas closed issue #21508: Date column in superset displayed as unix timestamp

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #21508: Date column in superset displayed as unix timestamp
URL: https://github.com/apache/superset/issues/21508


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


[GitHub] [superset] michael-s-molina closed issue #21508: Date column in superset displayed as unix timestamp

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina closed issue #21508: Date column in superset displayed as unix timestamp
URL: https://github.com/apache/superset/issues/21508


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