![]() ![]() It evaluates aĬondition and short-circuits the workflow if the condition is False. The ShortCircuitOperator is derived from the PythonOperator. Workflow “short-circuits” and downstream tasks are skipped. ShortCircuitOperator ¶Īllows a workflow to continue only if a condition is met. execute ( self, context ) ¶ class _operator. Skipped states propagates where all directly upstream tasks are Will invariably lead to block tasks that depend on their past successes. Note that using tasks with depends_on_past=True downstream fromīranchPythonOperator is logically unsound as skipped status The skipped states are propagatedĭownstream to allow for the DAG state to fill up and the DAG run’s state Or directly downstream tasks are marked with a state of skipped so that Should point to a task directly downstream from. It derives the PythonOperator and expects a Python function that returnsĪ single task_id or list of task_ids to follow. BranchPythonOperator ¶īases: _operator.PythonOperator, Īllows a workflow to “branch” or follow a path following the execution Template_fields = ¶ ui_color = #ffefeb ¶ shallow_copy_attrs = ¶ execute ( self, context ) ¶ execute_callable ( self ) ¶ class _operator. Processing templated fields, for examples Templates_exts ( list ) – a list of file extensions to resolve while In your callable’s context after the template has been applied. _init_ and execute takes place and are made available Will get templated by the Airflow engine sometime between Templates_dict ( dict ) – a dictionary where the values are templates that For this to work, you need to define **kwargs in your Kwargs correspond exactly to what you can use in your jinja Keyword arguments that can be used in your function. Provide_context ( bool) – if set to true, Airflow will pass a set of Op_args ( list ( templated )) – a list of positional arguments that will get unpacked when Op_kwargs ( dict ( templated )) – a dictionary of keyword arguments that will get unpacked Python_callable ( python callable) – A reference to an object that is callable For more information on how to use this operator, take a look at the guide:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |