Skip to content
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

cmd: Add Support for Piping Input to Start a DAG #753

Open
yohamta opened this issue Dec 28, 2024 · 1 comment
Open

cmd: Add Support for Piping Input to Start a DAG #753

yohamta opened this issue Dec 28, 2024 · 1 comment
Assignees
Labels
enhancement New feature to be implemented

Comments

@yohamta
Copy link
Collaborator

yohamta commented Dec 28, 2024

Enable Dagu to accept input via standard input (stdin) when starting a workflow. This feature will enhance usability by allowing users to pass parameters dynamically using shell pipelines.

Example Usage:

echo "parameter" | dagu start workflow_name  
@yohamta yohamta added the enhancement New feature to be implemented label Dec 28, 2024
@yohamta yohamta changed the title Add Support for Piping Input to Start a Workflow Add Support for Piping Input to Start a DAG Dec 28, 2024
@ghansham
Copy link

ghansham commented Dec 29, 2024

Just a quick solution, calling curl post request can do the trick. And the better part is it can work from remote system as well. Refer to:

https://dagu.readthedocs.io/en/latest/rest.html#submit-dag-action-post-api-v1-dags-name

For example

curl -H 'Content-Type: application/json' -d '{"Action": "start", "params": "parameter_values_string"}' -X POST http://IP:port/api/v1/dags/dagname

where params_string can be either passed as command line argument to the curl wrapper shell script.

We can have a generalized script with dagname, params_string, action and IP address in it.
Another advantage is we need to specify only dagname. Not the full path.

@yohamta yohamta changed the title Add Support for Piping Input to Start a DAG cmd: Add Support for Piping Input to Start a DAG Dec 29, 2024
@yohamta yohamta self-assigned this Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature to be implemented
Projects
None yet
Development

No branches or pull requests

2 participants