-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DSIP-11][Feature][python] Use the pydolphinscheduler to dynamically generate workflows from the configuration file #10995
Comments
Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
|
Hi @jieguangzhou, this looks good to me. For some users who are not willing to spend some time picking up python but do have tons of workflows to generate, yaml is a better approach than dragging and connecting tasks through the UI. Just curious, why do you want this feature? Are you a |
If we can use YAML to manage workflows, it might make it easier for engineers to manage workflows and do version management. Git can be used to manage and share workflows. |
Good idea, it's better to add some design details. |
It's OK for me to define a DSL to create a workflow, some geeks may like this way, but this can not work well in big workflow. |
Can we parse the data directly and store it in the database? or do we have to do it in other ways? |
Ok, I will add details here in the future |
Thank you for your suggestions. I will think again about how to handle the large workflow scenario, and if not, let the user use the original way to support the large workflow for the time being |
Hi @jieguangzhou I add |
BTW, I think it is a good adding for python api |
Search before asking
Description
Dynamically generate workflows from YAML configuration files, aka workflows-as-code.
Now we can use python-dolphinscheduler to build workflow easily. Workflows-as-code would be easier to use if we supported configuration file definition workflows. It will make the workflow clearer, shareable, and reviewable.
Then we can upload our project as a git repository. This can help us do richer operations, such as CICD, etc
We can create a workload by defining the following fields, all the field definitions are derived from PydolphinScheduler.
A YAML file defines a workflow :
Here is a simple example to show how to use YAML to manage workflows(A YAML file defines a workflow):
Alternatively, we can use some of the methods native to YAML files for easier definition,for example, using
&
and*
:A richer approach is to combine the DS features, and we can add some magic methods to make it easier to use. For example, we can read environment variables
$Env{xxxx}
, and we can read the contents of files$File{xxxx}
:Once we have defined the configuration file, we can use the CLI of the PydolphinScheduler to load the workflow
Use case
No response
Related issues
No response
Are you willing to submit a PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: