dosubot[bot] commented on issue #34328:
URL: https://github.com/apache/superset/issues/34328#issuecomment-3121685838

   <!-- Answer -->
   This happens because Superset infers your duration column as a temporal type 
(like time or interval), so the Table chart tries to apply a datetime 
formatter. Since your values are durations (not actual datetimes), the 
formatter fails and you get `NaN:NaN:NaN` instead of the raw string. Superset 
doesn't have a dedicated "duration" type—only NUMERIC, STRING, TEMPORAL, and 
BOOLEAN—so it can't distinguish between a time and a duration automatically. If 
the column is treated as STRING, it will display as expected; if it's TEMPORAL, 
it tries to parse and format it, which fails for durations in `HH:MM:SS` or 
similar formats [see code 
details](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts).
   
   To fix this, cast your duration column to STRING in your database query or 
in the dataset's column configuration in Superset. For example, in SQL you can 
use `CAST(call_period AS VARCHAR)` or similar, depending on your database. In 
the dataset editor, you can also set the column's type to STRING if possible. 
This will prevent Superset from applying the temporal formatter and your 
durations will render as plain text, as you expect.
   
   There isn't a built-in workaround for handling durations as a special type, 
so until Superset adds support for a "duration" column type or a fallback, 
forcing the column to STRING is the best approach 
[reference](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/db_engine_specs/base.py).
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/b412658b-781e-474e-a190-3cf19b344b75?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/b412658b-781e-474e-a190-3cf19b344b75?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/b412658b-781e-474e-a190-3cf19b344b75?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/b412658b-781e-474e-a190-3cf19b344b75?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/b412658b-781e-474e-a190-3cf19b344b75?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/b412658b-781e-474e-a190-3cf19b344b75?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/b412658b-781e-474e-a190-3cf19b344b75?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat
 with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu
 b)&nbsp;[![Join 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/34328)


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to