Compare commits

...

1 Commits

Author SHA1 Message Date
Evan Rusackas
47e3172da5 feat(db-engine-specs): add engine specs for PostGIS, DoltDB, TiDB, QuestDB, and Timeplus
Add database engine specs with metadata and logos for five databases:

- PostGIS: PostgreSQL-compatible spatial database extension
- DoltDB: MySQL-compatible version-controlled database
- TiDB: MySQL-compatible distributed HTAP database
- QuestDB: High-performance time-series database
- Timeplus: Streaming-first analytics platform

Also fixes MSSQL's logo reference (msql.png → mssql-server.png).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 16:33:48 -08:00
11 changed files with 353 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 355.42 184.17">
<defs>
<style>
.cls-1 {
fill: #dc150b;
}
.cls-1, .cls-2, .cls-3 {
stroke-width: 0px;
}
.cls-2 {
fill: #000;
}
.cls-3 {
fill: #fff;
}
</style>
</defs>
<g>
<polygon class="cls-2" points="151.67 73.23 168.02 73.23 168.02 121.29 179.52 121.29 179.52 73.23 195.87 73.23 195.87 62.89 151.67 62.89 151.67 73.23"/>
<path class="cls-2" d="M207.29,61.64c-1.75,0-3.28.62-4.56,1.85-1.28,1.23-1.94,2.77-1.94,4.57,0,1.7.65,3.19,1.93,4.45,1.28,1.25,2.81,1.89,4.56,1.89s3.19-.64,4.45-1.89,1.89-2.75,1.89-4.45c0-1.8-.62-3.33-1.85-4.56s-2.74-1.85-4.48-1.85Z"/>
<rect class="cls-2" x="201.71" y="79.4" width="11.17" height="41.89"/>
<path class="cls-2" d="M243.46,62.89h-20.53v58.4h20.53c8.85,0,15.88-2.64,20.9-7.85,5.01-5.21,7.56-12.39,7.56-21.35s-2.54-16.21-7.56-21.39c-5.02-5.18-12.05-7.81-20.9-7.81ZM234.43,73.23h8.62c5.72,0,10.04,1.66,12.86,4.93,2.83,3.29,4.26,7.86,4.26,13.59s-1.44,10.49-4.27,13.97c-2.82,3.46-7.14,5.22-12.86,5.22h-8.62v-37.72Z"/>
<path class="cls-2" d="M318.75,95.24c-1.9-2.31-4.16-3.97-6.7-4.93v-.1c5.32-2.58,8.01-6.81,8.01-12.57,0-4.47-1.48-8.09-4.39-10.75-2.91-2.65-7.2-4-12.75-4h-24.08v58.4h23.92c5.88,0,10.56-1.44,13.9-4.28,3.36-2.85,5.06-6.9,5.06-12.04,0-4.07-1-7.34-2.96-9.73ZM290.08,86.58v-14.35h11.34c2.16,0,3.91.64,5.2,1.9,1.28,1.26,1.93,3.02,1.93,5.24s-.64,4-1.9,5.28c-1.26,1.28-3.07,1.93-5.4,1.93h-11.18ZM309.96,104.14c0,2.33-.71,4.23-2.1,5.65-1.39,1.42-3.45,2.14-6.1,2.14h-11.67v-16h11.67c2.54,0,4.57.77,6.02,2.3,1.45,1.53,2.19,3.52,2.19,5.9Z"/>
</g>
<g>
<polygon class="cls-1" points="84.27 33.71 33.71 62.9 33.71 121.27 84.27 150.46 134.82 121.27 134.82 62.9 84.27 33.71"/>
<polygon class="cls-3" points="67.41 121.27 67.41 82.36 50.56 92.09 50.56 72.63 84.27 53.17 101.12 62.9 84.27 72.63 84.27 131 67.41 121.27"/>
<polygon class="cls-3" points="101.12 121.27 101.12 82.36 117.97 72.63 117.97 111.54 101.12 121.27"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -0,0 +1,16 @@
<svg width="2502" height="500" viewBox="0 0 2502 500" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1731.18 88.8069C1803.56 88.8069 1849.96 145.403 1834.66 233.595C1818.86 321.787 1752.09 380.412 1680.21 380.412C1635.85 380.412 1607.81 358.487 1594.55 335.547L1574.21 451.922C1571.85 465.385 1564.82 477.585 1554.36 486.379C1543.9 495.172 1530.67 499.995 1517 500H1499.12C1498.48 500.001 1497.86 499.862 1497.28 499.594C1496.7 499.326 1496.19 498.935 1495.78 498.448C1495.38 497.962 1495.08 497.391 1494.91 496.778C1494.75 496.164 1494.72 495.521 1494.83 494.895L1564.88 97.0018C1565.05 95.9919 1565.58 95.0764 1566.37 94.4178C1567.15 93.7592 1568.14 93.4 1569.17 93.4041H1632.21C1632.84 93.403 1633.47 93.5415 1634.04 93.8097C1634.62 94.0779 1635.13 94.4693 1635.54 94.9563C1635.95 95.4432 1636.24 96.0138 1636.4 96.6276C1636.57 97.2414 1636.59 97.8836 1636.48 98.5086L1630.24 134.179C1642.94 119.955 1658.49 108.564 1675.88 100.747C1693.27 92.9293 1712.11 88.8612 1731.18 88.8069V88.8069ZM1701.61 151.522C1663.37 151.522 1621.66 181.089 1612.43 234.548C1602.75 288.084 1633.33 317.574 1672.07 317.574C1710.82 317.574 1752.12 286.977 1761.8 233.456C1770.95 180.058 1740.4 151.522 1701.62 151.522H1701.61Z" fill="#2F2D32"/>
<path d="M1972.4 0H1909.25C1908.26 0.00280712 1907.3 0.353853 1906.54 0.991803C1905.78 1.62975 1905.27 2.51404 1905.1 3.49016L1840.34 370.203C1840.23 370.84 1840.25 371.494 1840.42 372.119C1840.59 372.744 1840.89 373.325 1841.31 373.82C1841.72 374.316 1842.24 374.714 1842.83 374.987C1843.42 375.26 1844.06 375.401 1844.7 375.4H1907.85C1908.84 375.401 1909.8 375.053 1910.56 374.417C1911.32 373.782 1911.83 372.9 1912 371.925L1976.76 5.21218C1976.87 4.57417 1976.85 3.91938 1976.68 3.29367C1976.51 2.66796 1976.21 2.08646 1975.79 1.58992C1975.38 1.09337 1974.86 0.693775 1974.27 0.419132C1973.68 0.144489 1973.04 0.00143844 1972.4 0V0Z" fill="#2F2D32"/>
<path d="M2258.34 92.6353H2195.87C2194.83 92.6369 2193.82 93.0042 2193.02 93.673C2192.23 94.3418 2191.69 95.2696 2191.5 96.2945L2164.6 248.309C2156.91 293.742 2127.34 318.235 2089.06 318.235C2050.78 318.235 2030.36 293.742 2038.01 248.309L2064.66 97.8628C2064.77 97.2228 2064.74 96.566 2064.57 95.9384C2064.41 95.3109 2064.1 94.7277 2063.69 94.2297C2063.27 93.7318 2062.75 93.331 2062.16 93.0556C2061.57 92.7802 2060.93 92.6367 2060.28 92.6353H1997.82C1996.79 92.6344 1995.79 92.9996 1994.99 93.6662C1994.2 94.3329 1993.67 95.2583 1993.49 96.2792L1965.03 258.518C1954.64 317.051 1974.76 355.827 2013.75 371.325L2014.05 371.464L2014.88 371.756C2018.2 373.024 2021.58 374.112 2025.02 375.015C2050.41 382.242 2091.14 386.424 2145.75 354.382L2143.03 370.234C2142.92 370.868 2142.95 371.518 2143.12 372.139C2143.28 372.761 2143.58 373.337 2144 373.83C2144.41 374.322 2144.93 374.717 2145.51 374.989C2146.1 375.26 2146.73 375.4 2147.38 375.4H2209.88C2210.92 375.399 2211.92 375.034 2212.72 374.368C2213.52 373.702 2214.06 372.778 2214.24 371.756L2262.69 97.8321C2262.8 97.1961 2262.77 96.5433 2262.61 95.9194C2262.44 95.2956 2262.14 94.7158 2261.72 94.2206C2261.31 93.7255 2260.79 93.327 2260.21 93.0532C2259.62 92.7793 2258.99 92.6367 2258.34 92.6353V92.6353Z" fill="#2F2D32"/>
<path d="M2393.84 88.0381C2325.44 88.0381 2278.99 123.263 2278.99 173.293C2278.99 265.16 2419.35 250.861 2419.35 296.802C2419.35 316.79 2397.41 325.892 2371.88 325.892C2343.64 325.892 2326.62 311.516 2326.3 290.36C2326.27 289.212 2325.8 288.121 2324.98 287.321C2324.15 286.521 2323.05 286.077 2321.9 286.085H2260.98C2259.89 286.078 2258.84 286.472 2258.02 287.192C2257.21 287.913 2256.68 288.909 2256.56 289.991C2251.27 343.035 2300.51 379.997 2366.78 379.997C2436.2 379.997 2488.24 348.355 2488.24 294.757C2488.24 206.965 2348.9 218.712 2348.9 171.248C2348.9 153.382 2366.26 142.143 2390.75 142.143C2418.99 142.143 2435.11 155.981 2435.34 177.137C2435.36 178.293 2435.83 179.394 2436.66 180.202C2437.48 181.011 2438.59 181.462 2439.75 181.458H2497.41C2498.53 181.464 2499.62 181.042 2500.44 180.276C2501.27 179.511 2501.77 178.46 2501.85 177.337C2504.91 124.908 2461.03 88.0381 2393.84 88.0381Z" fill="#2F2D32"/>
<path d="M539.071 126.891H500.264V96.7558H539.071V0H575.325V96.7558H651.847V126.891H575.325V299.969C575.325 334.179 587.056 344.895 619.221 344.895H651.847V375.538H613.609C565.101 375.538 539.071 355.627 539.071 299.969V126.891Z" fill="#2F2D32"/>
<path d="M688.609 96.7559H724.356V375.538H688.609V96.7559Z" fill="#2F2D32"/>
<path d="M1170.39 216.236C1170.39 154.459 1138.22 122.801 1088.7 122.801C1038.15 122.801 1002.4 156.488 1002.4 224.477V375.615H967.174V216.236C967.174 154.459 934.502 122.801 884.979 122.801C833.918 122.801 798.694 156.488 798.694 224.4V375.538H762.947V96.7559H798.694V144.757C816.56 109.517 851.784 91.6514 891.098 91.6514C937.561 91.6514 977.383 113.607 994.234 160.071C1009.61 114.622 1050.4 91.6514 1094.82 91.6514C1156.59 91.6514 1205.61 130.458 1205.61 212.146V375.538H1170.39V216.236Z" fill="#2F2D32"/>
<path d="M1370.88 379.612C1291.74 379.612 1234.04 324.477 1234.04 236.147C1234.04 147.309 1290.71 92.6814 1370.88 92.6814C1452.58 92.6814 1502.61 150.876 1502.61 221.833C1502.81 231.208 1502.47 240.587 1501.6 249.923H1270.31C1273.38 315.267 1318.8 349.477 1370.88 349.477C1418.37 349.477 1450.53 324.462 1460.74 287.192H1498.52C1485.76 339.791 1440.83 379.612 1370.88 379.612ZM1270.31 220.833H1466.36C1467.89 155.981 1420.92 123.309 1369.35 123.309C1318.8 123.309 1274.38 155.981 1270.31 220.833Z" fill="#2F2D32"/>
<path d="M684.288 37.0849L690.607 0H725.97L719.651 37.0849H684.288Z" fill="#2F2D32"/>
<path d="M290.749 234.21C290.748 213.232 286.199 192.505 277.416 173.455C268.633 154.405 255.824 137.486 239.873 123.862C238.212 123.339 236.536 122.827 234.845 122.325C224.342 125.132 214.289 129.413 204.987 135.04C222.098 145.313 236.259 159.841 246.09 177.21C255.921 194.579 261.088 214.197 261.088 234.156C261.088 254.114 255.921 273.733 246.09 291.102C236.259 308.471 222.098 322.999 204.987 333.272C214.287 338.9 224.34 343.176 234.845 345.972C236.536 345.526 238.212 345.034 239.873 344.511C255.818 330.892 268.622 313.98 277.405 294.939C286.188 275.897 290.74 255.179 290.749 234.21Z" fill="#F2DBF3"/>
<path d="M29.6033 234.21C29.6373 209.607 37.4958 185.652 52.0422 165.81C66.5887 145.967 87.0692 131.266 110.522 123.831C129.056 107.91 151.31 96.9259 175.22 91.8973C154.055 87.4625 132.167 87.8046 111.151 92.8985C90.1351 97.9924 70.5197 107.71 53.7339 121.343C36.9481 134.976 23.4145 152.182 14.119 171.707C4.82343 191.232 0 212.585 0 234.21C0 255.835 4.82343 277.187 14.119 296.712C23.4145 316.237 36.9481 333.443 53.7339 347.076C70.5197 360.71 90.1351 370.427 111.151 375.521C132.167 380.615 154.055 380.957 175.22 376.522C151.351 371.48 129.14 360.496 110.645 344.588C87.168 337.177 66.6592 322.486 52.0889 302.641C37.5186 282.796 29.6432 258.829 29.6033 234.21V234.21Z" fill="#F2DBF3"/>
<path d="M350.496 234.21C350.495 213.223 345.941 192.487 337.15 173.431C328.359 154.375 315.539 137.453 299.574 123.831C278.596 117.228 256.173 116.726 234.921 122.386C259.562 128.955 281.343 143.478 296.88 163.7C312.417 183.921 320.84 208.708 320.84 234.21C320.84 259.711 312.417 284.498 296.88 304.719C281.343 324.941 259.562 339.464 234.921 346.033C256.171 351.714 278.6 351.213 299.574 344.588C315.541 330.968 328.363 314.046 337.154 294.99C345.946 275.933 350.498 255.196 350.496 234.21V234.21Z" fill="#EA9FCC"/>
<path d="M170.192 344.588C146.723 337.181 126.226 322.487 111.676 302.638C97.1264 282.79 89.282 258.82 89.282 234.21C89.282 209.599 97.1264 185.63 111.676 165.781C126.226 145.932 146.723 131.238 170.192 123.831C188.713 107.917 210.95 96.9332 234.844 91.8973C213.679 87.4625 191.792 87.8046 170.775 92.8985C149.759 97.9924 130.144 107.71 113.358 121.343C96.5722 134.976 83.0386 152.182 73.7431 171.707C64.4475 191.232 59.6241 212.585 59.6241 234.21C59.6241 255.835 64.4475 277.187 73.7431 296.712C83.0386 316.237 96.5722 333.443 113.358 347.076C130.144 360.71 149.759 370.427 170.775 375.521C191.792 380.615 213.679 380.957 234.844 376.522C210.948 371.493 188.71 360.508 170.192 344.588V344.588Z" fill="#EA9FCC"/>
<path d="M264.688 88.8069C235.93 88.8069 207.818 97.3346 183.907 113.312C159.996 129.289 141.359 151.998 130.354 178.566C119.349 205.135 116.469 234.371 122.08 262.576C127.69 290.782 141.538 316.69 161.873 337.025C182.208 357.36 208.116 371.208 236.321 376.819C264.526 382.429 293.762 379.55 320.331 368.544C346.899 357.539 369.608 338.903 385.585 314.991C401.562 291.08 410.09 262.968 410.09 234.21C410.045 195.66 394.711 158.702 367.453 131.444C340.194 104.185 303.237 88.8516 264.688 88.8069V88.8069ZM380.416 234.21C380.419 257.103 373.633 279.483 360.916 298.52C348.199 317.556 330.122 332.394 308.972 341.156C287.823 349.918 264.549 352.212 242.096 347.746C219.642 343.28 199.017 332.257 182.829 316.069C166.641 299.881 155.618 279.255 151.152 256.802C146.687 234.348 148.98 211.075 157.742 189.925C166.505 168.775 181.342 150.698 200.378 137.981C219.415 125.264 241.794 118.478 264.688 118.481C295.369 118.518 324.784 130.722 346.479 152.418C368.175 174.113 380.379 203.528 380.416 234.21V234.21Z" fill="#FF244E"/>
</svg>

After

Width:  |  Height:  |  Size: 8.9 KiB

View File

@@ -0,0 +1,49 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from superset.db_engine_specs.base import DatabaseCategory
from superset.db_engine_specs.mysql import MySQLEngineSpec
class DoltDBEngineSpec(MySQLEngineSpec):
"""
Engine spec for DoltDB.
DoltDB is a SQL database with Git-like version control for data and schema.
It is fully MySQL-compatible.
"""
engine = "doltdb"
engine_name = "DoltDB"
metadata = {
"description": (
"DoltDB is a SQL database with Git-like version control for data "
"and schema. It is fully MySQL-compatible."
),
"logo": "doltdb.png",
"homepage_url": "https://www.dolthub.com/",
"categories": [
DatabaseCategory.TRADITIONAL_RDBMS,
DatabaseCategory.OPEN_SOURCE,
],
"pypi_packages": ["mysqlclient"],
"connection_string": "mysql://{username}:{password}@{host}:{port}/{database}",
"default_port": 3306,
"notes": (
"DoltDB uses the MySQL wire protocol. Connect using any MySQL driver."
),
}

View File

@@ -57,7 +57,7 @@ class MssqlEngineSpec(BaseEngineSpec):
"description": (
"Microsoft SQL Server is a relational database management system."
),
"logo": "msql.png",
"logo": "mssql-server.png",
"homepage_url": "https://www.microsoft.com/en-us/sql-server",
"categories": [
DatabaseCategory.TRADITIONAL_RDBMS,

View File

@@ -0,0 +1,53 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from superset.db_engine_specs.base import DatabaseCategory
from superset.db_engine_specs.postgres import PostgresBaseEngineSpec
class PostGISEngineSpec(PostgresBaseEngineSpec):
"""
Engine spec for PostGIS.
PostGIS is a spatial database extender for PostgreSQL, adding support for
geographic objects and location queries.
"""
engine = "postgis"
engine_name = "PostGIS"
default_driver = "psycopg2"
metadata = {
"description": (
"PostGIS is a spatial database extender for PostgreSQL, adding "
"support for geographic objects and location queries."
),
"logo": "postgis.svg",
"homepage_url": "https://postgis.net/",
"categories": [
DatabaseCategory.TRADITIONAL_RDBMS,
DatabaseCategory.OPEN_SOURCE,
],
"pypi_packages": ["psycopg2"],
"connection_string": (
"postgresql://{username}:{password}@{host}:{port}/{database}"
),
"default_port": 5432,
"notes": (
"PostGIS extends PostgreSQL with geospatial capabilities. "
"Uses the standard PostgreSQL driver."
),
}

View File

@@ -0,0 +1,62 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from superset.constants import TimeGrain
from superset.db_engine_specs.base import BaseEngineSpec, DatabaseCategory
class QuestDBEngineSpec(BaseEngineSpec):
"""
Engine spec for QuestDB.
QuestDB is a high-performance, open-source time-series database optimized
for fast ingest and SQL queries.
"""
engine = "questdb"
engine_name = "QuestDB"
default_driver = "questdb"
metadata = {
"description": (
"QuestDB is a high-performance, open-source time-series database "
"optimized for fast ingest and SQL queries."
),
"logo": "questdb.png",
"homepage_url": "https://questdb.io/",
"categories": [
DatabaseCategory.ANALYTICAL_DATABASES,
DatabaseCategory.OPEN_SOURCE,
],
"pypi_packages": ["questdb-connect"],
"connection_string": "questdb://{username}:{password}@{host}:{port}/{database}",
"default_port": 8812,
"notes": (
"QuestDB is optimized for time-series data. Install questdb-connect "
"for SQLAlchemy support."
),
}
_time_grain_expressions = {
None: "{col}",
TimeGrain.SECOND: "timestamp_floor('s', {col})",
TimeGrain.MINUTE: "timestamp_floor('m', {col})",
TimeGrain.HOUR: "timestamp_floor('h', {col})",
TimeGrain.DAY: "timestamp_floor('d', {col})",
TimeGrain.WEEK: "timestamp_floor('w', {col})",
TimeGrain.MONTH: "timestamp_floor('M', {col})",
TimeGrain.YEAR: "timestamp_floor('y', {col})",
}

View File

@@ -0,0 +1,74 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from superset.db_engine_specs.base import DatabaseCategory
from superset.db_engine_specs.mysql import MySQLEngineSpec
class TiDBEngineSpec(MySQLEngineSpec):
"""
Engine spec for TiDB.
TiDB is an open-source, cloud-native, distributed SQL database designed for
hybrid transactional and analytical processing (HTAP) workloads. It is
MySQL-compatible.
"""
engine = "tidb"
engine_name = "TiDB"
metadata = {
"description": (
"TiDB is an open-source, cloud-native, distributed SQL database "
"designed for hybrid transactional and analytical processing (HTAP) "
"workloads. It is MySQL-compatible."
),
"logo": "tidb.svg",
"homepage_url": "https://www.pingcap.com/tidb/",
"categories": [
DatabaseCategory.TRADITIONAL_RDBMS,
DatabaseCategory.OPEN_SOURCE,
],
"pypi_packages": ["mysqlclient", "sqlalchemy-tidb"],
"connection_string": "mysql://{username}:{password}@{host}:{port}/{database}",
"default_port": 4000,
"drivers": [
{
"name": "mysqlclient",
"pypi_package": "mysqlclient",
"connection_string": (
"mysql://{username}:{password}@{host}:{port}/{database}"
),
"is_recommended": True,
"notes": (
"Standard MySQL driver, works with TiDB's MySQL compatibility."
),
},
{
"name": "tidb",
"pypi_package": "sqlalchemy-tidb",
"connection_string": (
"tidb://{username}:{password}@{host}:{port}/{database}"
),
"is_recommended": False,
"notes": "Native TiDB dialect with TiDB-specific optimizations.",
},
],
"notes": (
"TiDB is MySQL-compatible. Use the standard MySQL driver or the "
"native sqlalchemy-tidb dialect."
),
}

View File

@@ -0,0 +1,63 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from superset.constants import TimeGrain
from superset.db_engine_specs.base import BaseEngineSpec, DatabaseCategory
class TimeplusEngineSpec(BaseEngineSpec):
"""
Engine spec for Timeplus.
Timeplus is a streaming-first analytics platform that provides real-time
data processing with SQL.
"""
engine = "timeplus"
engine_name = "Timeplus"
default_driver = "timeplus"
metadata = {
"description": (
"Timeplus is a streaming-first analytics platform that provides "
"real-time data processing with SQL."
),
"logo": "timeplus.svg",
"homepage_url": "https://www.timeplus.com/",
"categories": [
DatabaseCategory.ANALYTICAL_DATABASES,
DatabaseCategory.OPEN_SOURCE,
],
"pypi_packages": ["timeplus-connect"],
"connection_string": "timeplus://{username}:{password}@{host}:{port}",
"default_port": 8123,
"notes": (
"Timeplus provides real-time streaming SQL analytics. Install "
"timeplus-connect for SQLAlchemy and Superset support."
),
}
_time_grain_expressions = {
None: "{col}",
TimeGrain.SECOND: "date_trunc('second', {col})",
TimeGrain.MINUTE: "date_trunc('minute', {col})",
TimeGrain.HOUR: "date_trunc('hour', {col})",
TimeGrain.DAY: "date_trunc('day', {col})",
TimeGrain.WEEK: "date_trunc('week', {col})",
TimeGrain.MONTH: "date_trunc('month', {col})",
TimeGrain.QUARTER: "date_trunc('quarter', {col})",
TimeGrain.YEAR: "date_trunc('year', {col})",
}