You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "miomiocat (via GitHub)" <gi...@apache.org> on 2023/03/01 02:58:33 UTC
[GitHub] [superset] miomiocat commented on pull request #23209: feat: Add StarRocks support
miomiocat commented on PR #23209:
URL: https://github.com/apache/superset/pull/23209#issuecomment-1449257641
> Thanks @miomiocat for the contribution. We (Airbnb) are using StarRocks within Superset, but given StarRocks is [compatible with the MySQL protocol](https://docs.starrocks.io/en-us/latest/introduction/StarRocks_intro) we've had good mileage by simply extending the `MySQLEngineSpec`, i.e.,
>
> ```python
> class StarRocksEngineSpec(MySQLEngineSpec):
> """
> The StarRocks engine specification.
> """
>
> engine = "starrocks"
> engine_name = "StarRocks"
> ```
>
> I was wondering whether you considered this option as this adheres to the DRY principle.
Thanks for your reply.
Actually, StarRocks is mostly compatible with mysql but not all.
If you are using internal table in StarRocks only, this implementation can work.
But for [external catalog](https://docs.starrocks.io/zh-cn/latest/data_source/catalog/hive_catalog), it will throw `Database not found` exception in Superset.
for example, you can reproduce this issue with following steps:
1. create a [external catalog](https://docs.starrocks.io/zh-cn/latest/data_source/catalog/hive_catalog)
2. connect this catalog in superset using uri : `starrocks://user:pass@host:port/<catalog name>.<database name> `
3. select a schema from superset UI and execute any SQL in SQL editor like `show tables`
The reason for this exception is that mysql does not handle the catalog in StarRocks so I handle this issue from `adjust_database_uri`.
We are considering changing the format of the current URI and other things. For future expansion, we need a separate StarRocks engine spec.
--
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