You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "eye-gu (via GitHub)" <gi...@apache.org> on 2026/06/24 05:16:35 UTC

[I] [Improvement][datasource] Enable users to customize datasources [dolphinscheduler]

eye-gu opened a new issue, #18377:
URL: https://github.com/apache/dolphinscheduler/issues/18377

   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
   
   
   ### Description
   
   ## Background
   
   DolphinScheduler's datasource layer is already plugin-based via SPI. However, datasource plugins still cannot be extended by users with their own custom types. The root cause is that the DbType enum is hardwired into multiple layers of the type system, making it physically impossible for an external plugin to register a type that doesn't exist in the built-in enum.
   
   1. The DbType enum is hardcoded throughout the SPI and storage layers
   
   The DataSourceProcessor.getDbType() method returns DbType (a compile-time enum). An external plugin jar cannot return a DbType constant that doesn't exist in dolphinscheduler-spi, so it can only override existing types, never add new ones. 
   
   2. UI datasource type lists are hardcoded in the frontend
   
   The "create datasource" dialog and the task-node datasource selector both use hardcoded type arrays. Even if a custom plugin is deployed, its type never appears in the UI. The lists should be fetched from a backend API (e.g. GET /datasources/types) that returns all registered type names. For custom/unknown types, the generic JDBC form (host/port/user/password/database) is sufficient for the vast majority of cases.
   
   3. t_ds_datasource.type column needs to change from numeric code to string name
   
   Currently tinyint storing the enum's integer code. It should become varchar storing the type name string (e.g. "MYSQL"). A migration is needed to translate existing integer codes to name strings.The task definition / task instance tables already store the datasource type as a string name inside the task_params JSON (e.g. "type":"MYSQL"), so no change is needed there.
   
   ## Proposed Solution
   
   Relax DbType to a built-in constant collection (keep the enum, remove the integer code). Change all type-lookup and storage paths to use String type names — aligned with the existing task plugin design (TaskDefinition.taskType is already String).
   Add a GET /datasources/types endpoint returning all registered type names. Frontend fetches this for both the datasource dialog and task-node dropdowns, falling back to a generic JDBC form for non-builtin types.
   Change t_ds_datasource.type to varchar(64)
   
   ### Are you willing to submit a PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement][datasource] Enable users to customize datasources [dolphinscheduler]

Posted by "eye-gu (via GitHub)" <gi...@apache.org>.
eye-gu commented on issue #18377:
URL: https://github.com/apache/dolphinscheduler/issues/18377#issuecomment-5091852363

   @SbloodyS 
   The problem: A user who needs to connect to a database type DolphinScheduler doesn't bundle (a proprietary internal system, a DB currently not supported, or a DB required for compliance, like KingbaseES) has only bad options today:
   
   Change ds code and rebuild or
   Work around it with a Shell node, writing the connection/query code by hand — losing the datasource management UI, connection pooling, usage tracking, and everything else the datasource feature provides.
   There's no clean path to just "add a new datasource type."
   
   Contrast with task plugins: A user can already build a custom task plugin, drop the jar into the plugins folder, restart, and the new task type appears in the UI and just works. It's one of DolphinScheduler's best features. The goal of this issue is to bring datasources to that same bar: let a user implement their own datasource type and use it like any built-in one.
   
   Hope this clears up the intent.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement][datasource] Enable users to customize datasources [dolphinscheduler]

Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS commented on issue #18377:
URL: https://github.com/apache/dolphinscheduler/issues/18377#issuecomment-5098811753

   According to your description, I understand that this modification is very huge, including `dolphinscheduler-api`, `dolphinscheduler-ui`, `dolphinscheduler-task-plugin`, `dolphinscheduler-datasource-plugin`, `dolphinscheduler-dao`, `dolphinscheduler-common`. Please create and `DSIP` with a detailed design, which is too rough to land.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement][datasource] Enable users to customize datasources [dolphinscheduler]

Posted by "eye-gu (via GitHub)" <gi...@apache.org>.
eye-gu commented on issue #18377:
URL: https://github.com/apache/dolphinscheduler/issues/18377#issuecomment-5091396988

   @SbloodyS Does it still have any doubts?


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement][datasource] Enable users to customize datasources [dolphinscheduler]

Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS commented on issue #18377:
URL: https://github.com/apache/dolphinscheduler/issues/18377#issuecomment-4795204264

   Data source will be used not only in data source plugins, but also in other places, such as task plugins, etc. It is not a good way to move to data source SPI.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement][datasource] Enable users to customize datasources [dolphinscheduler]

Posted by "eye-gu (via GitHub)" <gi...@apache.org>.
eye-gu commented on issue #18377:
URL: https://github.com/apache/dolphinscheduler/issues/18377#issuecomment-4788193160

   @SbloodyS The goal is to let users extend datasource types via SPI plugins, the same way task plugins already work today (drop a jar into plugins/task-plugins/, restart, new task type appears). Currently datasource SPI exists, but DataSourceProcessor#getDbType return DbType enum, so an external jar can not register new type.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement][datasource] Enable users to customize datasources [dolphinscheduler]

Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS commented on issue #18377:
URL: https://github.com/apache/dolphinscheduler/issues/18377#issuecomment-4787251046

   I don't quite understand what you really want to do. Add data sources in a low-code way?


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement][datasource] Enable users to customize datasources [dolphinscheduler]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #18377:
URL: https://github.com/apache/dolphinscheduler/issues/18377#issuecomment-5081273804

   This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement][datasource] Enable users to customize datasources [dolphinscheduler]

Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS commented on issue #18377:
URL: https://github.com/apache/dolphinscheduler/issues/18377#issuecomment-5091418221

   I still don't understand what you want to achieve.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement][datasource] Enable users to customize datasources [dolphinscheduler]

Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS closed issue #18377: [Improvement][datasource] Enable users to customize datasources
URL: https://github.com/apache/dolphinscheduler/issues/18377


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Improvement][datasource] Enable users to customize datasources [dolphinscheduler]

Posted by "eye-gu (via GitHub)" <gi...@apache.org>.
eye-gu commented on issue #18377:
URL: https://github.com/apache/dolphinscheduler/issues/18377#issuecomment-4795566884

   The datasource is already SPI, and the purpose of this issue is only to enhance it so that external users can implement their own datasource types. So for the task plugins, there won't be any problem.


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org