dosubot[bot] commented on issue #34718:
URL: https://github.com/apache/superset/issues/34718#issuecomment-3191663088
<!-- Answer -->
The error happened because column_type_mappings must be a tuple of tuples,
not a list or a list concatenated with a tuple. To patch DuckDBEngineSpec
correctly in superset_config.py, use tuple syntax like this:
```python
from superset.db_engine_specs.duckdb import DuckDBEngineSpec
import re
from sqlalchemy import types
from superset.utils.core import GenericDataType
DuckDBEngineSpec.column_type_mappings = (
(re.compile(r"^double$", re.IGNORECASE), types.Float(),
GenericDataType.NUMERIC),
) + getattr(DuckDBEngineSpec, "column_type_mappings", ())
```
This ensures Superset recognizes 'DOUBLE' columns as numeric and avoids the
TypeError. After updating, restart Superset. If you still see the '?' icon,
double-check the raw type string and clear any cached metadata.
[Reference: Superset engine spec type mapping
structure](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/de841fb0-b908-4736-8e9d-82e53e13f708?feedback_type=great_response)
|
[Irrelevant](https://app.dosu.dev/response-feedback/de841fb0-b908-4736-8e9d-82e53e13f708?feedback_type=irrelevant_answer)
|
[Incorrect](https://app.dosu.dev/response-feedback/de841fb0-b908-4736-8e9d-82e53e13f708?feedback_type=incorrect_sources)
|
[Verbose](https://app.dosu.dev/response-feedback/de841fb0-b908-4736-8e9d-82e53e13f708?feedback_type=too_verbose)
|
[Hallucination](https://app.dosu.dev/response-feedback/de841fb0-b908-4736-8e9d-82e53e13f708?feedback_type=hallucination)
| [Report
🐛](https://app.dosu.dev/response-feedback/de841fb0-b908-4736-8e9d-82e53e13f708?feedback_type=bug_report)
|
[Other](https://app.dosu.dev/response-feedback/de841fb0-b908-4736-8e9d-82e53e13f708?feedback_type=other)</sup> [](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu
b) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/34718)
--
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]