| |
| |
| |
| |
| <!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.operators — Airflow Documentation</title> |
| |
| |
| |
| |
| |
| |
| |
| |
| <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/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="index" title="Index" href="../../../genindex.html" /> |
| <link rel="search" title="Search" href="../../../search.html" /> |
| <link rel="next" title="airflow.operators.bash_operator" href="bash_operator/index.html" /> |
| <link rel="prev" title="API Reference" href="../../index.html" /> |
| |
| <script> |
| document.addEventListener('DOMContentLoaded', function() { |
| var el = document.getElementById('changelog'); |
| if (el !== null ) { |
| // [AIRFLOW-...] |
| el.innerHTML = el.innerHTML.replace( |
| /\[(AIRFLOW-[\d]+)\]/g, |
| `<a href="https://issues.apache.org/jira/browse/$1">[$1]</a>` |
| ); |
| // (#...) |
| el.innerHTML = el.innerHTML.replace( |
| /\(#([\d]+)\)/g, |
| `<a href="https://github.com/apache/airflow/pull/$1">(#$1)</a>` |
| ); |
| }; |
| }) |
| </script> |
| <style> |
| .example-header { |
| position: relative; |
| background: #9AAA7A; |
| padding: 8px 16px; |
| margin-bottom: 0; |
| } |
| .example-header--with-button { |
| padding-right: 166px; |
| } |
| .example-header:after{ |
| content: ''; |
| display: table; |
| clear: both; |
| } |
| .example-title { |
| display:block; |
| padding: 4px; |
| margin-right: 16px; |
| color: white; |
| overflow-x: auto; |
| } |
| .example-header-button { |
| top: 8px; |
| right: 16px; |
| position: absolute; |
| } |
| .example-header + .highlight-python { |
| margin-top: 0 !important; |
| } |
| .viewcode-button { |
| display: inline-block; |
| padding: 8px 16px; |
| border: 0; |
| margin: 0; |
| outline: 0; |
| border-radius: 2px; |
| -webkit-box-shadow: 0 3px 5px 0 rgba(0,0,0,.3); |
| box-shadow: 0 3px 6px 0 rgba(0,0,0,.3); |
| color: #404040; |
| background-color: #e7e7e7; |
| cursor: pointer; |
| font-size: 16px; |
| font-weight: 500; |
| line-height: 1; |
| text-decoration: none; |
| text-overflow: ellipsis; |
| overflow: hidden; |
| text-transform: uppercase; |
| -webkit-transition: background-color .2s; |
| transition: background-color .2s; |
| vertical-align: middle; |
| white-space: nowrap; |
| } |
| .viewcode-button:visited { |
| color: #404040; |
| } |
| .viewcode-button:hover, .viewcode-button:focus { |
| color: #404040; |
| background-color: #d6d6d6; |
| } |
| </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.3 |
| </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 class="current"> |
| <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</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="../../../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">Experimental Rest API</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="../../../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="../../../changelog.html">Changelog</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 current"><a class="reference internal" href="../../index.html">API Reference</a><ul class="current"> |
| <li class="toctree-l2 current"><a class="reference internal" href="../../index.html#operators">Operators</a><ul class="current"> |
| <li class="toctree-l3"><a class="reference internal" href="../../index.html#baseoperator">BaseOperator</a></li> |
| <li class="toctree-l3"><a class="reference internal" href="../../index.html#basesensoroperator">BaseSensorOperator</a></li> |
| <li class="toctree-l3 current"><a class="reference internal" href="../../index.html#operators-packages">Operators packages</a><ul class="current"> |
| <li class="toctree-l4 current"><a class="current reference internal" href="#"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators</span></code></a></li> |
| <li class="toctree-l4"><a class="reference internal" href="../sensors/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.sensors</span></code></a></li> |
| <li class="toctree-l4"><a class="reference internal" href="../contrib/operators/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.contrib.operators</span></code></a></li> |
| <li class="toctree-l4"><a class="reference internal" href="../contrib/sensors/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.contrib.sensors</span></code></a></li> |
| </ul> |
| </li> |
| </ul> |
| </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"><a class="reference internal" href="../../index.html#models">Models</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../index.html#core-and-community-package">Core and community package</a></li> |
| </ul> |
| </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">API Reference</a> »</li> |
| |
| <li><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators</span></code></li> |
| |
| |
| <li class="wy-breadcrumbs-aside"> |
| |
| |
| <a href="../../../_sources/_api/airflow/operators/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.operators"> |
| <span id="airflow-operators"></span><h1><a class="reference internal" href="#module-airflow.operators" title="airflow.operators"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators</span></code></a><a class="headerlink" href="#module-airflow.operators" title="Permalink to this headline">¶</a></h1> |
| <div class="section" id="submodules"> |
| <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2> |
| <div class="toctree-wrapper compound"> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="bash_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.bash_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="check_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.check_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="dagrun_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.dagrun_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="docker_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.docker_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="druid_check_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.druid_check_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="dummy_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.dummy_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="email_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.email_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="generic_transfer/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.generic_transfer</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="hive_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.hive_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="hive_stats_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.hive_stats_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="hive_to_druid/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.hive_to_druid</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="hive_to_mysql/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.hive_to_mysql</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="hive_to_samba_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.hive_to_samba_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="http_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.http_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="jdbc_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.jdbc_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="latest_only_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.latest_only_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="mssql_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.mssql_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="mssql_to_hive/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.mssql_to_hive</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="mysql_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.mysql_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="mysql_to_hive/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.mysql_to_hive</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="oracle_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.oracle_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="pig_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.pig_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="postgres_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.postgres_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="presto_check_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.presto_check_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="presto_to_mysql/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.presto_to_mysql</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="python_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.python_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="redshift_to_s3_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.redshift_to_s3_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="s3_file_transform_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.s3_file_transform_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="s3_to_hive_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.s3_to_hive_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="s3_to_redshift_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.s3_to_redshift_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="sensors/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.sensors</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="slack_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.slack_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="sqlite_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.sqlite_operator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="subdag_operator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.operators.subdag_operator</span></code></a></li> |
| </ul> |
| </div> |
| </div> |
| <div class="section" id="package-contents"> |
| <h2>Package Contents<a class="headerlink" href="#package-contents" title="Permalink to this headline">¶</a></h2> |
| <dl class="class"> |
| <dt id="airflow.operators.BaseOperator"> |
| <em class="property">class </em><code class="descclassname">airflow.operators.</code><code class="descname">BaseOperator</code><span class="sig-paren">(</span><em>task_id</em>, <em>owner=configuration.conf.get('operators'</em>, <em>'DEFAULT_OWNER')</em>, <em>email=None</em>, <em>email_on_retry=True</em>, <em>email_on_failure=True</em>, <em>retries=0</em>, <em>retry_delay=timedelta(seconds=300)</em>, <em>retry_exponential_backoff=False</em>, <em>max_retry_delay=None</em>, <em>start_date=None</em>, <em>end_date=None</em>, <em>schedule_interval=None</em>, <em>depends_on_past=False</em>, <em>wait_for_downstream=False</em>, <em>dag=None</em>, <em>params=None</em>, <em>default_args=None</em>, <em>priority_weight=1</em>, <em>weight_rule=WeightRule.DOWNSTREAM</em>, <em>queue=configuration.conf.get('celery'</em>, <em>'default_queue')</em>, <em>pool=None</em>, <em>sla=None</em>, <em>execution_timeout=None</em>, <em>on_failure_callback=None</em>, <em>on_success_callback=None</em>, <em>on_retry_callback=None</em>, <em>trigger_rule=TriggerRule.ALL_SUCCESS</em>, <em>resources=None</em>, <em>run_as_user=None</em>, <em>task_concurrency=None</em>, <em>executor_config=None</em>, <em>inlets=None</em>, <em>outlets=None</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.operators.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.7)"><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.7)"><em>str</em></a>) – the owner of the task, using the unix username is recommended</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.7)"><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.7)"><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.7)"><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.7)"><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.7)"><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.7)"><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.7)"><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.7)"><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.</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.7)"><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="../models/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.7)"><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.</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.7)"><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>pool</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><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.7)"><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.7)"><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.7)"><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.7)"><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.7)"><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.7)"><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.7)"><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> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="attribute"> |
| <dt id="airflow.operators.BaseOperator.template_fields"> |
| <code class="descname">template_fields</code><em class="property"> = []</em><a class="headerlink" href="#airflow.operators.BaseOperator.template_fields" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.operators.BaseOperator.template_ext"> |
| <code class="descname">template_ext</code><em class="property"> = []</em><a class="headerlink" href="#airflow.operators.BaseOperator.template_ext" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.operators.BaseOperator.ui_color"> |
| <code class="descname">ui_color</code><em class="property"> = #fff</em><a class="headerlink" href="#airflow.operators.BaseOperator.ui_color" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.operators.BaseOperator.ui_fgcolor"> |
| <code class="descname">ui_fgcolor</code><em class="property"> = #000</em><a class="headerlink" href="#airflow.operators.BaseOperator.ui_fgcolor" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.operators.BaseOperator._base_operator_shallow_copy_attrs"> |
| <code class="descname">_base_operator_shallow_copy_attrs</code><em class="property"> = ['user_defined_macros', 'user_defined_filters', 'params', '_log']</em><a class="headerlink" href="#airflow.operators.BaseOperator._base_operator_shallow_copy_attrs" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.operators.BaseOperator.shallow_copy_attrs"> |
| <code class="descname">shallow_copy_attrs</code><em class="property"> = []</em><a class="headerlink" href="#airflow.operators.BaseOperator.shallow_copy_attrs" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.operators.BaseOperator.dag"> |
| <code class="descname">dag</code><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.dag_id"> |
| <code class="descname">dag_id</code><a class="headerlink" href="#airflow.operators.BaseOperator.dag_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.operators.BaseOperator.deps"> |
| <code class="descname">deps</code><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.schedule_interval"> |
| <code class="descname">schedule_interval</code><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.priority_weight_total"> |
| <code class="descname">priority_weight_total</code><a class="headerlink" href="#airflow.operators.BaseOperator.priority_weight_total" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.operators.BaseOperator.upstream_list"> |
| <code class="descname">upstream_list</code><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.upstream_task_ids"> |
| <code class="descname">upstream_task_ids</code><a class="headerlink" href="#airflow.operators.BaseOperator.upstream_task_ids" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.operators.BaseOperator.downstream_list"> |
| <code class="descname">downstream_list</code><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.downstream_task_ids"> |
| <code class="descname">downstream_task_ids</code><a class="headerlink" href="#airflow.operators.BaseOperator.downstream_task_ids" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.operators.BaseOperator.task_type"> |
| <code class="descname">task_type</code><a class="headerlink" href="#airflow.operators.BaseOperator.task_type" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.operators.BaseOperator.__eq__"> |
| <code class="descname">__eq__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.BaseOperator.__eq__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.operators.BaseOperator.__ne__"> |
| <code class="descname">__ne__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.BaseOperator.__ne__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.operators.BaseOperator.__lt__"> |
| <code class="descname">__lt__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.BaseOperator.__lt__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.operators.BaseOperator.__hash__"> |
| <code class="descname">__hash__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.BaseOperator.__hash__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.operators.BaseOperator.__rshift__"> |
| <code class="descname">__rshift__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.__lshift__"> |
| <code class="descname">__lshift__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.__rrshift__"> |
| <code class="descname">__rrshift__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.__rlshift__"> |
| <code class="descname">__rlshift__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.has_dag"> |
| <code class="descname">has_dag</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.pre_execute"> |
| <code class="descname">pre_execute</code><span class="sig-paren">(</span><em>self</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.execute"> |
| <code class="descname">execute</code><span class="sig-paren">(</span><em>self</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.post_execute"> |
| <code class="descname">post_execute</code><span class="sig-paren">(</span><em>self</em>, <em>context</em>, <em>result=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.on_kill"> |
| <code class="descname">on_kill</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.__deepcopy__"> |
| <code class="descname">__deepcopy__</code><span class="sig-paren">(</span><em>self</em>, <em>memo</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.__getstate__"> |
| <code class="descname">__getstate__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.BaseOperator.__getstate__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.operators.BaseOperator.__setstate__"> |
| <code class="descname">__setstate__</code><span class="sig-paren">(</span><em>self</em>, <em>state</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.BaseOperator.__setstate__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.operators.BaseOperator.render_template_from_field"> |
| <code class="descname">render_template_from_field</code><span class="sig-paren">(</span><em>self</em>, <em>attr</em>, <em>content</em>, <em>context</em>, <em>jinja_env</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.BaseOperator.render_template_from_field" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Renders a template from a field. If the field is a string, it will |
| simply render the string and return the result. If it is a collection or |
| nested set of collections, it will traverse the structure and render |
| all elements in it. If the field has another type, it will return it as it is.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.operators.BaseOperator.render_template"> |
| <code class="descname">render_template</code><span class="sig-paren">(</span><em>self</em>, <em>attr</em>, <em>content</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.BaseOperator.render_template" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Renders a template either from a file or directly in a field, and returns |
| the rendered result.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.operators.BaseOperator.get_template_env"> |
| <code class="descname">get_template_env</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.BaseOperator.get_template_env" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.operators.BaseOperator.prepare_template"> |
| <code class="descname">prepare_template</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.resolve_template_files"> |
| <code class="descname">resolve_template_files</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.BaseOperator.resolve_template_files" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.operators.BaseOperator.clear"> |
| <code class="descname">clear</code><span class="sig-paren">(</span><em>self</em>, <em>start_date=None</em>, <em>end_date=None</em>, <em>upstream=False</em>, <em>downstream=False</em>, <em>session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.get_task_instances"> |
| <code class="descname">get_task_instances</code><span class="sig-paren">(</span><em>self</em>, <em>session</em>, <em>start_date=None</em>, <em>end_date=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.get_flat_relative_ids"> |
| <code class="descname">get_flat_relative_ids</code><span class="sig-paren">(</span><em>self</em>, <em>upstream=False</em>, <em>found_descendants=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.get_flat_relatives"> |
| <code class="descname">get_flat_relatives</code><span class="sig-paren">(</span><em>self</em>, <em>upstream=False</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.run"> |
| <code class="descname">run</code><span class="sig-paren">(</span><em>self</em>, <em>start_date=None</em>, <em>end_date=None</em>, <em>ignore_first_depends_on_past=False</em>, <em>ignore_ti_state=False</em>, <em>mark_success=False</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.dry_run"> |
| <code class="descname">dry_run</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.BaseOperator.dry_run" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.operators.BaseOperator.get_direct_relative_ids"> |
| <code class="descname">get_direct_relative_ids</code><span class="sig-paren">(</span><em>self</em>, <em>upstream=False</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.get_direct_relatives"> |
| <code class="descname">get_direct_relatives</code><span class="sig-paren">(</span><em>self</em>, <em>upstream=False</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.__repr__"> |
| <code class="descname">__repr__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.BaseOperator.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.operators.BaseOperator.add_only_new"> |
| <code class="descname">add_only_new</code><span class="sig-paren">(</span><em>self</em>, <em>item_set</em>, <em>item</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.BaseOperator.add_only_new" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.operators.BaseOperator._set_relatives"> |
| <code class="descname">_set_relatives</code><span class="sig-paren">(</span><em>self</em>, <em>task_or_task_list</em>, <em>upstream=False</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.BaseOperator._set_relatives" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.operators.BaseOperator.set_downstream"> |
| <code class="descname">set_downstream</code><span class="sig-paren">(</span><em>self</em>, <em>task_or_task_list</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.set_upstream"> |
| <code class="descname">set_upstream</code><span class="sig-paren">(</span><em>self</em>, <em>task_or_task_list</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.xcom_push"> |
| <code class="descname">xcom_push</code><span class="sig-paren">(</span><em>self</em>, <em>context</em>, <em>key</em>, <em>value</em>, <em>execution_date=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.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.operators.BaseOperator.xcom_pull"> |
| <code class="descname">xcom_pull</code><span class="sig-paren">(</span><em>self</em>, <em>context</em>, <em>task_ids=None</em>, <em>dag_id=None</em>, <em>key=XCOM_RETURN_KEY</em>, <em>include_prior_dates=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.operators.BaseOperator.xcom_pull" title="Permalink to this definition">¶</a></dt> |
| <dd><p>See TaskInstance.xcom_pull()</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="data"> |
| <dt id="airflow.operators._operators"> |
| <code class="descclassname">airflow.operators.</code><code class="descname">_operators</code><a class="reference internal" href="../../../_modules/airflow/operators.html#_operators"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.operators._operators" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="data"> |
| <dt id="airflow.operators.airflow_importer"> |
| <code class="descclassname">airflow.operators.</code><code class="descname">airflow_importer</code><a class="reference internal" href="../../../_modules/airflow/operators.html#airflow_importer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.operators.airflow_importer" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.operators._integrate_plugins"> |
| <code class="descclassname">airflow.operators.</code><code class="descname">_integrate_plugins</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/operators.html#_integrate_plugins"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.operators._integrate_plugins" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Integrate plugins to the context</p> |
| </dd></dl> |
| |
| </div> |
| </div> |
| |
| |
| </div> |
| |
| </div> |
| <footer> |
| |
| <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
| |
| <a href="bash_operator/index.html" class="btn btn-neutral float-right" title="airflow.operators.bash_operator" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> |
| |
| |
| <a href="../../index.html" class="btn btn-neutral float-left" title="API Reference" 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>. |
| |
| </footer> |
| |
| </div> |
| </div> |
| |
| </section> |
| |
| </div> |
| |
| |
| |
| <script type="text/javascript"> |
| jQuery(function () { |
| SphinxRtdTheme.Navigation.enable(true); |
| }); |
| </script> |
| |
| |
| |
| |
| |
| |
| </body> |
| </html> |