This is an automated email from the ASF dual-hosted git repository. rusackas pushed a commit to branch feat/db-engine-docs in repository https://gitbox.apache.org/repos/asf/superset.git
commit c6eae72c3c03a64555418329146cba929bf8050a Author: Evan Rusackas <[email protected]> AuthorDate: Mon Dec 22 12:10:55 2025 -0800 feat(docs): auto-generate README database logos from DATABASE_DOCS The generate-database-docs script now updates the main README.md with database logos between marker comments: - <!-- SUPPORTED_DATABASES_START --> - <!-- SUPPORTED_DATABASES_END --> This ensures the README stays in sync with DATABASE_DOCS in lib.py. Also updated docs links to point to new /docs/databases path. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]> --- README.md | 80 +++++++++++++++++---------------- docs/scripts/generate-database-docs.mjs | 76 +++++++++++++++++++++++++++++++ docs/src/data/databases.json | 2 +- 3 files changed, 118 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index f7d59ee691..c8f52c07a1 100644 --- a/README.md +++ b/README.md @@ -101,51 +101,53 @@ Superset provides: ## Supported Databases -Superset can query data from any SQL-speaking datastore or data engine (Presto, Trino, Athena, [and more](https://superset.apache.org/docs/configuration/databases)) that has a Python DB-API driver and a SQLAlchemy dialect. +Superset can query data from any SQL-speaking datastore or data engine (Presto, Trino, Athena, [and more](https://superset.apache.org/docs/databases)) that has a Python DB-API driver and a SQLAlchemy dialect. Here are some of the major database solutions that are supported: +<!-- SUPPORTED_DATABASES_START --> <p align="center"> - <img src="https://superset.apache.org/img/databases/redshift.png" alt="redshift" border="0" width="200"/> - <img src="https://superset.apache.org/img/databases/google-biquery.png" alt="google-bigquery" border="0" width="200"/> - <img src="https://superset.apache.org/img/databases/snowflake.png" alt="snowflake" border="0" width="200"/> - <img src="https://superset.apache.org/img/databases/trino.png" alt="trino" border="0" width="150" /> - <img src="https://superset.apache.org/img/databases/presto.png" alt="presto" border="0" width="200"/> - <img src="https://superset.apache.org/img/databases/databricks.png" alt="databricks" border="0" width="160" /> - <img src="https://superset.apache.org/img/databases/druid.png" alt="druid" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/firebolt.png" alt="firebolt" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/timescale.png" alt="timescale" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/postgresql.png" alt="postgresql" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/mysql.png" alt="mysql" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/mssql-server.png" alt="mssql-server" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/ibm-db2.svg" alt="db2" border="0" width="220" /> - <img src="https://superset.apache.org/img/databases/sqlite.png" alt="sqlite" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/sybase.png" alt="sybase" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/mariadb.png" alt="mariadb" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/vertica.png" alt="vertica" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/oracle.png" alt="oracle" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/firebird.png" alt="firebird" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/greenplum.png" alt="greenplum" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/clickhouse.png" alt="clickhouse" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/exasol.png" alt="exasol" border="0" width="160" /> - <img src="https://superset.apache.org/img/databases/monet-db.png" alt="monet-db" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/apache-kylin.png" alt="apache-kylin" border="0" width="80"/> - <img src="https://superset.apache.org/img/databases/hologres.png" alt="hologres" border="0" width="80"/> - <img src="https://superset.apache.org/img/databases/netezza.png" alt="netezza" border="0" width="80"/> - <img src="https://superset.apache.org/img/databases/pinot.png" alt="pinot" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/teradata.png" alt="teradata" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/yugabyte.png" alt="yugabyte" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/databend.png" alt="databend" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/starrocks.png" alt="starrocks" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/doris.png" alt="doris" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/oceanbase.svg" alt="oceanbase" border="0" width="220" /> - <img src="https://superset.apache.org/img/databases/sap-hana.png" alt="sap-hana" border="0" width="220" /> - <img src="https://superset.apache.org/img/databases/denodo.png" alt="denodo" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/ydb.svg" alt="ydb" border="0" width="200" /> - <img src="https://superset.apache.org/img/databases/tdengine.png" alt="TDengine" border="0" width="200" /> + <img src="https://superset.apache.org/img/databases/doris.png" alt="apache-doris" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/apache-drill.png" alt="apache-drill" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/druid.png" alt="apache-druid" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/apache-hive.svg" alt="apache-hive" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/apache-impala.png" alt="apache-impala" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/apache-kylin.png" alt="apache-kylin" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/apache-pinot.svg" alt="apache-pinot" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/amazon-athena.jpg" alt="aws-athena" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/redshift.png" alt="aws-redshift" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/clickhouse.png" alt="clickhouse" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/couchbase.svg" alt="couchbase" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/databend.png" alt="databend" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/databricks.png" alt="databricks" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/denodo.png" alt="denodo" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/dremio.png" alt="dremio" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/exasol.png" alt="exasol" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/firebird.png" alt="firebird" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/firebolt.png" alt="firebolt" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/google-big-query.svg" alt="google-bigquery" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/google-sheets.svg" alt="google-sheets" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/netezza.png" alt="ibm-netezza" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/mariadb.png" alt="mariadb" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/msql.png" alt="microsoft-sql-server" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/mysql.jpg" alt="mysql" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/oceanbase.svg" alt="oceanbase" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/oraclelogo.png" alt="oracle" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/postgresql.svg" alt="postgresql" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/presto-og.png" alt="presto" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/sap-hana.jpg" alt="sap-hana" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/snowflake.svg" alt="snowflake" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/sqlite.jpg" alt="sqlite" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/starrocks.png" alt="starrocks" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/tdengine.png" alt="tdengine" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/teradata.png" alt="teradata" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/trino.png" alt="trino" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/vertica.png" alt="vertica" border="0" width="120" height="60" style="object-fit: contain;" /> + <img src="https://superset.apache.org/img/databases/ydb.svg" alt="ydb" border="0" width="120" height="60" style="object-fit: contain;" /> </p> +<!-- SUPPORTED_DATABASES_END --> -**A more comprehensive list of supported databases** along with the configuration instructions can be found [here](https://superset.apache.org/docs/configuration/databases). +**A more comprehensive list of supported databases** along with the configuration instructions can be found [here](https://superset.apache.org/docs/databases). Want to add support for your datastore or data engine? Read more [here](https://superset.apache.org/docs/frequently-asked-questions#does-superset-work-with-insert-database-engine-here) about the technical requirements. diff --git a/docs/scripts/generate-database-docs.mjs b/docs/scripts/generate-database-docs.mjs index acb4461298..83d393e311 100644 --- a/docs/scripts/generate-database-docs.mjs +++ b/docs/scripts/generate-database-docs.mjs @@ -487,6 +487,78 @@ To add or update database documentation, edit the \`DATABASE_DOCS\` dictionary i `; } +const README_PATH = path.join(ROOT_DIR, 'README.md'); +const README_START_MARKER = '<!-- SUPPORTED_DATABASES_START -->'; +const README_END_MARKER = '<!-- SUPPORTED_DATABASES_END -->'; + +/** + * Generate the database logos HTML for README.md + * Only includes databases that have logos defined + */ +function generateReadmeLogos(databases) { + // Get databases with logos, sorted alphabetically + const dbsWithLogos = Object.entries(databases) + .filter(([, db]) => db.documentation?.logo) + .sort(([a], [b]) => a.localeCompare(b)); + + if (dbsWithLogos.length === 0) { + return ''; + } + + // Generate HTML img tags + const logoTags = dbsWithLogos.map(([name, db]) => { + const logo = db.documentation.logo; + const alt = name.toLowerCase().replace(/\s+/g, '-'); + // Use docs site URL for logos + return ` <img src="https://superset.apache.org/img/databases/${logo}" alt="${alt}" border="0" width="120" height="60" style="object-fit: contain;" />`; + }); + + return `<p align="center"> +${logoTags.join('\n')} +</p>`; +} + +/** + * Update the README.md with generated database logos + */ +function updateReadme(databases) { + if (!fs.existsSync(README_PATH)) { + console.log('README.md not found, skipping update'); + return false; + } + + const content = fs.readFileSync(README_PATH, 'utf-8'); + + // Check if markers exist + if (!content.includes(README_START_MARKER) || !content.includes(README_END_MARKER)) { + console.log('README.md missing database markers, skipping update'); + console.log(` Add ${README_START_MARKER} and ${README_END_MARKER} to enable auto-generation`); + return false; + } + + // Generate new logos section + const logosHtml = generateReadmeLogos(databases); + + // Replace content between markers + const pattern = new RegExp( + `${README_START_MARKER}[\\s\\S]*?${README_END_MARKER}`, + 'g' + ); + const newContent = content.replace( + pattern, + `${README_START_MARKER}\n${logosHtml}\n${README_END_MARKER}` + ); + + if (newContent !== content) { + fs.writeFileSync(README_PATH, newContent); + console.log('Updated README.md database logos'); + return true; + } + + console.log('README.md database logos unchanged'); + return false; +} + /** * Load existing database data if available */ @@ -640,6 +712,10 @@ async function main() { ); console.log(` Generated _category_.json`); + // Update README.md database logos + console.log(''); + updateReadme(databases); + console.log(`\nStatistics:`); console.log(` Total databases: ${statistics.totalDatabases}`); console.log(` With documentation: ${statistics.withDocumentation}`); diff --git a/docs/src/data/databases.json b/docs/src/data/databases.json index 15377adb6c..c03695d856 100644 --- a/docs/src/data/databases.json +++ b/docs/src/data/databases.json @@ -1,5 +1,5 @@ { - "generated": "2025-12-22T07:44:12.184Z", + "generated": "2025-12-22T20:10:13.023Z", "statistics": { "totalDatabases": 53, "withDocumentation": 53,
