Is there a way to pass a parameter to:
airflow trigger_dag dag_name {param}
?
I have a script that monitors a directory for files - when a file gets moves into the target directory I want to trigger the dag passing as a parameter the file path.
you can pass it like this:
Then in your dag, you can access this variable using templating as follows:
If this doesn't work, sharing a simple version of your dag might help in getting better answers.
yes you can. Your Dag should have a Dag and a Bask Task like this:
Now on your command line just type the command: