Plugin family for datasources — the configurable DB/warehouse/query-engine connections a user can register (MySQL, PostgreSQL, Hive, Trino, Redshift, Snowflake, …). Used by the SQL-style task plugins, the API for connection testing, and the data-lineage tool.
This directory is a Maven parent POM.
dolphinscheduler-datasource-api— SPI and base types:DataSourceProcessor,AbstractDataSourceProcessor,BaseDataSourceParamDTO,BaseHdfsConnectionParam, and theDataSourcePluginManagerthat loads plugins.dolphinscheduler-datasource-all— uber module bundling every plugin; depended on bymaster,worker,apiso they can use any datasource at runtime.
Relational: -mysql, -postgresql, -oracle, -sqlserver, -db2, -oceanbase, -dameng, -hana, -azure-sql, -vertica.
OLAP / warehouses: -clickhouse, -doris, -starrocks, -redshift, -snowflake, -databend, -dolphindb.
Big-data engines: -hive, -spark, -presto, -trino, -kyuubi, -athena.
Cloud / other: -sagemaker, -k8s, -aliyunserverlessspark, -ssh, -zeppelin.
Two interfaces are both implemented by each plugin:
DataSourceChannelFactory(fromdolphinscheduler-spi, loaded viaPrioritySPIFactory) — createsDataSourceChannels for low-level connection handling.DataSourceProcessor(fromdatasource-api, loaded via standardServiceLoader) — validates + builds connection params, handles the UI-form contract.
Both are wired into plugins with @AutoService(...). Discovery happens in DataSourcePluginManager.
- API: when the user opens the "Create Datasource" dialog, the API asks each
DataSourceProcessorfor its param descriptor and serves it to the UI. - Worker: SQL-family task plugins (
task-sql,task-procedure,task-datax, …) look up the configured datasource by id, askdatasource-apifor a JDBC connection via the channel, run the statement.
- Dual SPI loading is intentional: channels are priority-ordered (multiple providers can coexist); processors are keyed by
DbType(one per type). Don't merge them. DbTypeenum lives indolphinscheduler-spi. Adding a new datasource means: new enum value in spi + new plugin sub-module. Leaving the enum unchanged will causeDataSourcePluginManagerto silently ignore the plugin.- Passwords are encrypted via
PasswordUtilsincommon. Never store or log the plaintext form; always go throughPasswordUtils.encodePassword/decodePassword. - JDBC connection pooling is Druid (not HikariCP). This is different from the metadata DB (
dolphinscheduler-daouses HikariCP). Be careful with which you're tuning. - Hive / Spark / Presto plugins pull massive dep trees — exclusions in their poms are load-bearing. Adding a new version bump here can blow up the classpath.
Each plugin has src/test/java. Most use an embedded H2 or a mocked driver; a few use Testcontainers (e.g. -postgresql, -mysql).
dolphinscheduler-spi— base SPI (DataSourceChannelFactory,DbType).dolphinscheduler-task-plugin— primary consumer (SQL family plugins).dolphinscheduler-api,dolphinscheduler-service— consumers for configuration + validation.dolphinscheduler-common—PasswordUtils.