* feat(spark): add Apache Spark database driver Spark Thrift Server speaks the HiveServer2 protocol, so the Spark driver reuses the hive-jdbc agent runtime. Registers spark (agentKey=spark, defaultPort=10015) across the manifest, DatabaseType enum, agent catalog, SQL dialects, connection dialog, and a SparkAgent built on AbstractJdbcAgent. * feat(spark): add catalog support and official logo SparkAgent now supports Spark 3.4+ multi-catalog (Paimon, Lance, Iceberg) via catalog=<name> in url_params, mirroring the StarRocks catalog flow: - afterConnect switches to the configured catalog via USE <catalog> - listDatabases returns the catalog name when SHOW DATABASES is empty (catalogs like Lance expose tables at the catalog root with no databases) - listTables uses SHOW TABLES IN <catalog>[.<schema>] uniformly, working for both catalog-root tables (Lance) and catalog.schema tables (Paimon) - setSchemaSQL qualifies USE with the catalog to prevent resetting to spark_catalog on schema switches - buildJdbcUrl omits database from the URL path Also replaces the placeholder lightning icon with the official Apache Spark logo (spark-logo.png from spark.apache.org). * fix(spark): use catalog-qualified DESCRIBE for column retrieval getColumnsFromDescribe used USE <schema> + DESCRIBE <table>, which generated USE `catalog`.`catalog` when the sidebar passed the catalog name as the schema (Lance case where the catalog is the only node). This failed and fell back to JDBC metadata which also returned nothing, resulting in an empty DDL (CREATE TABLE ... ()). Now uses DESCRIBE `catalog`.`table` directly when a catalog is configured, bypassing USE entirely. Also fixes setSchemaSQL to treat schema == catalog as catalog-only (no .schema suffix). * fix(ci): add spark to metadata coverage matrix and BRIDGE_REQUIRED_TYPES - agents/metadata-constraint-coverage.tsv: register spark as intentional-fallback (SHOW TABLES/SHOW DATABASES, like Hive/TDengine) - packages/node-core/src/diagnostics.ts: add spark to BRIDGE_REQUIRED_TYPES (mcpMode=bridge, matches manifest) * fix(ci): add spark to DBX_CONNECTION_TYPE_DESCRIPTION in mcp-server The driver-manifest test asserts every manifest dbType appears in the MCP server's connection type description string. |
||
|---|---|---|
| .. | ||
| src | ||
| tests | ||
| README.md | ||
| package.json | ||
| tsconfig.json | ||
| vitest.config.ts | ||
README.md
DBX Node Core
Shared Node.js runtime utilities for DBX CLI and DBX MCP Server.
This package reads DBX Desktop connection storage, redacts connection summaries, builds schema context, applies SQL safety rules, and executes supported direct database queries.
Supported Runtime
Requires Node.js 22.13.0 or newer.
Direct Query Support
Direct execution currently supports:
- PostgreSQL and Redshift
- MySQL-compatible databases, including MySQL, Doris, and StarRocks
- SQLite
Other DBX connection types can be routed through DBX Desktop bridge integrations used by the CLI and MCP server.
Public Modules
import { createBackend, loadConnections, getDbxDiagnostics, evaluateSqlSafety, buildSchemaContext } from "@dbx-app/node-core";
The package is intended as a shared implementation layer for official DBX Node packages. Applications should prefer @dbx-app/cli for terminal workflows and @dbx-app/mcp-server for MCP clients.