| |
| |
| <!-- |
| Javascript to render AIRFLOW-XXX and PR references in text |
| as HTML links. |
| |
| Overrides extrahead block from sphinx_rtd_theme |
| https://www.sphinx-doc.org/en/master/templating.html |
| --> |
| |
| |
| <!DOCTYPE html> |
| <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> |
| <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> |
| <head> |
| <meta charset="utf-8"> |
| |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| |
| <title>airflow.models.baseoperator — Airflow Documentation</title> |
| |
| |
| |
| |
| <link rel="shortcut icon" href="../../../../_static/pin_32.png"/> |
| |
| |
| |
| |
| |
| <script type="text/javascript" src="../../../../_static/js/modernizr.min.js"></script> |
| |
| |
| <script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script> |
| <script type="text/javascript" src="../../../../_static/jquery.js"></script> |
| <script type="text/javascript" src="../../../../_static/underscore.js"></script> |
| <script type="text/javascript" src="../../../../_static/doctools.js"></script> |
| <script type="text/javascript" src="../../../../_static/language_data.js"></script> |
| <script type="text/javascript" src="../../../../_static/jira-links.js"></script> |
| |
| <script type="text/javascript" src="../../../../_static/js/theme.js"></script> |
| |
| |
| |
| |
| <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" /> |
| <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" /> |
| <link rel="stylesheet" href="../../../../_static/graphviz.css" type="text/css" /> |
| <link rel="stylesheet" href="../../../../_static/exampleinclude.css" type="text/css" /> |
| <link rel="index" title="Index" href="../../../../genindex.html" /> |
| <link rel="search" title="Search" href="../../../../search.html" /> |
| <link rel="next" title="airflow.models.chart" href="../chart/index.html" /> |
| <link rel="prev" title="airflow.models.base" href="../base/index.html" /> |
| |
| <script> |
| </script> |
| <style> |
| |
| </style> |
| |
| </head> |
| |
| <body class="wy-body-for-nav"> |
| |
| |
| <div class="wy-grid-for-nav"> |
| |
| <nav data-toggle="wy-nav-shift" class="wy-nav-side"> |
| <div class="wy-side-scroll"> |
| <div class="wy-side-nav-search" > |
| |
| |
| |
| <a href="../../../../index.html" class="icon icon-home"> Airflow |
| |
| |
| |
| </a> |
| |
| |
| |
| |
| <div class="version"> |
| 1.10.8 |
| </div> |
| |
| |
| |
| |
| <div role="search"> |
| <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get"> |
| <input type="text" name="q" placeholder="Search docs" /> |
| <input type="hidden" name="check_keywords" value="yes" /> |
| <input type="hidden" name="area" value="default" /> |
| </form> |
| </div> |
| |
| |
| </div> |
| |
| <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> |
| |
| |
| |
| |
| |
| |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../project.html">Project</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../license.html">License</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../start.html">Quick Start</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../installation.html">Installation</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../tutorial.html">Tutorial</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../howto/index.html">How-to Guides</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../ui.html">UI / Screenshots</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../concepts.html">Concepts</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../profiling.html">Data Profiling</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../cli.html">Command Line Interface Reference</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../scheduler.html">Scheduling & Triggers</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../executor/index.html">Executor</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../plugins.html">Plugins</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../security.html">Security</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../timezone.html">Time zones</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../api.html">REST API Reference</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../integration.html">Integration</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../metrics.html">Metrics</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../errors.html">Error Tracking</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../kubernetes.html">Kubernetes</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../lineage.html">Lineage</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../dag-serialization.html">DAG Serialization</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../changelog.html">Changelog</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../best-practices.html">Best Practices</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../faq.html">FAQ</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../macros.html">Macros reference</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../privacy_notice.html">Privacy Notice</a></li> |
| </ul> |
| <p class="caption"><span class="caption-text">References</span></p> |
| <ul class="current"> |
| <li class="toctree-l1 current"><a class="reference internal" href="../../../index.html">Python API</a><ul class="current"> |
| <li class="toctree-l2"><a class="reference internal" href="../../../index.html#operators">Operators</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../../index.html#hooks">Hooks</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../../index.html#executors">Executors</a></li> |
| <li class="toctree-l2 current"><a class="reference internal" href="../../../index.html#models">Models</a><ul class="current"> |
| <li class="toctree-l3 current"><a class="reference internal" href="../index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models</span></code></a><ul class="current"> |
| <li class="toctree-l4 current"><a class="reference internal" href="../index.html#submodules">Submodules</a></li> |
| <li class="toctree-l4"><a class="reference internal" href="../index.html#package-contents">Package Contents</a></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="../../../index.html#core-and-community-package">Core and community package</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../configurations-ref.html">Configurations</a></li> |
| </ul> |
| |
| |
| |
| </div> |
| </div> |
| </nav> |
| |
| <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> |
| |
| |
| <nav class="wy-nav-top" aria-label="top navigation"> |
| |
| <i data-toggle="wy-nav-top" class="fa fa-bars"></i> |
| <a href="../../../../index.html">Airflow</a> |
| |
| </nav> |
| |
| |
| <div class="wy-nav-content"> |
| |
| <div class="rst-content"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div role="navigation" aria-label="breadcrumbs navigation"> |
| |
| <ul class="wy-breadcrumbs"> |
| |
| <li><a href="../../../../index.html">Docs</a> »</li> |
| |
| <li><a href="../../../index.html">Python API Reference</a> »</li> |
| |
| <li><a href="../index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models</span></code></a> »</li> |
| |
| <li><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.baseoperator</span></code></li> |
| |
| |
| <li class="wy-breadcrumbs-aside"> |
| |
| |
| <a href="../../../../_sources/_api/airflow/models/baseoperator/index.rst.txt" rel="nofollow"> View page source</a> |
| |
| |
| </li> |
| |
| </ul> |
| |
| |
| <hr/> |
| </div> |
| <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> |
| <div itemprop="articleBody"> |
| |
| <div class="section" id="module-airflow.models.baseoperator"> |
| <span id="airflow-models-baseoperator"></span><h1><a class="reference internal" href="#module-airflow.models.baseoperator" title="airflow.models.baseoperator"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.baseoperator</span></code></a><a class="headerlink" href="#module-airflow.models.baseoperator" title="Permalink to this headline">¶</a></h1> |
| <p><p>Base operator for all operators.</p> |
| </p> |
| <div class="section" id="module-contents"> |
| <h2>Module Contents<a class="headerlink" href="#module-contents" title="Permalink to this headline">¶</a></h2> |
| <dl class="class"> |
| <dt id="airflow.models.baseoperator.BaseOperator"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.baseoperator.</code><code class="sig-name descname">BaseOperator</code><span class="sig-paren">(</span><em class="sig-param">task_id</em>, <em class="sig-param">owner=conf.get('operators'</em>, <em class="sig-param">'DEFAULT_OWNER')</em>, <em class="sig-param">email=None</em>, <em class="sig-param">email_on_retry=True</em>, <em class="sig-param">email_on_failure=True</em>, <em class="sig-param">retries=conf.getint('core'</em>, <em class="sig-param">'default_task_retries'</em>, <em class="sig-param">fallback=0)</em>, <em class="sig-param">retry_delay=timedelta(seconds=300)</em>, <em class="sig-param">retry_exponential_backoff=False</em>, <em class="sig-param">max_retry_delay=None</em>, <em class="sig-param">start_date=None</em>, <em class="sig-param">end_date=None</em>, <em class="sig-param">schedule_interval=None</em>, <em class="sig-param">depends_on_past=False</em>, <em class="sig-param">wait_for_downstream=False</em>, <em class="sig-param">dag=None</em>, <em class="sig-param">params=None</em>, <em class="sig-param">default_args=None</em>, <em class="sig-param">priority_weight=1</em>, <em class="sig-param">weight_rule=WeightRule.DOWNSTREAM</em>, <em class="sig-param">queue=conf.get('celery'</em>, <em class="sig-param">'default_queue')</em>, <em class="sig-param">pool=Pool.DEFAULT_POOL_NAME</em>, <em class="sig-param">sla=None</em>, <em class="sig-param">execution_timeout=None</em>, <em class="sig-param">on_failure_callback=None</em>, <em class="sig-param">on_success_callback=None</em>, <em class="sig-param">on_retry_callback=None</em>, <em class="sig-param">trigger_rule=TriggerRule.ALL_SUCCESS</em>, <em class="sig-param">resources=None</em>, <em class="sig-param">run_as_user=None</em>, <em class="sig-param">task_concurrency=None</em>, <em class="sig-param">executor_config=None</em>, <em class="sig-param">do_xcom_push=True</em>, <em class="sig-param">inlets=None</em>, <em class="sig-param">outlets=None</em>, <em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.utils.log.logging_mixin.LoggingMixin</span></code></p> |
| <p>Abstract base class for all operators. Since operators create objects that |
| become nodes in the dag, BaseOperator contains many recursive methods for |
| dag crawling behavior. To derive this class, you are expected to override |
| the constructor as well as the ‘execute’ method.</p> |
| <p>Operators derived from this class should perform or trigger certain tasks |
| synchronously (wait for completion). Example of operators could be an |
| operator that runs a Pig job (PigOperator), a sensor operator that |
| waits for a partition to land in Hive (HiveSensorOperator), or one that |
| moves data from Hive to MySQL (Hive2MySqlOperator). Instances of these |
| operators (tasks) target specific operations, running specific scripts, |
| functions or data transfers.</p> |
| <p>This class is abstract and shouldn’t be instantiated. Instantiating a |
| class derived from this one results in the creation of a task object, |
| which ultimately becomes a node in DAG objects. Task dependencies should |
| be set by using the set_upstream and/or set_downstream methods.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>task_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – a unique, meaningful id for the task</p></li> |
| <li><p><strong>owner</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – the owner of the task, using the unix username is recommended</p></li> |
| <li><p><strong>email</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a><em> or </em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.8)"><em>list</em></a><em>[</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a><em>]</em>) – the ‘to’ email address(es) used in email alerts. This can be a |
| single email or multiple ones. Multiple addresses can be specified as a |
| comma or semi-colon separated string or by passing a list of strings.</p></li> |
| <li><p><strong>email_on_retry</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a>) – Indicates whether email alerts should be sent when a |
| task is retried</p></li> |
| <li><p><strong>email_on_failure</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a>) – Indicates whether email alerts should be sent when |
| a task failed</p></li> |
| <li><p><strong>retries</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – the number of retries that should be performed before |
| failing the task</p></li> |
| <li><p><strong>retry_delay</strong> (<a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.timedelta" title="(in Python v3.8)"><em>datetime.timedelta</em></a>) – delay between retries</p></li> |
| <li><p><strong>retry_exponential_backoff</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a>) – allow progressive longer waits between |
| retries by using exponential backoff algorithm on retry delay (delay |
| will be converted into seconds)</p></li> |
| <li><p><strong>max_retry_delay</strong> (<a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.timedelta" title="(in Python v3.8)"><em>datetime.timedelta</em></a>) – maximum delay interval between retries</p></li> |
| <li><p><strong>start_date</strong> (<a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.8)"><em>datetime.datetime</em></a>) – The <code class="docutils literal notranslate"><span class="pre">start_date</span></code> for the task, determines |
| the <code class="docutils literal notranslate"><span class="pre">execution_date</span></code> for the first task instance. The best practice |
| is to have the start_date rounded |
| to your DAG’s <code class="docutils literal notranslate"><span class="pre">schedule_interval</span></code>. Daily jobs have their start_date |
| some day at 00:00:00, hourly jobs have their start_date at 00:00 |
| of a specific hour. Note that Airflow simply looks at the latest |
| <code class="docutils literal notranslate"><span class="pre">execution_date</span></code> and adds the <code class="docutils literal notranslate"><span class="pre">schedule_interval</span></code> to determine |
| the next <code class="docutils literal notranslate"><span class="pre">execution_date</span></code>. It is also very important |
| to note that different tasks’ dependencies |
| need to line up in time. If task A depends on task B and their |
| start_date are offset in a way that their execution_date don’t line |
| up, A’s dependencies will never be met. If you are looking to delay |
| a task, for example running a daily task at 2AM, look into the |
| <code class="docutils literal notranslate"><span class="pre">TimeSensor</span></code> and <code class="docutils literal notranslate"><span class="pre">TimeDeltaSensor</span></code>. We advise against using |
| dynamic <code class="docutils literal notranslate"><span class="pre">start_date</span></code> and recommend using fixed ones. Read the |
| FAQ entry about start_date for more information.</p></li> |
| <li><p><strong>end_date</strong> (<a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.8)"><em>datetime.datetime</em></a>) – if specified, the scheduler won’t go beyond this date</p></li> |
| <li><p><strong>depends_on_past</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a>) – when set to true, task instances will run |
| sequentially while relying on the previous task’s schedule to |
| succeed. The task instance for the start_date is allowed to run.</p></li> |
| <li><p><strong>wait_for_downstream</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a>) – when set to true, an instance of task |
| X will wait for tasks immediately downstream of the previous instance |
| of task X to finish successfully before it runs. This is useful if the |
| different instances of a task X alter the same asset, and this asset |
| is used by tasks downstream of task X. Note that depends_on_past |
| is forced to True wherever wait_for_downstream is used. Also note that |
| only tasks <em>immediately</em> downstream of the previous task instance are waited |
| for; the statuses of any tasks further downstream are ignored.</p></li> |
| <li><p><strong>queue</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – which queue to target when running this job. Not |
| all executors implement queue management, the CeleryExecutor |
| does support targeting specific queues.</p></li> |
| <li><p><strong>dag</strong> (<a class="reference internal" href="../index.html#airflow.models.DAG" title="airflow.models.DAG"><em>airflow.models.DAG</em></a>) – a reference to the dag the task is attached to (if any)</p></li> |
| <li><p><strong>priority_weight</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – priority weight of this task against other task. |
| This allows the executor to trigger higher priority tasks before |
| others when things get backed up. Set priority_weight as a higher |
| number for more important tasks.</p></li> |
| <li><p><strong>weight_rule</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – weighting method used for the effective total |
| priority weight of the task. Options are: |
| <code class="docutils literal notranslate"><span class="pre">{</span> <span class="pre">downstream</span> <span class="pre">|</span> <span class="pre">upstream</span> <span class="pre">|</span> <span class="pre">absolute</span> <span class="pre">}</span></code> default is <code class="docutils literal notranslate"><span class="pre">downstream</span></code> |
| When set to <code class="docutils literal notranslate"><span class="pre">downstream</span></code> the effective weight of the task is the |
| aggregate sum of all downstream descendants. As a result, upstream |
| tasks will have higher weight and will be scheduled more aggressively |
| when using positive weight values. This is useful when you have |
| multiple dag run instances and desire to have all upstream tasks to |
| complete for all runs before each dag can continue processing |
| downstream tasks. When set to <code class="docutils literal notranslate"><span class="pre">upstream</span></code> the effective weight is the |
| aggregate sum of all upstream ancestors. This is the opposite where |
| downtream tasks have higher weight and will be scheduled more |
| aggressively when using positive weight values. This is useful when you |
| have multiple dag run instances and prefer to have each dag complete |
| before starting upstream tasks of other dags. When set to |
| <code class="docutils literal notranslate"><span class="pre">absolute</span></code>, the effective weight is the exact <code class="docutils literal notranslate"><span class="pre">priority_weight</span></code> |
| specified without additional weighting. You may want to do this when |
| you know exactly what priority weight each task should have. |
| Additionally, when set to <code class="docutils literal notranslate"><span class="pre">absolute</span></code>, there is bonus effect of |
| significantly speeding up the task creation process as for very large |
| DAGS. Options can be set as string or using the constants defined in |
| the static class <code class="docutils literal notranslate"><span class="pre">airflow.utils.WeightRule</span></code></p></li> |
| <li><p><strong>queue</strong> – specifies which task queue to use</p></li> |
| <li><p><strong>pool</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – the slot pool this task should run in, slot pools are a |
| way to limit concurrency for certain tasks</p></li> |
| <li><p><strong>sla</strong> (<a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.timedelta" title="(in Python v3.8)"><em>datetime.timedelta</em></a>) – time by which the job is expected to succeed. Note that |
| this represents the <code class="docutils literal notranslate"><span class="pre">timedelta</span></code> after the period is closed. For |
| example if you set an SLA of 1 hour, the scheduler would send an email |
| soon after 1:00AM on the <code class="docutils literal notranslate"><span class="pre">2016-01-02</span></code> if the <code class="docutils literal notranslate"><span class="pre">2016-01-01</span></code> instance |
| has not succeeded yet. |
| The scheduler pays special attention for jobs with an SLA and |
| sends alert |
| emails for sla misses. SLA misses are also recorded in the database |
| for future reference. All tasks that share the same SLA time |
| get bundled in a single email, sent soon after that time. SLA |
| notification are sent once and only once for each task instance.</p></li> |
| <li><p><strong>execution_timeout</strong> (<a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.timedelta" title="(in Python v3.8)"><em>datetime.timedelta</em></a>) – max time allowed for the execution of |
| this task instance, if it goes beyond it will raise and fail.</p></li> |
| <li><p><strong>on_failure_callback</strong> (<em>callable</em>) – a function to be called when a task instance |
| of this task fails. a context dictionary is passed as a single |
| parameter to this function. Context contains references to related |
| objects to the task instance and is documented under the macros |
| section of the API.</p></li> |
| <li><p><strong>on_retry_callback</strong> (<em>callable</em>) – much like the <code class="docutils literal notranslate"><span class="pre">on_failure_callback</span></code> except |
| that it is executed when retries occur.</p></li> |
| <li><p><strong>on_success_callback</strong> (<em>callable</em>) – much like the <code class="docutils literal notranslate"><span class="pre">on_failure_callback</span></code> except |
| that it is executed when the task succeeds.</p></li> |
| <li><p><strong>trigger_rule</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – defines the rule by which dependencies are applied |
| for the task to get triggered. Options are: |
| <code class="docutils literal notranslate"><span class="pre">{</span> <span class="pre">all_success</span> <span class="pre">|</span> <span class="pre">all_failed</span> <span class="pre">|</span> <span class="pre">all_done</span> <span class="pre">|</span> <span class="pre">one_success</span> <span class="pre">|</span> |
| <span class="pre">one_failed</span> <span class="pre">|</span> <span class="pre">none_failed</span> <span class="pre">|</span> <span class="pre">none_skipped</span> <span class="pre">|</span> <span class="pre">dummy}</span></code> |
| default is <code class="docutils literal notranslate"><span class="pre">all_success</span></code>. Options can be set as string or |
| using the constants defined in the static class |
| <code class="docutils literal notranslate"><span class="pre">airflow.utils.TriggerRule</span></code></p></li> |
| <li><p><strong>resources</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – A map of resource parameter names (the argument names of the |
| Resources constructor) to their values.</p></li> |
| <li><p><strong>run_as_user</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – unix username to impersonate while running the task</p></li> |
| <li><p><strong>task_concurrency</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – When set, a task will be able to limit the concurrent |
| runs across execution_dates</p></li> |
| <li><p><strong>executor_config</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – <p>Additional task-level configuration parameters that are |
| interpreted by a specific executor. Parameters are namespaced by the name of |
| executor.</p> |
| <p><strong>Example</strong>: to run this task in a specific docker container through |
| the KubernetesExecutor</p> |
| <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">MyOperator</span><span class="p">(</span><span class="o">...</span><span class="p">,</span> |
| <span class="n">executor_config</span><span class="o">=</span><span class="p">{</span> |
| <span class="s2">"KubernetesExecutor"</span><span class="p">:</span> |
| <span class="p">{</span><span class="s2">"image"</span><span class="p">:</span> <span class="s2">"myCustomDockerImage"</span><span class="p">}</span> |
| <span class="p">}</span> |
| <span class="p">)</span> |
| </pre></div> |
| </div> |
| </p></li> |
| <li><p><strong>do_xcom_push</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a>) – if True, an XCom is pushed containing the Operator’s |
| result</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.template_fields"> |
| <code class="sig-name descname">template_fields</code><em class="property"> :Iterable[str] = []</em><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.template_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.template_fields" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.template_ext"> |
| <code class="sig-name descname">template_ext</code><em class="property"> :Iterable[str] = []</em><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.template_ext"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.template_ext" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.ui_color"> |
| <code class="sig-name descname">ui_color</code><em class="property"> = #fff</em><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.ui_color"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.ui_color" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.ui_fgcolor"> |
| <code class="sig-name descname">ui_fgcolor</code><em class="property"> = #000</em><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.ui_fgcolor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.ui_fgcolor" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.pool"> |
| <code class="sig-name descname">pool</code><em class="property"> :str =</em><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.pool"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.pool" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator._base_operator_shallow_copy_attrs"> |
| <code class="sig-name descname">_base_operator_shallow_copy_attrs</code><em class="property"> :Iterable[str] = ['user_defined_macros', 'user_defined_filters', 'params', '_log']</em><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator._base_operator_shallow_copy_attrs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator._base_operator_shallow_copy_attrs" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.shallow_copy_attrs"> |
| <code class="sig-name descname">shallow_copy_attrs</code><em class="property"> :Iterable[str] = []</em><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.shallow_copy_attrs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.shallow_copy_attrs" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.operator_extra_links"> |
| <code class="sig-name descname">operator_extra_links</code><em class="property"> :Iterable['BaseOperatorLink'] = []</em><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.operator_extra_links"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.operator_extra_links" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.__serialized_fields"> |
| <code class="sig-name descname">__serialized_fields</code><em class="property"> :Optional[FrozenSet[str]]</em><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.__serialized_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.__serialized_fields" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator._comps"> |
| <code class="sig-name descname">_comps</code><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator._comps"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator._comps" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.dag"> |
| <code class="sig-name descname">dag</code><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.dag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.dag" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the Operator’s DAG if set, otherwise raises an error</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.dag_id"> |
| <code class="sig-name descname">dag_id</code><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.dag_id"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.dag_id" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns dag id if it has one or an adhoc + owner</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.deps"> |
| <code class="sig-name descname">deps</code><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.deps"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.deps" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the list of dependencies for the operator. These differ from execution |
| context dependencies in that they are specific to tasks and can be |
| extended/overridden by subclasses.</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.schedule_interval"> |
| <code class="sig-name descname">schedule_interval</code><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.schedule_interval"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.schedule_interval" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The schedule interval of the DAG always wins over individual tasks so |
| that tasks within a DAG always line up. The task still needs a |
| schedule_interval as it may not be attached to a DAG.</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.priority_weight_total"> |
| <code class="sig-name descname">priority_weight_total</code><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.priority_weight_total"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.priority_weight_total" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Total priority weight for the task. It might include all upstream or downstream tasks. |
| depending on the weight rule.</p> |
| <blockquote> |
| <div><ul class="simple"> |
| <li><p>WeightRule.ABSOLUTE - only own weight</p></li> |
| <li><p>WeightRule.DOWNSTREAM - adds priority weight of all downstream tasks</p></li> |
| <li><p>WeightRule.UPSTREAM - adds priority weight of all upstream tasks</p></li> |
| </ul> |
| </div></blockquote> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.upstream_list"> |
| <code class="sig-name descname">upstream_list</code><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.upstream_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.upstream_list" title="Permalink to this definition">¶</a></dt> |
| <dd><p>@property: list of tasks directly upstream</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.upstream_task_ids"> |
| <code class="sig-name descname">upstream_task_ids</code><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.upstream_task_ids"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.upstream_task_ids" title="Permalink to this definition">¶</a></dt> |
| <dd><p>@property: list of ids of tasks directly upstream</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.downstream_list"> |
| <code class="sig-name descname">downstream_list</code><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.downstream_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.downstream_list" title="Permalink to this definition">¶</a></dt> |
| <dd><p>@property: list of tasks directly downstream</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.downstream_task_ids"> |
| <code class="sig-name descname">downstream_task_ids</code><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.downstream_task_ids"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.downstream_task_ids" title="Permalink to this definition">¶</a></dt> |
| <dd><p>@property: list of ids of tasks directly downstream</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperator.task_type"> |
| <code class="sig-name descname">task_type</code><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.task_type"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.task_type" title="Permalink to this definition">¶</a></dt> |
| <dd><p>@property: type of the task</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.__eq__"> |
| <code class="sig-name descname">__eq__</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.__eq__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.__eq__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.__ne__"> |
| <code class="sig-name descname">__ne__</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.__ne__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.__ne__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.__lt__"> |
| <code class="sig-name descname">__lt__</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.__lt__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.__lt__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.__hash__"> |
| <code class="sig-name descname">__hash__</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.__hash__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.__hash__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.__rshift__"> |
| <code class="sig-name descname">__rshift__</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.__rshift__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.__rshift__" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Implements Self >> Other == self.set_downstream(other)</p> |
| <p>If “Other” is a DAG, the DAG is assigned to the Operator.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.__lshift__"> |
| <code class="sig-name descname">__lshift__</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.__lshift__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.__lshift__" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Implements Self << Other == self.set_upstream(other)</p> |
| <p>If “Other” is a DAG, the DAG is assigned to the Operator.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.__rrshift__"> |
| <code class="sig-name descname">__rrshift__</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.__rrshift__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.__rrshift__" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Called for [DAG] >> [Operator] because DAGs don’t have |
| __rshift__ operators.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.__rlshift__"> |
| <code class="sig-name descname">__rlshift__</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.__rlshift__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.__rlshift__" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Called for [DAG] << [Operator] because DAGs don’t have |
| __lshift__ operators.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.has_dag"> |
| <code class="sig-name descname">has_dag</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.has_dag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.has_dag" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns True if the Operator has been assigned to a DAG.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.operator_extra_link_dict"> |
| <code class="sig-name descname">operator_extra_link_dict</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.operator_extra_link_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.operator_extra_link_dict" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns dictionary of all extra links for the operator</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.global_operator_extra_link_dict"> |
| <code class="sig-name descname">global_operator_extra_link_dict</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.global_operator_extra_link_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.global_operator_extra_link_dict" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns dictionary of all global extra links</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.pre_execute"> |
| <code class="sig-name descname">pre_execute</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">context</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.pre_execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.pre_execute" title="Permalink to this definition">¶</a></dt> |
| <dd><p>This hook is triggered right before self.execute() is called.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.execute"> |
| <code class="sig-name descname">execute</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">context</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.execute" title="Permalink to this definition">¶</a></dt> |
| <dd><p>This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates.</p> |
| <p>Refer to get_template_context for more context.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.post_execute"> |
| <code class="sig-name descname">post_execute</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">context</em>, <em class="sig-param">result=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.post_execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.post_execute" title="Permalink to this definition">¶</a></dt> |
| <dd><p>This hook is triggered right after self.execute() is called. |
| It is passed the execution context and any results returned by the |
| operator.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.on_kill"> |
| <code class="sig-name descname">on_kill</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.on_kill"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.on_kill" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Override this method to cleanup subprocesses when a task instance |
| gets killed. Any use of the threading, subprocess or multiprocessing |
| module within an operator needs to be cleaned up or it will leave |
| ghost processes behind.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.__deepcopy__"> |
| <code class="sig-name descname">__deepcopy__</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">memo</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.__deepcopy__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.__deepcopy__" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Hack sorting double chained task lists by task_id to avoid hitting |
| max_depth on deepcopy operations.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.__getstate__"> |
| <code class="sig-name descname">__getstate__</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.__getstate__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.__getstate__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.__setstate__"> |
| <code class="sig-name descname">__setstate__</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">state</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.__setstate__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.__setstate__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.render_template_fields"> |
| <code class="sig-name descname">render_template_fields</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">context</em>, <em class="sig-param">jinja_env=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.render_template_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.render_template_fields" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Template all attributes listed in template_fields. Note this operation is irreversible.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>context</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – Dict with values to apply on content</p></li> |
| <li><p><strong>jinja_env</strong> (<em>jinja2.Environment</em>) – Jinja environment</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator._do_render_template_fields"> |
| <code class="sig-name descname">_do_render_template_fields</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">parent</em>, <em class="sig-param">template_fields</em>, <em class="sig-param">context</em>, <em class="sig-param">jinja_env</em>, <em class="sig-param">seen_oids</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator._do_render_template_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator._do_render_template_fields" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.render_template"> |
| <code class="sig-name descname">render_template</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">content</em>, <em class="sig-param">context</em>, <em class="sig-param">jinja_env=None</em>, <em class="sig-param">seen_oids=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.render_template"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.render_template" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Render a templated string. The content can be a collection holding multiple templated strings and will |
| be templated recursively.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>content</strong> (<em>Any</em>) – Content to template. Only strings can be templated (may be inside collection).</p></li> |
| <li><p><strong>context</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – Dict with values to apply on templated content</p></li> |
| <li><p><strong>jinja_env</strong> (<em>jinja2.Environment</em>) – Jinja environment. Can be provided to avoid re-creating Jinja environments during |
| recursion.</p></li> |
| <li><p><strong>seen_oids</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#set" title="(in Python v3.8)"><em>set</em></a>) – template fields already rendered (to avoid RecursionError on circular dependencies)</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>Templated content</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator._render_nested_template_fields"> |
| <code class="sig-name descname">_render_nested_template_fields</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">content</em>, <em class="sig-param">context</em>, <em class="sig-param">jinja_env</em>, <em class="sig-param">seen_oids</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator._render_nested_template_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator._render_nested_template_fields" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.get_template_env"> |
| <code class="sig-name descname">get_template_env</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.get_template_env"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.get_template_env" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Fetch a Jinja template environment from the DAG or instantiate empty environment if no DAG.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.prepare_template"> |
| <code class="sig-name descname">prepare_template</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.prepare_template"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.prepare_template" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Hook that is triggered after the templated fields get replaced |
| by their content. If you need your operator to alter the |
| content of the file before the template is rendered, |
| it should override this method to do so.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.resolve_template_files"> |
| <code class="sig-name descname">resolve_template_files</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.resolve_template_files"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.resolve_template_files" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.clear"> |
| <code class="sig-name descname">clear</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">start_date=None</em>, <em class="sig-param">end_date=None</em>, <em class="sig-param">upstream=False</em>, <em class="sig-param">downstream=False</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.clear"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.clear" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Clears the state of task instances associated with the task, following |
| the parameters specified.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.get_task_instances"> |
| <code class="sig-name descname">get_task_instances</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">start_date=None</em>, <em class="sig-param">end_date=None</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.get_task_instances"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.get_task_instances" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get a set of task instance related to this task for a specific date |
| range.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.get_flat_relative_ids"> |
| <code class="sig-name descname">get_flat_relative_ids</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">upstream=False</em>, <em class="sig-param">found_descendants=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.get_flat_relative_ids"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.get_flat_relative_ids" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get a flat list of relatives’ ids, either upstream or downstream.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.get_flat_relatives"> |
| <code class="sig-name descname">get_flat_relatives</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">upstream=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.get_flat_relatives"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.get_flat_relatives" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get a flat list of relatives, either upstream or downstream.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.run"> |
| <code class="sig-name descname">run</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">start_date=None</em>, <em class="sig-param">end_date=None</em>, <em class="sig-param">ignore_first_depends_on_past=False</em>, <em class="sig-param">ignore_ti_state=False</em>, <em class="sig-param">mark_success=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.run" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Run a set of task instances for a date range.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.dry_run"> |
| <code class="sig-name descname">dry_run</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.dry_run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.dry_run" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Performs dry run for the operator - just render template fields.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.get_direct_relative_ids"> |
| <code class="sig-name descname">get_direct_relative_ids</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">upstream=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.get_direct_relative_ids"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.get_direct_relative_ids" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the direct relative ids to the current task, upstream or |
| downstream.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.get_direct_relatives"> |
| <code class="sig-name descname">get_direct_relatives</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">upstream=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.get_direct_relatives"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.get_direct_relatives" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the direct relatives to the current task, upstream or |
| downstream.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.__repr__"> |
| <code class="sig-name descname">__repr__</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.__repr__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.add_only_new"> |
| <code class="sig-name descname">add_only_new</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">item_set</em>, <em class="sig-param">item</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.add_only_new"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.add_only_new" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Adds only new items to item set</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator._set_relatives"> |
| <code class="sig-name descname">_set_relatives</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">task_or_task_list</em>, <em class="sig-param">upstream=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator._set_relatives"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator._set_relatives" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets relatives for the task.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.set_downstream"> |
| <code class="sig-name descname">set_downstream</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">task_or_task_list</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.set_downstream"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.set_downstream" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Set a task or a task list to be directly downstream from the current |
| task.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.set_upstream"> |
| <code class="sig-name descname">set_upstream</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">task_or_task_list</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.set_upstream"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.set_upstream" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Set a task or a task list to be directly upstream from the current |
| task.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.xcom_push"> |
| <code class="sig-name descname">xcom_push</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">context</em>, <em class="sig-param">key</em>, <em class="sig-param">value</em>, <em class="sig-param">execution_date=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.xcom_push"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.xcom_push" title="Permalink to this definition">¶</a></dt> |
| <dd><p>See TaskInstance.xcom_push()</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.xcom_pull"> |
| <code class="sig-name descname">xcom_pull</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">context</em>, <em class="sig-param">task_ids=None</em>, <em class="sig-param">dag_id=None</em>, <em class="sig-param">key=XCOM_RETURN_KEY</em>, <em class="sig-param">include_prior_dates=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.xcom_pull"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.xcom_pull" title="Permalink to this definition">¶</a></dt> |
| <dd><p>See TaskInstance.xcom_pull()</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.extra_links"> |
| <code class="sig-name descname">extra_links</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.extra_links"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.extra_links" title="Permalink to this definition">¶</a></dt> |
| <dd><p>@property: extra links for the task.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.get_extra_links"> |
| <code class="sig-name descname">get_extra_links</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">dttm</em>, <em class="sig-param">link_name</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.get_extra_links"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.get_extra_links" title="Permalink to this definition">¶</a></dt> |
| <dd><p>For an operator, gets the URL that the external links specified in |
| <cite>extra_links</cite> should point to.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Raises</dt> |
| <dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/exceptions.html#ValueError" title="(in Python v3.8)"><strong>ValueError</strong></a> – The error message of a ValueError will be passed on through to |
| the fronted to show up as a tooltip on the disabled link</p> |
| </dd> |
| <dt class="field-even">Parameters</dt> |
| <dd class="field-even"><ul class="simple"> |
| <li><p><strong>dttm</strong> – The datetime parsed execution date for the URL being searched for</p></li> |
| <li><p><strong>link_name</strong> – The name of the link we’re looking for the URL for. Should be |
| one of the options specified in <cite>extra_links</cite></p></li> |
| </ul> |
| </dd> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>A URL</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperator.get_serialized_fields"> |
| <em class="property">classmethod </em><code class="sig-name descname">get_serialized_fields</code><span class="sig-paren">(</span><em class="sig-param">cls</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperator.get_serialized_fields"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperator.get_serialized_fields" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Stringified DAGs and operators contain exactly these fields.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.baseoperator.BaseOperatorLink"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.baseoperator.</code><code class="sig-name descname">BaseOperatorLink</code><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperatorLink"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperatorLink" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Abstract base class that defines how we get an operator link.</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperatorLink.__metaclass__"> |
| <code class="sig-name descname">__metaclass__</code><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperatorLink.__metaclass__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperatorLink.__metaclass__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperatorLink.operators"> |
| <code class="sig-name descname">operators</code><em class="property"> :ClassVar[List[Type[BaseOperator]]] = []</em><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperatorLink.operators"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperatorLink.operators" title="Permalink to this definition">¶</a></dt> |
| <dd><p>This property will be used by Airflow Plugins to find the Operators to which you want |
| to assign this Operator Link</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>List of Operator classes used by task for which you want to create extra link</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.baseoperator.BaseOperatorLink.name"> |
| <code class="sig-name descname">name</code><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperatorLink.name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperatorLink.name" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Name of the link. This will be the button name on the task UI.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>link name</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.baseoperator.BaseOperatorLink.get_link"> |
| <code class="sig-name descname">get_link</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">operator</em>, <em class="sig-param">dttm</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../_modules/airflow/models/baseoperator.html#BaseOperatorLink.get_link"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.baseoperator.BaseOperatorLink.get_link" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Link to external system.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>operator</strong> – airflow operator</p></li> |
| <li><p><strong>dttm</strong> – datetime</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>link to external system</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| </div> |
| </div> |
| |
| |
| </div> |
| |
| </div> |
| |
| |
| <footer> |
| |
| <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
| |
| <a href="../chart/index.html" class="btn btn-neutral float-right" title="airflow.models.chart" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> |
| |
| |
| <a href="../base/index.html" class="btn btn-neutral float-left" title="airflow.models.base" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> |
| |
| </div> |
| |
| |
| <hr/> |
| |
| <div role="contentinfo"> |
| <p> |
| |
| </p> |
| </div> |
| Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. |
| <div class="footer">This page uses <a href="https://analytics.google.com/"> |
| Google Analytics</a> to collect statistics. You can disable it by blocking |
| the JavaScript coming from www.google-analytics.com. Check our |
| <a href="../../../../privacy_notice.html">Privacy Policy</a> |
| for more details. |
| </div> |
| |
| |
| </footer> |
| |
| </div> |
| </div> |
| |
| </section> |
| |
| </div> |
| |
| |
| |
| <script type="text/javascript"> |
| jQuery(function () { |
| SphinxRtdTheme.Navigation.enable(true); |
| }); |
| </script> |
| |
| |
| |
| |
| <!-- Theme Analytics --> |
| <script> |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); |
| |
| ga('create', 'UA-140539454-1', 'auto'); |
| ga('send', 'pageview'); |
| </script> |
| |
| |
| |
| |
| </body> |
| </html> |