![]() ![]() Turn on the toggle on the left of each of the DAG and then trigger the DAG.Ĭlick on the DAG and open the graph view and you will see something like this. Now, refresh the user interface and you will see your DAG in the list. # define the first taskīash_command='echo Getting Live Cricket Scores!!!', Pass the bash command that you want to run and finally the DAG object to which you want to link this task.įinally, create the pipeline by adding the “>” operator between the tasks. We will pass the task_id which is a unique identifier of the task and you will see this name on the nodes of Graph View of your DAG. Here both the commands are terminal-based so we will use the BashOperator. Now, while defining the task first we need to choose the right operator for the task. get_cricket_scores: In the second task, we will print the live cricket scores using the library that we have installed.print: In the first task, we will print the “Getting Live Cricket Scores!!!” on the terminal using the echo command. ![]() # 'sla_miss_callback': yet_another_function, # 'on_success_callback': some_other_function, # 'execution_timeout': timedelta(seconds=300), # You can override them on a per-task basis during operator initialization
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |