| |
| |
| |
| |
| |
| <!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 — 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.models.base" href="base/index.html" /> |
| <link rel="prev" title="airflow.contrib.executors.mesos_executor" href="../contrib/executors/mesos_executor/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> |
| <script type="text/javascript"> |
| var _gaq = _gaq || []; |
| _gaq.push(['_setAccount', 'UA-140539454-1']); |
| _gaq.push(['_trackPageview']); |
| </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.5 |
| </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 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="../../../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="../../../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">Python API Reference</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="current reference internal" href="#"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models</span></code></a><ul> |
| <li class="toctree-l4"><a class="reference internal" href="#submodules">Submodules</a></li> |
| <li class="toctree-l4"><a class="reference internal" href="#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="../../../privacy_notice.html">Privacy Notice</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><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models</span></code></li> |
| |
| |
| <li class="wy-breadcrumbs-aside"> |
| |
| |
| <a href="../../../_sources/_api/airflow/models/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"> |
| <span id="airflow-models"></span><h1><a class="reference internal" href="#module-airflow.models" title="airflow.models"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models</span></code></a><a class="headerlink" href="#module-airflow.models" 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="base/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.base</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="baseoperator/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.baseoperator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="chart/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.chart</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="connection/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.connection</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="crypto/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.crypto</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="dag/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.dag</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="dagbag/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.dagbag</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="dagpickle/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.dagpickle</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="dagrun/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.dagrun</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="errors/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.errors</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="knownevent/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.knownevent</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="kubernetes/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.kubernetes</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="log/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.log</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="pool/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.pool</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="skipmixin/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.skipmixin</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="slamiss/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.slamiss</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="taskfail/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.taskfail</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="taskinstance/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.taskinstance</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="taskreschedule/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.taskreschedule</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="user/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.user</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="variable/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.variable</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="xcom/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.xcom</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="data"> |
| <dt id="airflow.models.Base"> |
| <code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">Base</code><em class="property"> :Any</em><a class="reference internal" href="../../../_modules/airflow/models/base.html#Base"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.Base" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="data"> |
| <dt id="airflow.models.ID_LEN"> |
| <code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">ID_LEN</code><em class="property"> = 250</em><a class="reference internal" href="../../../_modules/airflow/models/base.html#ID_LEN"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.ID_LEN" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.BaseOperator"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</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=configuration.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=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=configuration.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" 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="#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. 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.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> |
| <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.7)"><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.template_fields"> |
| <code class="sig-name descname">template_fields</code><em class="property"> :Iterable[str] = []</em><a class="headerlink" href="#airflow.models.BaseOperator.template_fields" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseOperator.template_ext"> |
| <code class="sig-name descname">template_ext</code><em class="property"> :Iterable[str] = []</em><a class="headerlink" href="#airflow.models.BaseOperator.template_ext" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseOperator.ui_color"> |
| <code class="sig-name descname">ui_color</code><em class="property"> = #fff</em><a class="headerlink" href="#airflow.models.BaseOperator.ui_color" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseOperator.ui_fgcolor"> |
| <code class="sig-name descname">ui_fgcolor</code><em class="property"> = #000</em><a class="headerlink" href="#airflow.models.BaseOperator.ui_fgcolor" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseOperator._base_operator_shallow_copy_attrs"> |
| <code class="sig-name descname">_base_operator_shallow_copy_attrs</code><em class="property"> = ['user_defined_macros', 'user_defined_filters', 'params', '_log']</em><a class="headerlink" href="#airflow.models.BaseOperator._base_operator_shallow_copy_attrs" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseOperator.shallow_copy_attrs"> |
| <code class="sig-name descname">shallow_copy_attrs</code><em class="property"> :Iterable[str] = []</em><a class="headerlink" href="#airflow.models.BaseOperator.shallow_copy_attrs" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseOperator.operator_extra_links"> |
| <code class="sig-name descname">operator_extra_links</code><em class="property"> :Iterable[BaseOperatorLink] = []</em><a class="headerlink" href="#airflow.models.BaseOperator.operator_extra_links" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseOperator._comps"> |
| <code class="sig-name descname">_comps</code><a class="headerlink" href="#airflow.models.BaseOperator._comps" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseOperator.dag"> |
| <code class="sig-name descname">dag</code><a class="headerlink" href="#airflow.models.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.dag_id"> |
| <code class="sig-name descname">dag_id</code><a class="headerlink" href="#airflow.models.BaseOperator.dag_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseOperator.deps"> |
| <code class="sig-name descname">deps</code><a class="headerlink" href="#airflow.models.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.schedule_interval"> |
| <code class="sig-name descname">schedule_interval</code><a class="headerlink" href="#airflow.models.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.priority_weight_total"> |
| <code class="sig-name descname">priority_weight_total</code><a class="headerlink" href="#airflow.models.BaseOperator.priority_weight_total" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseOperator.upstream_list"> |
| <code class="sig-name descname">upstream_list</code><a class="headerlink" href="#airflow.models.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.upstream_task_ids"> |
| <code class="sig-name descname">upstream_task_ids</code><a class="headerlink" href="#airflow.models.BaseOperator.upstream_task_ids" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseOperator.downstream_list"> |
| <code class="sig-name descname">downstream_list</code><a class="headerlink" href="#airflow.models.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.downstream_task_ids"> |
| <code class="sig-name descname">downstream_task_ids</code><a class="headerlink" href="#airflow.models.BaseOperator.downstream_task_ids" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseOperator.task_type"> |
| <code class="sig-name descname">task_type</code><a class="headerlink" href="#airflow.models.BaseOperator.task_type" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.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="headerlink" href="#airflow.models.BaseOperator.__eq__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.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="headerlink" href="#airflow.models.BaseOperator.__ne__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.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="headerlink" href="#airflow.models.BaseOperator.__lt__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.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="headerlink" href="#airflow.models.BaseOperator.__hash__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.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="headerlink" href="#airflow.models.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.__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="headerlink" href="#airflow.models.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.__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="headerlink" href="#airflow.models.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.__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="headerlink" href="#airflow.models.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.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="headerlink" href="#airflow.models.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.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="headerlink" href="#airflow.models.BaseOperator.operator_extra_link_dict" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.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="headerlink" href="#airflow.models.BaseOperator.global_operator_extra_link_dict" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.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="headerlink" href="#airflow.models.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.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="headerlink" href="#airflow.models.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.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="headerlink" href="#airflow.models.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.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="headerlink" href="#airflow.models.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.__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="headerlink" href="#airflow.models.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.__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="headerlink" href="#airflow.models.BaseOperator.__getstate__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.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="headerlink" href="#airflow.models.BaseOperator.__setstate__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.BaseOperator.render_template_from_field"> |
| <code class="sig-name descname">render_template_from_field</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">attr</em>, <em class="sig-param">content</em>, <em class="sig-param">context</em>, <em class="sig-param">jinja_env</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.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.models.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">attr</em>, <em class="sig-param">content</em>, <em class="sig-param">context</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.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.models.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="headerlink" href="#airflow.models.BaseOperator.get_template_env" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.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="headerlink" href="#airflow.models.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.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="headerlink" href="#airflow.models.BaseOperator.resolve_template_files" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.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="headerlink" href="#airflow.models.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.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="headerlink" href="#airflow.models.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.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="headerlink" href="#airflow.models.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.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="headerlink" href="#airflow.models.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.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="headerlink" href="#airflow.models.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.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="headerlink" href="#airflow.models.BaseOperator.dry_run" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.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="headerlink" href="#airflow.models.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.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="headerlink" href="#airflow.models.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.__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="headerlink" href="#airflow.models.BaseOperator.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.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="headerlink" href="#airflow.models.BaseOperator.add_only_new" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.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="headerlink" href="#airflow.models.BaseOperator._set_relatives" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.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="headerlink" href="#airflow.models.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.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="headerlink" href="#airflow.models.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.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="headerlink" href="#airflow.models.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.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="headerlink" href="#airflow.models.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.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="headerlink" href="#airflow.models.BaseOperator.extra_links" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.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="headerlink" href="#airflow.models.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. |
| :raise ValueError: The error message of a ValueError will be passed on through to |
| the fronted to show up as a tooltip on the disabled link |
| :param dttm: The datetime parsed execution date for the URL being searched for |
| :param link_name: The name of the link we’re looking for the URL for. Should be |
| one of the options specified in <cite>extra_links</cite> |
| :return: A URL</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.Connection"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">Connection</code><span class="sig-paren">(</span><em class="sig-param">conn_id=None</em>, <em class="sig-param">conn_type=None</em>, <em class="sig-param">host=None</em>, <em class="sig-param">login=None</em>, <em class="sig-param">password=None</em>, <em class="sig-param">schema=None</em>, <em class="sig-param">port=None</em>, <em class="sig-param">extra=None</em>, <em class="sig-param">uri=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models/connection.html#Connection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.Connection" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.LoggingMixin</span></code></p> |
| <p>Placeholder to store information about different database instances |
| connection information. The idea here is that scripts use references to |
| database instances (conn_id) instead of hard coding hostname, logins and |
| passwords when using operators or hooks.</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.Connection.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = connection</em><a class="headerlink" href="#airflow.models.Connection.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Connection.id"> |
| <code class="sig-name descname">id</code><a class="headerlink" href="#airflow.models.Connection.id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Connection.conn_id"> |
| <code class="sig-name descname">conn_id</code><a class="headerlink" href="#airflow.models.Connection.conn_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Connection.conn_type"> |
| <code class="sig-name descname">conn_type</code><a class="headerlink" href="#airflow.models.Connection.conn_type" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Connection.host"> |
| <code class="sig-name descname">host</code><a class="headerlink" href="#airflow.models.Connection.host" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Connection.schema"> |
| <code class="sig-name descname">schema</code><a class="headerlink" href="#airflow.models.Connection.schema" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Connection.login"> |
| <code class="sig-name descname">login</code><a class="headerlink" href="#airflow.models.Connection.login" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Connection._password"> |
| <code class="sig-name descname">_password</code><a class="headerlink" href="#airflow.models.Connection._password" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Connection.port"> |
| <code class="sig-name descname">port</code><a class="headerlink" href="#airflow.models.Connection.port" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Connection.is_encrypted"> |
| <code class="sig-name descname">is_encrypted</code><a class="headerlink" href="#airflow.models.Connection.is_encrypted" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Connection.is_extra_encrypted"> |
| <code class="sig-name descname">is_extra_encrypted</code><a class="headerlink" href="#airflow.models.Connection.is_extra_encrypted" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Connection._extra"> |
| <code class="sig-name descname">_extra</code><a class="headerlink" href="#airflow.models.Connection._extra" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Connection._types"> |
| <code class="sig-name descname">_types</code><em class="property"> = [['docker', 'Docker Registry'], ['fs', 'File (path)'], ['ftp', 'FTP'], ['google_cloud_platform', 'Google Cloud Platform'], ['hdfs', 'HDFS'], ['http', 'HTTP'], ['pig_cli', 'Pig Client Wrapper'], ['hive_cli', 'Hive Client Wrapper'], ['hive_metastore', 'Hive Metastore Thrift'], ['hiveserver2', 'Hive Server 2 Thrift'], ['jdbc', 'Jdbc Connection'], ['jenkins', 'Jenkins'], ['mysql', 'MySQL'], ['postgres', 'Postgres'], ['oracle', 'Oracle'], ['vertica', 'Vertica'], ['presto', 'Presto'], ['s3', 'S3'], ['samba', 'Samba'], ['sqlite', 'Sqlite'], ['ssh', 'SSH'], ['cloudant', 'IBM Cloudant'], ['mssql', 'Microsoft SQL Server'], ['mesos_framework-id', 'Mesos Framework ID'], ['jira', 'JIRA'], ['redis', 'Redis'], ['wasb', 'Azure Blob Storage'], ['databricks', 'Databricks'], ['aws', 'Amazon Web Services'], ['emr', 'Elastic MapReduce'], ['snowflake', 'Snowflake'], ['segment', 'Segment'], ['azure_data_lake', 'Azure Data Lake'], ['azure_container_instances', 'Azure Container Instances'], ['azure_cosmos', 'Azure CosmosDB'], ['cassandra', 'Cassandra'], ['qubole', 'Qubole'], ['mongo', 'MongoDB'], ['gcpcloudsql', 'Google Cloud SQL'], ['grpc', 'GRPC Connection']]</em><a class="headerlink" href="#airflow.models.Connection._types" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Connection.password"> |
| <code class="sig-name descname">password</code><a class="headerlink" href="#airflow.models.Connection.password" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Connection.extra"> |
| <code class="sig-name descname">extra</code><a class="headerlink" href="#airflow.models.Connection.extra" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Connection.extra_dejson"> |
| <code class="sig-name descname">extra_dejson</code><a class="headerlink" href="#airflow.models.Connection.extra_dejson" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the extra property by deserializing json.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Connection.parse_from_uri"> |
| <code class="sig-name descname">parse_from_uri</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">uri</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Connection.parse_from_uri" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Connection.get_password"> |
| <code class="sig-name descname">get_password</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Connection.get_password" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Connection.set_password"> |
| <code class="sig-name descname">set_password</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">value</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Connection.set_password" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Connection.get_extra"> |
| <code class="sig-name descname">get_extra</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Connection.get_extra" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Connection.set_extra"> |
| <code class="sig-name descname">set_extra</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">value</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Connection.set_extra" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Connection.rotate_fernet_key"> |
| <code class="sig-name descname">rotate_fernet_key</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Connection.rotate_fernet_key" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Connection.get_hook"> |
| <code class="sig-name descname">get_hook</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Connection.get_hook" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Connection.__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="headerlink" href="#airflow.models.Connection.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Connection.debug_info"> |
| <code class="sig-name descname">debug_info</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Connection.debug_info" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.DAG"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">DAG</code><span class="sig-paren">(</span><em class="sig-param">dag_id</em>, <em class="sig-param">description=''</em>, <em class="sig-param">schedule_interval=timedelta(days=1)</em>, <em class="sig-param">start_date=None</em>, <em class="sig-param">end_date=None</em>, <em class="sig-param">full_filepath=None</em>, <em class="sig-param">template_searchpath=None</em>, <em class="sig-param">template_undefined=jinja2.Undefined</em>, <em class="sig-param">user_defined_macros=None</em>, <em class="sig-param">user_defined_filters=None</em>, <em class="sig-param">default_args=None</em>, <em class="sig-param">concurrency=configuration.conf.getint('core'</em>, <em class="sig-param">'dag_concurrency')</em>, <em class="sig-param">max_active_runs=configuration.conf.getint('core'</em>, <em class="sig-param">'max_active_runs_per_dag')</em>, <em class="sig-param">dagrun_timeout=None</em>, <em class="sig-param">sla_miss_callback=None</em>, <em class="sig-param">default_view=None</em>, <em class="sig-param">orientation=configuration.conf.get('webserver'</em>, <em class="sig-param">'dag_orientation')</em>, <em class="sig-param">catchup=configuration.conf.getboolean('scheduler'</em>, <em class="sig-param">'catchup_by_default')</em>, <em class="sig-param">on_success_callback=None</em>, <em class="sig-param">on_failure_callback=None</em>, <em class="sig-param">doc_md=None</em>, <em class="sig-param">params=None</em>, <em class="sig-param">access_control=None</em>, <em class="sig-param">is_paused_upon_creation=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models/dag.html#DAG"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.DAG" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.dag.base_dag.BaseDag</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.utils.log.logging_mixin.LoggingMixin</span></code></p> |
| <p>A dag (directed acyclic graph) is a collection of tasks with directional |
| dependencies. A dag also has a schedule, a start date and an end date |
| (optional). For each schedule, (say daily or hourly), the DAG needs to run |
| each individual tasks as their dependencies are met. Certain tasks have |
| the property of depending on their own past, meaning that they can’t run |
| until their previous schedule (and upstream tasks) are completed.</p> |
| <p>DAGs essentially act as namespaces for tasks. A task_id can only be |
| added once to a DAG.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>dag_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>) – The id of the DAG</p></li> |
| <li><p><strong>description</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 description for the DAG to e.g. be shown on the webserver</p></li> |
| <li><p><strong>schedule_interval</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><em> or |
| </em><em>dateutil.relativedelta.relativedelta</em><em> or </em><em>str that acts as a cron |
| expression</em>) – Defines how often that DAG runs, this |
| timedelta object gets added to your latest task instance’s |
| execution_date to figure out the next schedule</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 timestamp from which the scheduler will |
| attempt to backfill</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>) – A date beyond which your DAG won’t run, leave to None |
| for open ended scheduling</p></li> |
| <li><p><strong>template_searchpath</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><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.7)"><em>list</em></a><em>[</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a><em>]</em>) – This list of folders (non relative) |
| defines where jinja will look for your templates. Order matters. |
| Note that jinja/airflow includes the path of your DAG file by |
| default</p></li> |
| <li><p><strong>template_undefined</strong> (<em>jinja2.Undefined</em>) – Template undefined type.</p></li> |
| <li><p><strong>user_defined_macros</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 dictionary of macros that will be exposed |
| in your jinja templates. For example, passing <code class="docutils literal notranslate"><span class="pre">dict(foo='bar')</span></code> |
| to this argument allows you to <code class="docutils literal notranslate"><span class="pre">{{</span> <span class="pre">foo</span> <span class="pre">}}</span></code> in all jinja |
| templates related to this DAG. Note that you can pass any |
| type of object here.</p></li> |
| <li><p><strong>user_defined_filters</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 dictionary of filters that will be exposed |
| in your jinja templates. For example, passing |
| <code class="docutils literal notranslate"><span class="pre">dict(hello=lambda</span> <span class="pre">name:</span> <span class="pre">'Hello</span> <span class="pre">%s'</span> <span class="pre">%</span> <span class="pre">name)</span></code> to this argument allows |
| you to <code class="docutils literal notranslate"><span class="pre">{{</span> <span class="pre">'world'</span> <span class="pre">|</span> <span class="pre">hello</span> <span class="pre">}}</span></code> in all jinja templates related to |
| this DAG.</p></li> |
| <li><p><strong>default_args</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 dictionary of default parameters to be used |
| as constructor keyword parameters when initialising operators. |
| Note that operators have the same hook, and precede those defined |
| here, meaning that if your dict contains <cite>‘depends_on_past’: True</cite> |
| here and <cite>‘depends_on_past’: False</cite> in the operator’s call |
| <cite>default_args</cite>, the actual value will be <cite>False</cite>.</p></li> |
| <li><p><strong>params</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 dictionary of DAG level parameters that are made |
| accessible in templates, namespaced under <cite>params</cite>. These |
| params can be overridden at the task level.</p></li> |
| <li><p><strong>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>) – the number of task instances allowed to run |
| concurrently</p></li> |
| <li><p><strong>max_active_runs</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><em>int</em></a>) – maximum number of active DAG runs, beyond this |
| number of DAG runs in a running state, the scheduler won’t create |
| new active DAG runs</p></li> |
| <li><p><strong>dagrun_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>) – specify how long a DagRun should be up before |
| timing out / failing, so that new DagRuns can be created. The timeout |
| is only enforced for scheduled DagRuns, and only once the |
| # of active DagRuns == max_active_runs.</p></li> |
| <li><p><strong>sla_miss_callback</strong> (<em>types.FunctionType</em>) – specify a function to call when reporting SLA |
| timeouts.</p></li> |
| <li><p><strong>default_view</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – Specify DAG default view (tree, graph, duration, |
| gantt, landing_times)</p></li> |
| <li><p><strong>orientation</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – Specify DAG orientation in graph view (LR, TB, RL, BT)</p></li> |
| <li><p><strong>catchup</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Perform scheduler catchup (or only run latest)? Defaults to True</p></li> |
| <li><p><strong>on_failure_callback</strong> (<em>callable</em>) – A function to be called when a DagRun of this dag fails. |
| A context dictionary is passed as a single parameter to this function.</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 dag succeeds.</p></li> |
| <li><p><strong>access_control</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)"><em>dict</em></a>) – Specify optional DAG-level permissions, e.g., |
| “{‘role1’: {‘can_dag_read’}, ‘role2’: {‘can_dag_read’, ‘can_dag_edit’}}”</p></li> |
| <li><p><strong>is_paused_upon_creation</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a><em> or </em><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.7)"><em>None</em></a>) – Specifies if the dag is paused when created for the first time. |
| If the dag exists already, this flag will be ignored. If this optional parameter |
| is not specified, the global config setting will be used.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG._comps"> |
| <code class="sig-name descname">_comps</code><a class="headerlink" href="#airflow.models.DAG._comps" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.dag_id"> |
| <code class="sig-name descname">dag_id</code><a class="headerlink" href="#airflow.models.DAG.dag_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.full_filepath"> |
| <code class="sig-name descname">full_filepath</code><a class="headerlink" href="#airflow.models.DAG.full_filepath" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.concurrency"> |
| <code class="sig-name descname">concurrency</code><a class="headerlink" href="#airflow.models.DAG.concurrency" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.access_control"> |
| <code class="sig-name descname">access_control</code><a class="headerlink" href="#airflow.models.DAG.access_control" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.description"> |
| <code class="sig-name descname">description</code><a class="headerlink" href="#airflow.models.DAG.description" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.pickle_id"> |
| <code class="sig-name descname">pickle_id</code><a class="headerlink" href="#airflow.models.DAG.pickle_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.tasks"> |
| <code class="sig-name descname">tasks</code><a class="headerlink" href="#airflow.models.DAG.tasks" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.task_ids"> |
| <code class="sig-name descname">task_ids</code><a class="headerlink" href="#airflow.models.DAG.task_ids" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.filepath"> |
| <code class="sig-name descname">filepath</code><a class="headerlink" href="#airflow.models.DAG.filepath" title="Permalink to this definition">¶</a></dt> |
| <dd><p>File location of where the dag object is instantiated</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.folder"> |
| <code class="sig-name descname">folder</code><a class="headerlink" href="#airflow.models.DAG.folder" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Folder location of where the dag object is instantiated</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.owner"> |
| <code class="sig-name descname">owner</code><a class="headerlink" href="#airflow.models.DAG.owner" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Return list of all owners found in DAG tasks.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>Comma separated list of owners in DAG tasks</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)">str</a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.concurrency_reached"> |
| <code class="sig-name descname">concurrency_reached</code><a class="headerlink" href="#airflow.models.DAG.concurrency_reached" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a boolean indicating whether the concurrency limit for this DAG |
| has been reached</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.is_paused"> |
| <code class="sig-name descname">is_paused</code><a class="headerlink" href="#airflow.models.DAG.is_paused" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a boolean indicating whether this DAG is paused</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.latest_execution_date"> |
| <code class="sig-name descname">latest_execution_date</code><a class="headerlink" href="#airflow.models.DAG.latest_execution_date" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the latest date for which at least one dag run exists</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.subdags"> |
| <code class="sig-name descname">subdags</code><a class="headerlink" href="#airflow.models.DAG.subdags" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a list of the subdag objects associated to this DAG</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.roots"> |
| <code class="sig-name descname">roots</code><a class="headerlink" href="#airflow.models.DAG.roots" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.__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="headerlink" href="#airflow.models.DAG.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.__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="headerlink" href="#airflow.models.DAG.__eq__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.__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="headerlink" href="#airflow.models.DAG.__ne__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.__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="headerlink" href="#airflow.models.DAG.__lt__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.__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="headerlink" href="#airflow.models.DAG.__hash__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.__enter__"> |
| <code class="sig-name descname">__enter__</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.__enter__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.__exit__"> |
| <code class="sig-name descname">__exit__</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">_type</em>, <em class="sig-param">_value</em>, <em class="sig-param">_tb</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.__exit__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.get_default_view"> |
| <code class="sig-name descname">get_default_view</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.get_default_view" title="Permalink to this definition">¶</a></dt> |
| <dd><p>This is only there for backward compatible jinja2 templates</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.date_range"> |
| <code class="sig-name descname">date_range</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">start_date</em>, <em class="sig-param">num=None</em>, <em class="sig-param">end_date=timezone.utcnow()</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.date_range" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.is_fixed_time_schedule"> |
| <code class="sig-name descname">is_fixed_time_schedule</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.is_fixed_time_schedule" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Figures out if the DAG schedule has a fixed time (e.g. 3 AM).</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>True if the schedule has a fixed time, False if not.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.following_schedule"> |
| <code class="sig-name descname">following_schedule</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">dttm</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.following_schedule" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Calculates the following schedule for this dag in UTC.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>dttm</strong> – utc datetime</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>utc datetime</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.previous_schedule"> |
| <code class="sig-name descname">previous_schedule</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">dttm</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.previous_schedule" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Calculates the previous schedule for this dag in UTC</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>dttm</strong> – utc datetime</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>utc datetime</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.get_run_dates"> |
| <code class="sig-name descname">get_run_dates</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">start_date</em>, <em class="sig-param">end_date=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.get_run_dates" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a list of dates between the interval received as parameter using this |
| dag’s schedule interval. Returned dates can be used for execution dates.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>start_date</strong> (<em>datetime</em>) – the start date of the interval</p></li> |
| <li><p><strong>end_date</strong> (<em>datetime</em>) – the end date of the interval, defaults to timezone.utcnow()</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>a list of dates within the interval following the dag’s schedule</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.7)">list</a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.normalize_schedule"> |
| <code class="sig-name descname">normalize_schedule</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">dttm</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.normalize_schedule" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns dttm + interval unless dttm is first interval then it returns dttm</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.get_last_dagrun"> |
| <code class="sig-name descname">get_last_dagrun</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session=None</em>, <em class="sig-param">include_externally_triggered=False</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.get_last_dagrun" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG._get_concurrency_reached"> |
| <code class="sig-name descname">_get_concurrency_reached</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG._get_concurrency_reached" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG._get_is_paused"> |
| <code class="sig-name descname">_get_is_paused</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG._get_is_paused" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.handle_callback"> |
| <code class="sig-name descname">handle_callback</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">dagrun</em>, <em class="sig-param">success=True</em>, <em class="sig-param">reason=None</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.handle_callback" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Triggers the appropriate callback depending on the value of success, namely the |
| on_failure_callback or on_success_callback. This method gets the context of a |
| single TaskInstance part of this DagRun and passes that to the callable along |
| with a ‘reason’, primarily to differentiate DagRun failures.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>dagrun</strong> – DagRun object</p></li> |
| <li><p><strong>success</strong> – Flag to specify if failure or success callback should be called</p></li> |
| <li><p><strong>reason</strong> – Completion reason</p></li> |
| <li><p><strong>session</strong> – Database session</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.get_active_runs"> |
| <code class="sig-name descname">get_active_runs</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.get_active_runs" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a list of dag run execution dates currently running</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>List of execution dates</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.get_num_active_runs"> |
| <code class="sig-name descname">get_num_active_runs</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">external_trigger=None</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.get_num_active_runs" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the number of active “running” dag runs</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>external_trigger</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – True for externally triggered active dag runs</p></li> |
| <li><p><strong>session</strong> – </p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>number greater than 0 for active dag runs</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.get_dagrun"> |
| <code class="sig-name descname">get_dagrun</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">execution_date</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.get_dagrun" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the dag run for a given execution date if it exists, otherwise |
| none.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>execution_date</strong> – The execution date of the DagRun to find.</p></li> |
| <li><p><strong>session</strong> – </p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>The DagRun if found, otherwise None.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.get_dagruns_between"> |
| <code class="sig-name descname">get_dagruns_between</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">start_date</em>, <em class="sig-param">end_date</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.get_dagruns_between" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the list of dag runs between start_date (inclusive) and end_date (inclusive).</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>start_date</strong> – The starting execution date of the DagRun to find.</p></li> |
| <li><p><strong>end_date</strong> – The ending execution date of the DagRun to find.</p></li> |
| <li><p><strong>session</strong> – </p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>The list of DagRuns found.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG._get_latest_execution_date"> |
| <code class="sig-name descname">_get_latest_execution_date</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG._get_latest_execution_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.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="headerlink" href="#airflow.models.DAG.resolve_template_files" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.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="headerlink" href="#airflow.models.DAG.get_template_env" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a jinja2 Environment while taking into account the DAGs |
| template_searchpath, user_defined_macros and user_defined_filters</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.set_dependency"> |
| <code class="sig-name descname">set_dependency</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">upstream_task_id</em>, <em class="sig-param">downstream_task_id</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.set_dependency" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Simple utility method to set dependency between two tasks that |
| already have been added to the DAG using add_task()</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.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">state=None</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.get_task_instances" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.topological_sort"> |
| <code class="sig-name descname">topological_sort</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.topological_sort" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sorts tasks in topographical order, such that a task comes after any of its |
| upstream dependencies.</p> |
| <p>Heavily inspired by: |
| <a class="reference external" href="http://blog.jupo.org/2012/04/06/topological-sorting-acyclic-directed-graphs/">http://blog.jupo.org/2012/04/06/topological-sorting-acyclic-directed-graphs/</a></p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>list of tasks in topological order</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.set_dag_runs_state"> |
| <code class="sig-name descname">set_dag_runs_state</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">state=State.RUNNING</em>, <em class="sig-param">session=None</em>, <em class="sig-param">start_date=None</em>, <em class="sig-param">end_date=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.set_dag_runs_state" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.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">only_failed=False</em>, <em class="sig-param">only_running=False</em>, <em class="sig-param">confirm_prompt=False</em>, <em class="sig-param">include_subdags=True</em>, <em class="sig-param">include_parentdag=True</em>, <em class="sig-param">reset_dag_runs=True</em>, <em class="sig-param">dry_run=False</em>, <em class="sig-param">session=None</em>, <em class="sig-param">get_tis=False</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.clear" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Clears a set of task instances associated with the current dag for |
| a specified date range.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.clear_dags"> |
| <em class="property">classmethod </em><code class="sig-name descname">clear_dags</code><span class="sig-paren">(</span><em class="sig-param">cls</em>, <em class="sig-param">dags</em>, <em class="sig-param">start_date=None</em>, <em class="sig-param">end_date=None</em>, <em class="sig-param">only_failed=False</em>, <em class="sig-param">only_running=False</em>, <em class="sig-param">confirm_prompt=False</em>, <em class="sig-param">include_subdags=True</em>, <em class="sig-param">include_parentdag=False</em>, <em class="sig-param">reset_dag_runs=True</em>, <em class="sig-param">dry_run=False</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.clear_dags" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.__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="headerlink" href="#airflow.models.DAG.__deepcopy__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.sub_dag"> |
| <code class="sig-name descname">sub_dag</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">task_regex</em>, <em class="sig-param">include_downstream=False</em>, <em class="sig-param">include_upstream=True</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.sub_dag" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a subset of the current dag as a deep copy of the current dag |
| based on a regex that should match one or many tasks, and includes |
| upstream and downstream neighbours based on the flag passed.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.has_task"> |
| <code class="sig-name descname">has_task</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">task_id</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.has_task" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.get_task"> |
| <code class="sig-name descname">get_task</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">task_id</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.get_task" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.pickle_info"> |
| <code class="sig-name descname">pickle_info</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.pickle_info" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.pickle"> |
| <code class="sig-name descname">pickle</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.pickle" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.tree_view"> |
| <code class="sig-name descname">tree_view</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.tree_view" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Shows an ascii tree representation of the DAG</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.add_task"> |
| <code class="sig-name descname">add_task</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">task</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.add_task" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Add a task to the DAG</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>task</strong> (<em>task</em>) – the task you want to add</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.add_tasks"> |
| <code class="sig-name descname">add_tasks</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">tasks</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.add_tasks" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Add a list of tasks to the DAG</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>tasks</strong> (<em>list of tasks</em>) – a lit of tasks you want to add</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.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">mark_success=False</em>, <em class="sig-param">local=False</em>, <em class="sig-param">executor=None</em>, <em class="sig-param">donot_pickle=configuration.conf.getboolean('core'</em>, <em class="sig-param">'donot_pickle')</em>, <em class="sig-param">ignore_task_deps=False</em>, <em class="sig-param">ignore_first_depends_on_past=False</em>, <em class="sig-param">pool=None</em>, <em class="sig-param">delay_on_limit_secs=1.0</em>, <em class="sig-param">verbose=False</em>, <em class="sig-param">conf=None</em>, <em class="sig-param">rerun_failed_tasks=False</em>, <em class="sig-param">run_backwards=False</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.run" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Runs the DAG.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <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 start date of the range to run</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>) – the end date of the range to run</p></li> |
| <li><p><strong>mark_success</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – True to mark jobs as succeeded without running them</p></li> |
| <li><p><strong>local</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – True to run the tasks using the LocalExecutor</p></li> |
| <li><p><strong>executor</strong> (<em>airflow.executor.BaseExecutor</em>) – The executor instance to run the tasks</p></li> |
| <li><p><strong>donot_pickle</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – True to avoid pickling DAG object and send to workers</p></li> |
| <li><p><strong>ignore_task_deps</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – True to skip upstream tasks</p></li> |
| <li><p><strong>ignore_first_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>) – True to ignore depends_on_past |
| dependencies for the first set of tasks only</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>) – Resource pool to use</p></li> |
| <li><p><strong>delay_on_limit_secs</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.7)"><em>float</em></a>) – Time in seconds to wait before next attempt to run |
| dag run when max_active_runs limit has been reached</p></li> |
| <li><p><strong>verbose</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Make logging output more verbose</p></li> |
| <li><p><strong>conf</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)"><em>dict</em></a>) – user defined dictionary passed from CLI</p></li> |
| <li><p><strong>rerun_failed_tasks</strong> – </p></li> |
| <li><p><strong>run_backwards</strong> – </p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Type</dt> |
| <dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)">bool</a></p> |
| </dd> |
| <dt class="field-odd">Type</dt> |
| <dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)">bool</a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.cli"> |
| <code class="sig-name descname">cli</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.cli" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Exposes a CLI specific to this DAG</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.create_dagrun"> |
| <code class="sig-name descname">create_dagrun</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">run_id</em>, <em class="sig-param">state</em>, <em class="sig-param">execution_date=None</em>, <em class="sig-param">start_date=None</em>, <em class="sig-param">external_trigger=False</em>, <em class="sig-param">conf=None</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.create_dagrun" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Creates a dag run from this dag including the tasks associated with this dag. |
| Returns the dag run.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>run_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>) – defines the the run id for this dag run</p></li> |
| <li><p><strong>execution_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 execution date of this dag run</p></li> |
| <li><p><strong>state</strong> (<em>airflow.utils.state.State</em>) – the state of the dag run</p></li> |
| <li><p><strong>start_date</strong> (<em>datetime</em>) – the date this dag run should be evaluated</p></li> |
| <li><p><strong>external_trigger</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – whether this dag run is externally triggered</p></li> |
| <li><p><strong>session</strong> (<a class="reference external" href="https://docs.sqlalchemy.org/en/13/orm/session_api.html#sqlalchemy.orm.session.Session" title="(in SQLAlchemy v1.3)"><em>sqlalchemy.orm.session.Session</em></a>) – database session</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.sync_to_db"> |
| <code class="sig-name descname">sync_to_db</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">owner=None</em>, <em class="sig-param">sync_time=None</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.sync_to_db" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Save attributes about this DAG to the DB. Note that this method |
| can be called for both DAGs and SubDAGs. A SubDag is actually a |
| SubDagOperator.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>dag</strong> (<a class="reference internal" href="#airflow.models.DAG" title="airflow.models.DAG"><em>airflow.models.DAG</em></a>) – the DAG object to save to the DB</p></li> |
| <li><p><strong>sync_time</strong> (<em>datetime</em>) – The time that the DAG should be marked as sync’ed</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>None</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.deactivate_unknown_dags"> |
| <em class="property">static </em><code class="sig-name descname">deactivate_unknown_dags</code><span class="sig-paren">(</span><em class="sig-param">active_dag_ids</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.deactivate_unknown_dags" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Given a list of known DAGs, deactivate any other DAGs that are |
| marked as active in the ORM</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>active_dag_ids</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.7)"><em>list</em></a><em>[</em><em>unicode</em><em>]</em>) – list of DAG IDs that are active</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>None</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.deactivate_stale_dags"> |
| <em class="property">static </em><code class="sig-name descname">deactivate_stale_dags</code><span class="sig-paren">(</span><em class="sig-param">expiration_date</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.deactivate_stale_dags" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Deactivate any DAGs that were last touched by the scheduler before |
| the expiration date. These DAGs were likely deleted.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>expiration_date</strong> (<em>datetime</em>) – set inactive DAGs that were touched before this |
| time</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>None</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.get_num_task_instances"> |
| <em class="property">static </em><code class="sig-name descname">get_num_task_instances</code><span class="sig-paren">(</span><em class="sig-param">dag_id</em>, <em class="sig-param">task_ids=None</em>, <em class="sig-param">states=None</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.get_num_task_instances" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the number of task instances in the given DAG.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>session</strong> – ORM session</p></li> |
| <li><p><strong>dag_id</strong> (<em>unicode</em>) – ID of the DAG to get the task concurrency of</p></li> |
| <li><p><strong>task_ids</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.7)"><em>list</em></a><em>[</em><em>unicode</em><em>]</em>) – A list of valid task IDs for the given DAG</p></li> |
| <li><p><strong>states</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.7)"><em>list</em></a><em>[</em><em>state</em><em>]</em>) – A list of states to filter by if supplied</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>The number of running tasks</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)">int</a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.test_cycle"> |
| <code class="sig-name descname">test_cycle</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG.test_cycle" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Check to see if there are any cycles in the DAG. Returns False if no cycle found, |
| otherwise raises exception.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG._test_cycle_helper"> |
| <code class="sig-name descname">_test_cycle_helper</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">visit_map</em>, <em class="sig-param">task_id</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DAG._test_cycle_helper" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Checks if a cycle exists from the input task using DFS traversal</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.DagModel"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">DagModel</code><a class="reference internal" href="../../../_modules/airflow/models/dag.html#DagModel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.DagModel" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a></p> |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = dag</em><a class="headerlink" href="#airflow.models.DagModel.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd><p>These items are stored in the database for state related information</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.dag_id"> |
| <code class="sig-name descname">dag_id</code><a class="headerlink" href="#airflow.models.DagModel.dag_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.is_paused_at_creation"> |
| <code class="sig-name descname">is_paused_at_creation</code><a class="headerlink" href="#airflow.models.DagModel.is_paused_at_creation" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.is_paused"> |
| <code class="sig-name descname">is_paused</code><a class="headerlink" href="#airflow.models.DagModel.is_paused" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.is_subdag"> |
| <code class="sig-name descname">is_subdag</code><a class="headerlink" href="#airflow.models.DagModel.is_subdag" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.is_active"> |
| <code class="sig-name descname">is_active</code><a class="headerlink" href="#airflow.models.DagModel.is_active" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.last_scheduler_run"> |
| <code class="sig-name descname">last_scheduler_run</code><a class="headerlink" href="#airflow.models.DagModel.last_scheduler_run" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.last_pickled"> |
| <code class="sig-name descname">last_pickled</code><a class="headerlink" href="#airflow.models.DagModel.last_pickled" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.last_expired"> |
| <code class="sig-name descname">last_expired</code><a class="headerlink" href="#airflow.models.DagModel.last_expired" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.scheduler_lock"> |
| <code class="sig-name descname">scheduler_lock</code><a class="headerlink" href="#airflow.models.DagModel.scheduler_lock" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.pickle_id"> |
| <code class="sig-name descname">pickle_id</code><a class="headerlink" href="#airflow.models.DagModel.pickle_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.fileloc"> |
| <code class="sig-name descname">fileloc</code><a class="headerlink" href="#airflow.models.DagModel.fileloc" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.owners"> |
| <code class="sig-name descname">owners</code><a class="headerlink" href="#airflow.models.DagModel.owners" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.description"> |
| <code class="sig-name descname">description</code><a class="headerlink" href="#airflow.models.DagModel.description" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.default_view"> |
| <code class="sig-name descname">default_view</code><a class="headerlink" href="#airflow.models.DagModel.default_view" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.schedule_interval"> |
| <code class="sig-name descname">schedule_interval</code><a class="headerlink" href="#airflow.models.DagModel.schedule_interval" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.timezone"> |
| <code class="sig-name descname">timezone</code><a class="headerlink" href="#airflow.models.DagModel.timezone" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagModel.safe_dag_id"> |
| <code class="sig-name descname">safe_dag_id</code><a class="headerlink" href="#airflow.models.DagModel.safe_dag_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagModel.__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="headerlink" href="#airflow.models.DagModel.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagModel.get_dagmodel"> |
| <em class="property">static </em><code class="sig-name descname">get_dagmodel</code><span class="sig-paren">(</span><em class="sig-param">dag_id</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagModel.get_dagmodel" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagModel.get_current"> |
| <em class="property">classmethod </em><code class="sig-name descname">get_current</code><span class="sig-paren">(</span><em class="sig-param">cls</em>, <em class="sig-param">dag_id</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagModel.get_current" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagModel.get_default_view"> |
| <code class="sig-name descname">get_default_view</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagModel.get_default_view" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagModel.get_last_dagrun"> |
| <code class="sig-name descname">get_last_dagrun</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session=None</em>, <em class="sig-param">include_externally_triggered=False</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagModel.get_last_dagrun" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagModel.get_dag"> |
| <code class="sig-name descname">get_dag</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagModel.get_dag" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagModel.create_dagrun"> |
| <code class="sig-name descname">create_dagrun</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">run_id</em>, <em class="sig-param">state</em>, <em class="sig-param">execution_date</em>, <em class="sig-param">start_date=None</em>, <em class="sig-param">external_trigger=False</em>, <em class="sig-param">conf=None</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagModel.create_dagrun" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Creates a dag run from this dag including the tasks associated with this dag. |
| Returns the dag run.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>run_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>) – defines the the run id for this dag run</p></li> |
| <li><p><strong>execution_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 execution date of this dag run</p></li> |
| <li><p><strong>state</strong> (<em>airflow.utils.state.State</em>) – the state of the dag run</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 date this dag run should be evaluated</p></li> |
| <li><p><strong>external_trigger</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – whether this dag run is externally triggered</p></li> |
| <li><p><strong>session</strong> (<a class="reference external" href="https://docs.sqlalchemy.org/en/13/orm/session_api.html#sqlalchemy.orm.session.Session" title="(in SQLAlchemy v1.3)"><em>sqlalchemy.orm.session.Session</em></a>) – database session</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagModel.set_is_paused"> |
| <code class="sig-name descname">set_is_paused</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">is_paused</em>, <em class="sig-param">including_subdags=True</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagModel.set_is_paused" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Pause/Un-pause a DAG.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>is_paused</strong> – Is the DAG paused</p></li> |
| <li><p><strong>including_subdags</strong> – whether to include the DAG’s subdags</p></li> |
| <li><p><strong>session</strong> – session</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.DagBag"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">DagBag</code><span class="sig-paren">(</span><em class="sig-param">dag_folder=None</em>, <em class="sig-param">executor=None</em>, <em class="sig-param">include_examples=configuration.conf.getboolean('core'</em>, <em class="sig-param">'LOAD_EXAMPLES')</em>, <em class="sig-param">safe_mode=configuration.conf.getboolean('core'</em>, <em class="sig-param">'DAG_DISCOVERY_SAFE_MODE')</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models/dagbag.html#DagBag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.DagBag" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.dag.base_dag.BaseDagBag</span></code>, <code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.utils.log.logging_mixin.LoggingMixin</span></code></p> |
| <p>A dagbag is a collection of dags, parsed out of a folder tree and has high |
| level configuration settings, like what database to use as a backend and |
| what executor to use to fire off tasks. This makes it easier to run |
| distinct environments for say production and development, tests, or for |
| different teams or security profiles. What would have been system level |
| settings are now dagbag level so that one system can run multiple, |
| independent settings sets.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>dag_folder</strong> (<em>unicode</em>) – the folder to scan to find DAGs</p></li> |
| <li><p><strong>executor</strong> – the executor to use when executing task instances |
| in this DagBag</p></li> |
| <li><p><strong>include_examples</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – whether to include the examples that ship |
| with airflow or not</p></li> |
| <li><p><strong>has_logged</strong> – an instance boolean that gets flipped from False to True after a |
| file has been skipped. This is to prevent overloading the user with logging |
| messages about skipped files. Therefore only once per DagBag is a file logged |
| being skipped.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="attribute"> |
| <dt id="airflow.models.DagBag.CYCLE_NEW"> |
| <code class="sig-name descname">CYCLE_NEW</code><em class="property"> = 0</em><a class="headerlink" href="#airflow.models.DagBag.CYCLE_NEW" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagBag.CYCLE_IN_PROGRESS"> |
| <code class="sig-name descname">CYCLE_IN_PROGRESS</code><em class="property"> = 1</em><a class="headerlink" href="#airflow.models.DagBag.CYCLE_IN_PROGRESS" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagBag.CYCLE_DONE"> |
| <code class="sig-name descname">CYCLE_DONE</code><em class="property"> = 2</em><a class="headerlink" href="#airflow.models.DagBag.CYCLE_DONE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagBag.dag_ids"> |
| <code class="sig-name descname">dag_ids</code><a class="headerlink" href="#airflow.models.DagBag.dag_ids" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagBag.size"> |
| <code class="sig-name descname">size</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagBag.size" title="Permalink to this definition">¶</a></dt> |
| <dd><dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>the amount of dags contained in this dagbag</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagBag.get_dag"> |
| <code class="sig-name descname">get_dag</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">dag_id</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagBag.get_dag" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Gets the DAG out of the dictionary, and refreshes it if expired</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagBag.process_file"> |
| <code class="sig-name descname">process_file</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">filepath</em>, <em class="sig-param">only_if_updated=True</em>, <em class="sig-param">safe_mode=True</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagBag.process_file" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Given a path to a python module or zip file, this method imports |
| the module and look for dag objects within it.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagBag.kill_zombies"> |
| <code class="sig-name descname">kill_zombies</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagBag.kill_zombies" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Fail zombie tasks, which are tasks that haven’t |
| had a heartbeat for too long, in the current DagBag.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>session</strong> (<a class="reference external" href="https://docs.sqlalchemy.org/en/13/orm/session_api.html#sqlalchemy.orm.session.Session" title="(in SQLAlchemy v1.3)"><em>sqlalchemy.orm.session.Session</em></a>) – DB session.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagBag.bag_dag"> |
| <code class="sig-name descname">bag_dag</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">dag</em>, <em class="sig-param">parent_dag</em>, <em class="sig-param">root_dag</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagBag.bag_dag" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Adds the DAG into the bag, recurses into sub dags. |
| Throws AirflowDagCycleException if a cycle is detected in this dag or its subdags</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagBag.collect_dags"> |
| <code class="sig-name descname">collect_dags</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">dag_folder=None</em>, <em class="sig-param">only_if_updated=True</em>, <em class="sig-param">include_examples=configuration.conf.getboolean('core'</em>, <em class="sig-param">'LOAD_EXAMPLES')</em>, <em class="sig-param">safe_mode=configuration.conf.getboolean('core'</em>, <em class="sig-param">'DAG_DISCOVERY_SAFE_MODE')</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagBag.collect_dags" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Given a file path or a folder, this method looks for python modules, |
| imports them and adds them to the dagbag collection.</p> |
| <p>Note that if a <code class="docutils literal notranslate"><span class="pre">.airflowignore</span></code> file is found while processing |
| the directory, it will behave much like a <code class="docutils literal notranslate"><span class="pre">.gitignore</span></code>, |
| ignoring files that match any of the regex patterns specified |
| in the file.</p> |
| <p><strong>Note</strong>: The patterns in .airflowignore are treated as |
| un-anchored regexes, not shell-like glob patterns.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagBag.dagbag_report"> |
| <code class="sig-name descname">dagbag_report</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagBag.dagbag_report" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Prints a report around DagBag loading stats</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.DagPickle"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">DagPickle</code><span class="sig-paren">(</span><em class="sig-param">dag</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models/dagpickle.html#DagPickle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.DagPickle" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a></p> |
| <p>Dags can originate from different places (user repos, master repo, …) |
| and also get executed in different places (different executors). This |
| object represents a version of a DAG and becomes a source of truth for |
| a BackfillJob execution. A pickle is a native python serialized object, |
| and in this case gets stored in the database for the duration of the job.</p> |
| <p>The executors pick up the DagPickle id and read the dag definition from |
| the database.</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.DagPickle.id"> |
| <code class="sig-name descname">id</code><a class="headerlink" href="#airflow.models.DagPickle.id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagPickle.pickle"> |
| <code class="sig-name descname">pickle</code><a class="headerlink" href="#airflow.models.DagPickle.pickle" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagPickle.created_dttm"> |
| <code class="sig-name descname">created_dttm</code><a class="headerlink" href="#airflow.models.DagPickle.created_dttm" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagPickle.pickle_hash"> |
| <code class="sig-name descname">pickle_hash</code><a class="headerlink" href="#airflow.models.DagPickle.pickle_hash" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagPickle.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = dag_pickle</em><a class="headerlink" href="#airflow.models.DagPickle.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.DagRun"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">DagRun</code><a class="reference internal" href="../../../_modules/airflow/models/dagrun.html#DagRun"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.DagRun" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.utils.log.logging_mixin.LoggingMixin</span></code></p> |
| <p>DagRun describes an instance of a Dag. It can be created |
| by the scheduler (for regular runs) or by an external trigger</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.DagRun.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = dag_run</em><a class="headerlink" href="#airflow.models.DagRun.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagRun.ID_PREFIX"> |
| <code class="sig-name descname">ID_PREFIX</code><em class="property"> = scheduled__</em><a class="headerlink" href="#airflow.models.DagRun.ID_PREFIX" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagRun.ID_FORMAT_PREFIX"> |
| <code class="sig-name descname">ID_FORMAT_PREFIX</code><a class="headerlink" href="#airflow.models.DagRun.ID_FORMAT_PREFIX" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagRun.id"> |
| <code class="sig-name descname">id</code><a class="headerlink" href="#airflow.models.DagRun.id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagRun.dag_id"> |
| <code class="sig-name descname">dag_id</code><a class="headerlink" href="#airflow.models.DagRun.dag_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagRun.execution_date"> |
| <code class="sig-name descname">execution_date</code><a class="headerlink" href="#airflow.models.DagRun.execution_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagRun.start_date"> |
| <code class="sig-name descname">start_date</code><a class="headerlink" href="#airflow.models.DagRun.start_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagRun.end_date"> |
| <code class="sig-name descname">end_date</code><a class="headerlink" href="#airflow.models.DagRun.end_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagRun._state"> |
| <code class="sig-name descname">_state</code><a class="headerlink" href="#airflow.models.DagRun._state" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagRun.run_id"> |
| <code class="sig-name descname">run_id</code><a class="headerlink" href="#airflow.models.DagRun.run_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagRun.external_trigger"> |
| <code class="sig-name descname">external_trigger</code><a class="headerlink" href="#airflow.models.DagRun.external_trigger" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagRun.conf"> |
| <code class="sig-name descname">conf</code><a class="headerlink" href="#airflow.models.DagRun.conf" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagRun.dag"> |
| <code class="sig-name descname">dag</code><a class="headerlink" href="#airflow.models.DagRun.dag" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagRun.__table_args__"> |
| <code class="sig-name descname">__table_args__</code><a class="headerlink" href="#airflow.models.DagRun.__table_args__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagRun.state"> |
| <code class="sig-name descname">state</code><a class="headerlink" href="#airflow.models.DagRun.state" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DagRun.is_backfill"> |
| <code class="sig-name descname">is_backfill</code><a class="headerlink" href="#airflow.models.DagRun.is_backfill" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagRun.__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="headerlink" href="#airflow.models.DagRun.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagRun.get_state"> |
| <code class="sig-name descname">get_state</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagRun.get_state" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagRun.set_state"> |
| <code class="sig-name descname">set_state</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="headerlink" href="#airflow.models.DagRun.set_state" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagRun.id_for_date"> |
| <em class="property">classmethod </em><code class="sig-name descname">id_for_date</code><span class="sig-paren">(</span><em class="sig-param">cls</em>, <em class="sig-param">date</em>, <em class="sig-param">prefix=ID_FORMAT_PREFIX</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagRun.id_for_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagRun.refresh_from_db"> |
| <code class="sig-name descname">refresh_from_db</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagRun.refresh_from_db" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Reloads the current dagrun from the database |
| :param session: database session</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagRun.find"> |
| <em class="property">static </em><code class="sig-name descname">find</code><span class="sig-paren">(</span><em class="sig-param">dag_id=None</em>, <em class="sig-param">run_id=None</em>, <em class="sig-param">execution_date=None</em>, <em class="sig-param">state=None</em>, <em class="sig-param">external_trigger=None</em>, <em class="sig-param">no_backfills=False</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagRun.find" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a set of dag runs for the given search criteria.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>dag_id</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><em>int</em></a><em>, </em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.7)"><em>list</em></a>) – the dag_id to find dag runs for</p></li> |
| <li><p><strong>run_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>) – defines the the run id for this dag run</p></li> |
| <li><p><strong>execution_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 execution date</p></li> |
| <li><p><strong>state</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 state of the dag run</p></li> |
| <li><p><strong>external_trigger</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – whether this dag run is externally triggered</p></li> |
| <li><p><strong>no_backfills</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – return no backfills (True), return all (False). |
| Defaults to False</p></li> |
| <li><p><strong>session</strong> (<a class="reference external" href="https://docs.sqlalchemy.org/en/13/orm/session_api.html#sqlalchemy.orm.session.Session" title="(in SQLAlchemy v1.3)"><em>sqlalchemy.orm.session.Session</em></a>) – database session</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagRun.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">state=None</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagRun.get_task_instances" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the task instances for this dag run</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagRun.get_task_instance"> |
| <code class="sig-name descname">get_task_instance</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">task_id</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagRun.get_task_instance" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the task instance specified by task_id for this dag run</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>task_id</strong> – the task id</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagRun.get_dag"> |
| <code class="sig-name descname">get_dag</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagRun.get_dag" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the Dag associated with this DagRun.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>DAG</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagRun.get_previous_dagrun"> |
| <code class="sig-name descname">get_previous_dagrun</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">state=None</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagRun.get_previous_dagrun" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The previous DagRun, if there is one</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagRun.get_previous_scheduled_dagrun"> |
| <code class="sig-name descname">get_previous_scheduled_dagrun</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagRun.get_previous_scheduled_dagrun" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The previous, SCHEDULED DagRun, if there is one</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagRun.update_state"> |
| <code class="sig-name descname">update_state</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagRun.update_state" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Determines the overall state of the DagRun based on the state |
| of its TaskInstances.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>State</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagRun._emit_duration_stats_for_finished_state"> |
| <code class="sig-name descname">_emit_duration_stats_for_finished_state</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagRun._emit_duration_stats_for_finished_state" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagRun.verify_integrity"> |
| <code class="sig-name descname">verify_integrity</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagRun.verify_integrity" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Verifies the DagRun by checking for removed tasks or tasks that are not in the |
| database yet. It will set state to removed or add the task if required.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagRun.get_run"> |
| <em class="property">static </em><code class="sig-name descname">get_run</code><span class="sig-paren">(</span><em class="sig-param">session</em>, <em class="sig-param">dag_id</em>, <em class="sig-param">execution_date</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagRun.get_run" title="Permalink to this definition">¶</a></dt> |
| <dd><dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>dag_id</strong> (<em>unicode</em>) – DAG ID</p></li> |
| <li><p><strong>execution_date</strong> (<em>datetime</em>) – execution date</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>DagRun corresponding to the given dag_id and execution date |
| if one exists. None otherwise.</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference internal" href="#airflow.models.DagRun" title="airflow.models.DagRun">airflow.models.DagRun</a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagRun.get_latest_runs"> |
| <em class="property">classmethod </em><code class="sig-name descname">get_latest_runs</code><span class="sig-paren">(</span><em class="sig-param">cls</em>, <em class="sig-param">session</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.DagRun.get_latest_runs" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the latest DagRun for each DAG.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.KubeWorkerIdentifier"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">KubeWorkerIdentifier</code><a class="reference internal" href="../../../_modules/airflow/models/kubernetes.html#KubeWorkerIdentifier"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.KubeWorkerIdentifier" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a></p> |
| <dl class="attribute"> |
| <dt id="airflow.models.KubeWorkerIdentifier.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = kube_worker_uuid</em><a class="headerlink" href="#airflow.models.KubeWorkerIdentifier.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.KubeWorkerIdentifier.one_row_id"> |
| <code class="sig-name descname">one_row_id</code><a class="headerlink" href="#airflow.models.KubeWorkerIdentifier.one_row_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.KubeWorkerIdentifier.worker_uuid"> |
| <code class="sig-name descname">worker_uuid</code><a class="headerlink" href="#airflow.models.KubeWorkerIdentifier.worker_uuid" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.KubeWorkerIdentifier.get_or_create_current_kube_worker_uuid"> |
| <em class="property">static </em><code class="sig-name descname">get_or_create_current_kube_worker_uuid</code><span class="sig-paren">(</span><em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.KubeWorkerIdentifier.get_or_create_current_kube_worker_uuid" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.KubeWorkerIdentifier.checkpoint_kube_worker_uuid"> |
| <em class="property">static </em><code class="sig-name descname">checkpoint_kube_worker_uuid</code><span class="sig-paren">(</span><em class="sig-param">worker_uuid</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.KubeWorkerIdentifier.checkpoint_kube_worker_uuid" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.KubeResourceVersion"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">KubeResourceVersion</code><a class="reference internal" href="../../../_modules/airflow/models/kubernetes.html#KubeResourceVersion"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.KubeResourceVersion" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a></p> |
| <dl class="attribute"> |
| <dt id="airflow.models.KubeResourceVersion.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = kube_resource_version</em><a class="headerlink" href="#airflow.models.KubeResourceVersion.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.KubeResourceVersion.one_row_id"> |
| <code class="sig-name descname">one_row_id</code><a class="headerlink" href="#airflow.models.KubeResourceVersion.one_row_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.KubeResourceVersion.resource_version"> |
| <code class="sig-name descname">resource_version</code><a class="headerlink" href="#airflow.models.KubeResourceVersion.resource_version" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.KubeResourceVersion.get_current_resource_version"> |
| <em class="property">static </em><code class="sig-name descname">get_current_resource_version</code><span class="sig-paren">(</span><em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.KubeResourceVersion.get_current_resource_version" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.KubeResourceVersion.checkpoint_resource_version"> |
| <em class="property">static </em><code class="sig-name descname">checkpoint_resource_version</code><span class="sig-paren">(</span><em class="sig-param">resource_version</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.KubeResourceVersion.checkpoint_resource_version" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.KubeResourceVersion.reset_resource_version"> |
| <em class="property">static </em><code class="sig-name descname">reset_resource_version</code><span class="sig-paren">(</span><em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.KubeResourceVersion.reset_resource_version" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.Log"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">Log</code><span class="sig-paren">(</span><em class="sig-param">event</em>, <em class="sig-param">task_instance</em>, <em class="sig-param">owner=None</em>, <em class="sig-param">extra=None</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models/log.html#Log"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.Log" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a></p> |
| <p>Used to actively log events to the database</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.Log.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = log</em><a class="headerlink" href="#airflow.models.Log.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Log.id"> |
| <code class="sig-name descname">id</code><a class="headerlink" href="#airflow.models.Log.id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Log.dttm"> |
| <code class="sig-name descname">dttm</code><a class="headerlink" href="#airflow.models.Log.dttm" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Log.dag_id"> |
| <code class="sig-name descname">dag_id</code><a class="headerlink" href="#airflow.models.Log.dag_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Log.task_id"> |
| <code class="sig-name descname">task_id</code><a class="headerlink" href="#airflow.models.Log.task_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Log.event"> |
| <code class="sig-name descname">event</code><a class="headerlink" href="#airflow.models.Log.event" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Log.execution_date"> |
| <code class="sig-name descname">execution_date</code><a class="headerlink" href="#airflow.models.Log.execution_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Log.owner"> |
| <code class="sig-name descname">owner</code><a class="headerlink" href="#airflow.models.Log.owner" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Log.extra"> |
| <code class="sig-name descname">extra</code><a class="headerlink" href="#airflow.models.Log.extra" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Log.__table_args__"> |
| <code class="sig-name descname">__table_args__</code><a class="headerlink" href="#airflow.models.Log.__table_args__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.Pool"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">Pool</code><a class="reference internal" href="../../../_modules/airflow/models/pool.html#Pool"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.Pool" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a></p> |
| <dl class="attribute"> |
| <dt id="airflow.models.Pool.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = slot_pool</em><a class="headerlink" href="#airflow.models.Pool.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Pool.id"> |
| <code class="sig-name descname">id</code><a class="headerlink" href="#airflow.models.Pool.id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Pool.pool"> |
| <code class="sig-name descname">pool</code><a class="headerlink" href="#airflow.models.Pool.pool" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Pool.slots"> |
| <code class="sig-name descname">slots</code><a class="headerlink" href="#airflow.models.Pool.slots" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Pool.description"> |
| <code class="sig-name descname">description</code><a class="headerlink" href="#airflow.models.Pool.description" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Pool.DEFAULT_POOL_NAME"> |
| <code class="sig-name descname">DEFAULT_POOL_NAME</code><em class="property"> = default_pool</em><a class="headerlink" href="#airflow.models.Pool.DEFAULT_POOL_NAME" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Pool.__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="headerlink" href="#airflow.models.Pool.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Pool.get_pool"> |
| <em class="property">static </em><code class="sig-name descname">get_pool</code><span class="sig-paren">(</span><em class="sig-param">pool_name</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Pool.get_pool" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Pool.get_default_pool"> |
| <em class="property">static </em><code class="sig-name descname">get_default_pool</code><span class="sig-paren">(</span><em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Pool.get_default_pool" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Pool.to_json"> |
| <code class="sig-name descname">to_json</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Pool.to_json" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Pool.occupied_slots"> |
| <code class="sig-name descname">occupied_slots</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Pool.occupied_slots" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the number of slots used by running/queued tasks at the moment.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Pool.used_slots"> |
| <code class="sig-name descname">used_slots</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Pool.used_slots" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the number of slots used by running tasks at the moment.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Pool.queued_slots"> |
| <code class="sig-name descname">queued_slots</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Pool.queued_slots" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the number of slots used by queued tasks at the moment.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Pool.open_slots"> |
| <code class="sig-name descname">open_slots</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Pool.open_slots" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the number of slots open at the moment</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.TaskFail"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">TaskFail</code><span class="sig-paren">(</span><em class="sig-param">task</em>, <em class="sig-param">execution_date</em>, <em class="sig-param">start_date</em>, <em class="sig-param">end_date</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models/taskfail.html#TaskFail"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.TaskFail" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a></p> |
| <p>TaskFail tracks the failed run durations of each task instance.</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskFail.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = task_fail</em><a class="headerlink" href="#airflow.models.TaskFail.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskFail.id"> |
| <code class="sig-name descname">id</code><a class="headerlink" href="#airflow.models.TaskFail.id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskFail.task_id"> |
| <code class="sig-name descname">task_id</code><a class="headerlink" href="#airflow.models.TaskFail.task_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskFail.dag_id"> |
| <code class="sig-name descname">dag_id</code><a class="headerlink" href="#airflow.models.TaskFail.dag_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskFail.execution_date"> |
| <code class="sig-name descname">execution_date</code><a class="headerlink" href="#airflow.models.TaskFail.execution_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskFail.start_date"> |
| <code class="sig-name descname">start_date</code><a class="headerlink" href="#airflow.models.TaskFail.start_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskFail.end_date"> |
| <code class="sig-name descname">end_date</code><a class="headerlink" href="#airflow.models.TaskFail.end_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskFail.duration"> |
| <code class="sig-name descname">duration</code><a class="headerlink" href="#airflow.models.TaskFail.duration" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskFail.__table_args__"> |
| <code class="sig-name descname">__table_args__</code><a class="headerlink" href="#airflow.models.TaskFail.__table_args__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.SkipMixin"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">SkipMixin</code><a class="reference internal" href="../../../_modules/airflow/models/skipmixin.html#SkipMixin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.SkipMixin" 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> |
| <dl class="method"> |
| <dt id="airflow.models.SkipMixin.skip"> |
| <code class="sig-name descname">skip</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">dag_run</em>, <em class="sig-param">execution_date</em>, <em class="sig-param">tasks</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.SkipMixin.skip" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets tasks instances to skipped from the same dag run.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>dag_run</strong> – the DagRun for which to set the tasks to skipped</p></li> |
| <li><p><strong>execution_date</strong> – execution_date</p></li> |
| <li><p><strong>tasks</strong> – tasks to skip (not task_ids)</p></li> |
| <li><p><strong>session</strong> – db session to use</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.SkipMixin.skip_all_except"> |
| <code class="sig-name descname">skip_all_except</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">ti</em>, <em class="sig-param">branch_task_ids</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.SkipMixin.skip_all_except" title="Permalink to this definition">¶</a></dt> |
| <dd><p>This method implements the logic for a branching operator; given a single |
| task ID or list of task IDs to follow, this skips all other tasks |
| immediately downstream of this operator.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.SlaMiss"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">SlaMiss</code><a class="reference internal" href="../../../_modules/airflow/models/slamiss.html#SlaMiss"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.SlaMiss" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a></p> |
| <p>Model that stores a history of the SLA that have been missed. |
| It is used to keep track of SLA failures over time and to avoid double |
| triggering alert emails.</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.SlaMiss.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = sla_miss</em><a class="headerlink" href="#airflow.models.SlaMiss.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.SlaMiss.task_id"> |
| <code class="sig-name descname">task_id</code><a class="headerlink" href="#airflow.models.SlaMiss.task_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.SlaMiss.dag_id"> |
| <code class="sig-name descname">dag_id</code><a class="headerlink" href="#airflow.models.SlaMiss.dag_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.SlaMiss.execution_date"> |
| <code class="sig-name descname">execution_date</code><a class="headerlink" href="#airflow.models.SlaMiss.execution_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.SlaMiss.email_sent"> |
| <code class="sig-name descname">email_sent</code><a class="headerlink" href="#airflow.models.SlaMiss.email_sent" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.SlaMiss.timestamp"> |
| <code class="sig-name descname">timestamp</code><a class="headerlink" href="#airflow.models.SlaMiss.timestamp" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.SlaMiss.description"> |
| <code class="sig-name descname">description</code><a class="headerlink" href="#airflow.models.SlaMiss.description" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.SlaMiss.notification_sent"> |
| <code class="sig-name descname">notification_sent</code><a class="headerlink" href="#airflow.models.SlaMiss.notification_sent" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.SlaMiss.__table_args__"> |
| <code class="sig-name descname">__table_args__</code><a class="headerlink" href="#airflow.models.SlaMiss.__table_args__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.SlaMiss.__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="headerlink" href="#airflow.models.SlaMiss.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.models.clear_task_instances"> |
| <code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">clear_task_instances</code><span class="sig-paren">(</span><em class="sig-param">tis</em>, <em class="sig-param">session</em>, <em class="sig-param">activate_dag_runs=True</em>, <em class="sig-param">dag=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models/taskinstance.html#clear_task_instances"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.clear_task_instances" title="Permalink to this definition">¶</a></dt> |
| <dt> |
| <code class="sig-name descname">Clears a set of task instances, but makes sure the running ones</code></dt> |
| <dt> |
| <code class="sig-name descname">get killed.</code></dt> |
| <dd><dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>tis</strong> – a list of task instances</p></li> |
| <li><p><strong>session</strong> – current session</p></li> |
| <li><p><strong>activate_dag_runs</strong> – flag to check for active dag run</p></li> |
| <li><p><strong>dag</strong> – DAG object</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.TaskInstance"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">TaskInstance</code><span class="sig-paren">(</span><em class="sig-param">task</em>, <em class="sig-param">execution_date</em>, <em class="sig-param">state=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models/taskinstance.html#TaskInstance"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.TaskInstance" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.utils.log.logging_mixin.LoggingMixin</span></code></p> |
| <p>Task instances store the state of a task instance. This table is the |
| authority and single source of truth around what tasks have run and the |
| state they are in.</p> |
| <p>The SqlAlchemy model doesn’t have a SqlAlchemy foreign key to the task or |
| dag model deliberately to have more control over transactions.</p> |
| <p>Database transactions on this table should insure double triggers and |
| any confusion around what task instances are or aren’t ready to run |
| even while multiple schedulers may be firing task instances.</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = task_instance</em><a class="headerlink" href="#airflow.models.TaskInstance.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.task_id"> |
| <code class="sig-name descname">task_id</code><a class="headerlink" href="#airflow.models.TaskInstance.task_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.dag_id"> |
| <code class="sig-name descname">dag_id</code><a class="headerlink" href="#airflow.models.TaskInstance.dag_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.execution_date"> |
| <code class="sig-name descname">execution_date</code><a class="headerlink" href="#airflow.models.TaskInstance.execution_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.start_date"> |
| <code class="sig-name descname">start_date</code><a class="headerlink" href="#airflow.models.TaskInstance.start_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.end_date"> |
| <code class="sig-name descname">end_date</code><a class="headerlink" href="#airflow.models.TaskInstance.end_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.duration"> |
| <code class="sig-name descname">duration</code><a class="headerlink" href="#airflow.models.TaskInstance.duration" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.state"> |
| <code class="sig-name descname">state</code><a class="headerlink" href="#airflow.models.TaskInstance.state" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance._try_number"> |
| <code class="sig-name descname">_try_number</code><a class="headerlink" href="#airflow.models.TaskInstance._try_number" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.max_tries"> |
| <code class="sig-name descname">max_tries</code><a class="headerlink" href="#airflow.models.TaskInstance.max_tries" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.hostname"> |
| <code class="sig-name descname">hostname</code><a class="headerlink" href="#airflow.models.TaskInstance.hostname" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.unixname"> |
| <code class="sig-name descname">unixname</code><a class="headerlink" href="#airflow.models.TaskInstance.unixname" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.job_id"> |
| <code class="sig-name descname">job_id</code><a class="headerlink" href="#airflow.models.TaskInstance.job_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.pool"> |
| <code class="sig-name descname">pool</code><a class="headerlink" href="#airflow.models.TaskInstance.pool" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.queue"> |
| <code class="sig-name descname">queue</code><a class="headerlink" href="#airflow.models.TaskInstance.queue" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.priority_weight"> |
| <code class="sig-name descname">priority_weight</code><a class="headerlink" href="#airflow.models.TaskInstance.priority_weight" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.operator"> |
| <code class="sig-name descname">operator</code><a class="headerlink" href="#airflow.models.TaskInstance.operator" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.queued_dttm"> |
| <code class="sig-name descname">queued_dttm</code><a class="headerlink" href="#airflow.models.TaskInstance.queued_dttm" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.pid"> |
| <code class="sig-name descname">pid</code><a class="headerlink" href="#airflow.models.TaskInstance.pid" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.executor_config"> |
| <code class="sig-name descname">executor_config</code><a class="headerlink" href="#airflow.models.TaskInstance.executor_config" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.__table_args__"> |
| <code class="sig-name descname">__table_args__</code><a class="headerlink" href="#airflow.models.TaskInstance.__table_args__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.try_number"> |
| <code class="sig-name descname">try_number</code><a class="headerlink" href="#airflow.models.TaskInstance.try_number" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Return the try number that this task number will be when it is actually |
| run.</p> |
| <p>If the TI is currently running, this will match the column in the |
| databse, in all othercases this will be incremenetd</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.next_try_number"> |
| <code class="sig-name descname">next_try_number</code><a class="headerlink" href="#airflow.models.TaskInstance.next_try_number" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.log_filepath"> |
| <code class="sig-name descname">log_filepath</code><a class="headerlink" href="#airflow.models.TaskInstance.log_filepath" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.log_url"> |
| <code class="sig-name descname">log_url</code><a class="headerlink" href="#airflow.models.TaskInstance.log_url" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.mark_success_url"> |
| <code class="sig-name descname">mark_success_url</code><a class="headerlink" href="#airflow.models.TaskInstance.mark_success_url" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.key"> |
| <code class="sig-name descname">key</code><a class="headerlink" href="#airflow.models.TaskInstance.key" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a tuple that identifies the task instance uniquely</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.is_premature"> |
| <code class="sig-name descname">is_premature</code><a class="headerlink" href="#airflow.models.TaskInstance.is_premature" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns whether a task is in UP_FOR_RETRY state and its retry interval |
| has elapsed.</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.previous_ti"> |
| <code class="sig-name descname">previous_ti</code><a class="headerlink" href="#airflow.models.TaskInstance.previous_ti" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The task instance for the task that ran before this task instance.</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.previous_ti_success"> |
| <code class="sig-name descname">previous_ti_success</code><a class="headerlink" href="#airflow.models.TaskInstance.previous_ti_success" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The ti from prior succesful dag run for this task, by execution date.</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.previous_execution_date_success"> |
| <code class="sig-name descname">previous_execution_date_success</code><a class="headerlink" href="#airflow.models.TaskInstance.previous_execution_date_success" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The execution date from property previous_ti_success.</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskInstance.previous_start_date_success"> |
| <code class="sig-name descname">previous_start_date_success</code><a class="headerlink" href="#airflow.models.TaskInstance.previous_start_date_success" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The start date from property previous_ti_success.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.init_on_load"> |
| <code class="sig-name descname">init_on_load</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.init_on_load" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Initialize the attributes that aren’t stored in the DB.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.command"> |
| <code class="sig-name descname">command</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">mark_success=False</em>, <em class="sig-param">ignore_all_deps=False</em>, <em class="sig-param">ignore_depends_on_past=False</em>, <em class="sig-param">ignore_task_deps=False</em>, <em class="sig-param">ignore_ti_state=False</em>, <em class="sig-param">local=False</em>, <em class="sig-param">pickle_id=None</em>, <em class="sig-param">raw=False</em>, <em class="sig-param">job_id=None</em>, <em class="sig-param">pool=None</em>, <em class="sig-param">cfg_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.command" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a command that can be executed anywhere where airflow is |
| installed. This command is part of the message sent to executors by |
| the orchestrator.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.command_as_list"> |
| <code class="sig-name descname">command_as_list</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">mark_success=False</em>, <em class="sig-param">ignore_all_deps=False</em>, <em class="sig-param">ignore_task_deps=False</em>, <em class="sig-param">ignore_depends_on_past=False</em>, <em class="sig-param">ignore_ti_state=False</em>, <em class="sig-param">local=False</em>, <em class="sig-param">pickle_id=None</em>, <em class="sig-param">raw=False</em>, <em class="sig-param">job_id=None</em>, <em class="sig-param">pool=None</em>, <em class="sig-param">cfg_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.command_as_list" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a command that can be executed anywhere where airflow is |
| installed. This command is part of the message sent to executors by |
| the orchestrator.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.generate_command"> |
| <em class="property">static </em><code class="sig-name descname">generate_command</code><span class="sig-paren">(</span><em class="sig-param">dag_id</em>, <em class="sig-param">task_id</em>, <em class="sig-param">execution_date</em>, <em class="sig-param">mark_success=False</em>, <em class="sig-param">ignore_all_deps=False</em>, <em class="sig-param">ignore_depends_on_past=False</em>, <em class="sig-param">ignore_task_deps=False</em>, <em class="sig-param">ignore_ti_state=False</em>, <em class="sig-param">local=False</em>, <em class="sig-param">pickle_id=None</em>, <em class="sig-param">file_path=None</em>, <em class="sig-param">raw=False</em>, <em class="sig-param">job_id=None</em>, <em class="sig-param">pool=None</em>, <em class="sig-param">cfg_path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.generate_command" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Generates the shell command required to execute this task instance.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>dag_id</strong> (<em>unicode</em>) – DAG ID</p></li> |
| <li><p><strong>task_id</strong> (<em>unicode</em>) – Task ID</p></li> |
| <li><p><strong>execution_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>) – Execution date for the task</p></li> |
| <li><p><strong>mark_success</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Whether to mark the task as successful</p></li> |
| <li><p><strong>ignore_all_deps</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Ignore all ignorable dependencies. |
| Overrides the other ignore_* parameters.</p></li> |
| <li><p><strong>ignore_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>) – Ignore depends_on_past parameter of DAGs |
| (e.g. for Backfills)</p></li> |
| <li><p><strong>ignore_task_deps</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Ignore task-specific dependencies such as depends_on_past |
| and trigger rule</p></li> |
| <li><p><strong>ignore_ti_state</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Ignore the task instance’s previous failure/success</p></li> |
| <li><p><strong>local</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Whether to run the task locally</p></li> |
| <li><p><strong>pickle_id</strong> (<em>unicode</em>) – If the DAG was serialized to the DB, the ID |
| associated with the pickled DAG</p></li> |
| <li><p><strong>file_path</strong> – path to the file containing the DAG definition</p></li> |
| <li><p><strong>raw</strong> – raw mode (needs more details)</p></li> |
| <li><p><strong>job_id</strong> – job ID (needs more details)</p></li> |
| <li><p><strong>pool</strong> (<em>unicode</em>) – the Airflow pool that the task should run in</p></li> |
| <li><p><strong>cfg_path</strong> (<em>basestring</em>) – the Path to the configuration file</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>shell command that can be used to run the task instance</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.current_state"> |
| <code class="sig-name descname">current_state</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.current_state" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get the very latest state from the database, if a session is passed, |
| we use and looking up the state becomes part of the session, otherwise |
| a new session is used.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.error"> |
| <code class="sig-name descname">error</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.error" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Forces the task instance’s state to FAILED in the database.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.refresh_from_db"> |
| <code class="sig-name descname">refresh_from_db</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session=None</em>, <em class="sig-param">lock_for_update=False</em>, <em class="sig-param">refresh_executor_config=False</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.refresh_from_db" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Refreshes the task instance from the database based on the primary key</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>refresh_executor_config</strong> – if True, revert executor config to |
| result from DB. Often, however, we will want to keep the newest |
| version</p></li> |
| <li><p><strong>lock_for_update</strong> – if True, indicates that the database should |
| lock the TaskInstance (issuing a FOR UPDATE clause) until the |
| session is committed.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.clear_xcom_data"> |
| <code class="sig-name descname">clear_xcom_data</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.clear_xcom_data" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Clears all XCom data from the database for the task instance</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.set_state"> |
| <code class="sig-name descname">set_state</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">state</em>, <em class="sig-param">session=None</em>, <em class="sig-param">commit=True</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.set_state" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.are_dependents_done"> |
| <code class="sig-name descname">are_dependents_done</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.are_dependents_done" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Checks whether the dependents of this task instance have all succeeded. |
| This is meant to be used by wait_for_downstream.</p> |
| <p>This is useful when you do not want to start processing the next |
| schedule of a task until the dependents are done. For instance, |
| if the task DROPs and recreates a table.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance._get_previous_ti"> |
| <code class="sig-name descname">_get_previous_ti</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">state=None</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance._get_previous_ti" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.are_dependencies_met"> |
| <code class="sig-name descname">are_dependencies_met</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">dep_context=None</em>, <em class="sig-param">session=None</em>, <em class="sig-param">verbose=False</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.are_dependencies_met" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns whether or not all the conditions are met for this task instance to be run |
| given the context for the dependencies (e.g. a task instance being force run from |
| the UI will ignore some dependencies).</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>dep_context</strong> (<em>DepContext</em>) – The execution context that determines the dependencies that |
| should be evaluated.</p></li> |
| <li><p><strong>session</strong> (<a class="reference external" href="https://docs.sqlalchemy.org/en/13/orm/session_api.html#sqlalchemy.orm.session.Session" title="(in SQLAlchemy v1.3)"><em>sqlalchemy.orm.session.Session</em></a>) – database session</p></li> |
| <li><p><strong>verbose</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – whether log details on failed dependencies on |
| info or debug log level</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.get_failed_dep_statuses"> |
| <code class="sig-name descname">get_failed_dep_statuses</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">dep_context=None</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.get_failed_dep_statuses" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.__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="headerlink" href="#airflow.models.TaskInstance.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.next_retry_datetime"> |
| <code class="sig-name descname">next_retry_datetime</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.next_retry_datetime" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get datetime of the next retry if the task instance fails. For exponential |
| backoff, retry_delay is used as base and will be converted to seconds.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.ready_for_retry"> |
| <code class="sig-name descname">ready_for_retry</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.ready_for_retry" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Checks on whether the task instance is in the right state and timeframe |
| to be retried.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.pool_full"> |
| <code class="sig-name descname">pool_full</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.pool_full" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a boolean as to whether the slot pool has room for this |
| task to run</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.get_dagrun"> |
| <code class="sig-name descname">get_dagrun</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.get_dagrun" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the DagRun for this TaskInstance</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>session</strong> – </p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>DagRun</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance._check_and_change_state_before_execution"> |
| <code class="sig-name descname">_check_and_change_state_before_execution</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">verbose=True</em>, <em class="sig-param">ignore_all_deps=False</em>, <em class="sig-param">ignore_depends_on_past=False</em>, <em class="sig-param">ignore_task_deps=False</em>, <em class="sig-param">ignore_ti_state=False</em>, <em class="sig-param">mark_success=False</em>, <em class="sig-param">test_mode=False</em>, <em class="sig-param">job_id=None</em>, <em class="sig-param">pool=None</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance._check_and_change_state_before_execution" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Checks dependencies and then sets state to RUNNING if they are met. Returns |
| True if and only if state is set to RUNNING, which implies that task should be |
| executed, in preparation for _run_raw_task</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>verbose</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – whether to turn on more verbose logging</p></li> |
| <li><p><strong>ignore_all_deps</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Ignore all of the non-critical dependencies, just runs</p></li> |
| <li><p><strong>ignore_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>) – Ignore depends_on_past DAG attribute</p></li> |
| <li><p><strong>ignore_task_deps</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Don’t check the dependencies of this TI’s task</p></li> |
| <li><p><strong>ignore_ti_state</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Disregards previous task instance state</p></li> |
| <li><p><strong>mark_success</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Don’t run the task, mark its state as success</p></li> |
| <li><p><strong>test_mode</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Doesn’t record success or failure in the DB</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>) – specifies the pool to use to run the task instance</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>whether the state was changed to running or not</p> |
| </dd> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)">bool</a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance._run_raw_task"> |
| <code class="sig-name descname">_run_raw_task</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">mark_success=False</em>, <em class="sig-param">test_mode=False</em>, <em class="sig-param">job_id=None</em>, <em class="sig-param">pool=None</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance._run_raw_task" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Immediately runs the task (without checking or changing db state |
| before execution) and then sets the appropriate final state after |
| completion and runs any post-execute callbacks. Meant to be called |
| only after another function changes the state to running.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>mark_success</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Don’t run the task, mark its state as success</p></li> |
| <li><p><strong>test_mode</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Doesn’t record success or failure in the DB</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>) – specifies the pool to use to run the task instance</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.run"> |
| <code class="sig-name descname">run</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">verbose=True</em>, <em class="sig-param">ignore_all_deps=False</em>, <em class="sig-param">ignore_depends_on_past=False</em>, <em class="sig-param">ignore_task_deps=False</em>, <em class="sig-param">ignore_ti_state=False</em>, <em class="sig-param">mark_success=False</em>, <em class="sig-param">test_mode=False</em>, <em class="sig-param">job_id=None</em>, <em class="sig-param">pool=None</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.run" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.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="headerlink" href="#airflow.models.TaskInstance.dry_run" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance._handle_reschedule"> |
| <code class="sig-name descname">_handle_reschedule</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">actual_start_date</em>, <em class="sig-param">reschedule_exception</em>, <em class="sig-param">test_mode=False</em>, <em class="sig-param">context=None</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance._handle_reschedule" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.handle_failure"> |
| <code class="sig-name descname">handle_failure</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">error</em>, <em class="sig-param">test_mode=False</em>, <em class="sig-param">context=None</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.handle_failure" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.is_eligible_to_retry"> |
| <code class="sig-name descname">is_eligible_to_retry</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.is_eligible_to_retry" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Is task instance is eligible for retry</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.get_template_context"> |
| <code class="sig-name descname">get_template_context</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.get_template_context" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.overwrite_params_with_dag_run_conf"> |
| <code class="sig-name descname">overwrite_params_with_dag_run_conf</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">params</em>, <em class="sig-param">dag_run</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.overwrite_params_with_dag_run_conf" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.render_templates"> |
| <code class="sig-name descname">render_templates</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">context=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.render_templates" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.email_alert"> |
| <code class="sig-name descname">email_alert</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">exception</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.email_alert" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.set_duration"> |
| <code class="sig-name descname">set_duration</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.set_duration" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.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">key</em>, <em class="sig-param">value</em>, <em class="sig-param">execution_date=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.xcom_push" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Make an XCom available for tasks to pull.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>key</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 key for the XCom</p></li> |
| <li><p><strong>value</strong> (<em>any pickleable object</em>) – A value for the XCom. The value is pickled and stored |
| in the database.</p></li> |
| <li><p><strong>execution_date</strong> (<em>datetime</em>) – if provided, the XCom will not be visible until |
| this date. This can be used, for example, to send a message to a |
| task on a future date without it being immediately visible.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.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">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=False</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.xcom_pull" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Pull XComs that optionally meet certain criteria.</p> |
| <p>The default value for <cite>key</cite> limits the search to XComs |
| that were returned by other tasks (as opposed to those that were pushed |
| manually). To remove this filter, pass key=None (or any desired value).</p> |
| <p>If a single task_id string is provided, the result is the value of the |
| most recent matching XCom from that task_id. If multiple task_ids are |
| provided, a tuple of matching values is returned. None is returned |
| whenever no matches are found.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>key</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 key for the XCom. If provided, only XComs with matching |
| keys will be returned. The default key is ‘return_value’, also |
| available as a constant XCOM_RETURN_KEY. This key is automatically |
| given to XComs returned by tasks (as opposed to being pushed |
| manually). To remove the filter, pass key=None.</p></li> |
| <li><p><strong>task_ids</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a><em> or </em><em>iterable of strings</em><em> (</em><em>representing task_ids</em><em>)</em>) – Only XComs from tasks with matching ids will be |
| pulled. Can pass None to remove the filter.</p></li> |
| <li><p><strong>dag_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>) – If provided, only pulls XComs from this DAG. |
| If None (default), the DAG of the calling task is used.</p></li> |
| <li><p><strong>include_prior_dates</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – If False, only XComs from the current |
| execution_date are returned. If True, XComs from previous dates |
| are returned as well.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.get_num_running_task_instances"> |
| <code class="sig-name descname">get_num_running_task_instances</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">session</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.get_num_running_task_instances" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.init_run_context"> |
| <code class="sig-name descname">init_run_context</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">raw=False</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskInstance.init_run_context" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Sets the log context.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.TaskReschedule"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">TaskReschedule</code><span class="sig-paren">(</span><em class="sig-param">task</em>, <em class="sig-param">execution_date</em>, <em class="sig-param">try_number</em>, <em class="sig-param">start_date</em>, <em class="sig-param">end_date</em>, <em class="sig-param">reschedule_date</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models/taskreschedule.html#TaskReschedule"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.TaskReschedule" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a></p> |
| <p>TaskReschedule tracks rescheduled task instances.</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskReschedule.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = task_reschedule</em><a class="headerlink" href="#airflow.models.TaskReschedule.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskReschedule.id"> |
| <code class="sig-name descname">id</code><a class="headerlink" href="#airflow.models.TaskReschedule.id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskReschedule.task_id"> |
| <code class="sig-name descname">task_id</code><a class="headerlink" href="#airflow.models.TaskReschedule.task_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskReschedule.dag_id"> |
| <code class="sig-name descname">dag_id</code><a class="headerlink" href="#airflow.models.TaskReschedule.dag_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskReschedule.execution_date"> |
| <code class="sig-name descname">execution_date</code><a class="headerlink" href="#airflow.models.TaskReschedule.execution_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskReschedule.try_number"> |
| <code class="sig-name descname">try_number</code><a class="headerlink" href="#airflow.models.TaskReschedule.try_number" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskReschedule.start_date"> |
| <code class="sig-name descname">start_date</code><a class="headerlink" href="#airflow.models.TaskReschedule.start_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskReschedule.end_date"> |
| <code class="sig-name descname">end_date</code><a class="headerlink" href="#airflow.models.TaskReschedule.end_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskReschedule.duration"> |
| <code class="sig-name descname">duration</code><a class="headerlink" href="#airflow.models.TaskReschedule.duration" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskReschedule.reschedule_date"> |
| <code class="sig-name descname">reschedule_date</code><a class="headerlink" href="#airflow.models.TaskReschedule.reschedule_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TaskReschedule.__table_args__"> |
| <code class="sig-name descname">__table_args__</code><a class="headerlink" href="#airflow.models.TaskReschedule.__table_args__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskReschedule.find_for_task_instance"> |
| <em class="property">static </em><code class="sig-name descname">find_for_task_instance</code><span class="sig-paren">(</span><em class="sig-param">task_instance</em>, <em class="sig-param">session</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TaskReschedule.find_for_task_instance" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns all task reschedules for the task instance and try number, |
| in ascending order.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>task_instance</strong> (<a class="reference internal" href="#airflow.models.TaskInstance" title="airflow.models.TaskInstance"><em>airflow.models.TaskInstance</em></a>) – the task instance to find task reschedules for</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.Variable"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">Variable</code><a class="reference internal" href="../../../_modules/airflow/models/variable.html#Variable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.Variable" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.utils.log.logging_mixin.LoggingMixin</span></code></p> |
| <dl class="attribute"> |
| <dt id="airflow.models.Variable.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = variable</em><a class="headerlink" href="#airflow.models.Variable.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Variable.__NO_DEFAULT_SENTINEL"> |
| <code class="sig-name descname">__NO_DEFAULT_SENTINEL</code><a class="headerlink" href="#airflow.models.Variable.__NO_DEFAULT_SENTINEL" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Variable.id"> |
| <code class="sig-name descname">id</code><a class="headerlink" href="#airflow.models.Variable.id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Variable.key"> |
| <code class="sig-name descname">key</code><a class="headerlink" href="#airflow.models.Variable.key" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Variable._val"> |
| <code class="sig-name descname">_val</code><a class="headerlink" href="#airflow.models.Variable._val" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Variable.is_encrypted"> |
| <code class="sig-name descname">is_encrypted</code><a class="headerlink" href="#airflow.models.Variable.is_encrypted" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Variable.val"> |
| <code class="sig-name descname">val</code><a class="headerlink" href="#airflow.models.Variable.val" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Variable.__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="headerlink" href="#airflow.models.Variable.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Variable.get_val"> |
| <code class="sig-name descname">get_val</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Variable.get_val" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Variable.set_val"> |
| <code class="sig-name descname">set_val</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">value</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Variable.set_val" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Variable.setdefault"> |
| <em class="property">classmethod </em><code class="sig-name descname">setdefault</code><span class="sig-paren">(</span><em class="sig-param">cls</em>, <em class="sig-param">key</em>, <em class="sig-param">default</em>, <em class="sig-param">deserialize_json=False</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Variable.setdefault" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Like a Python builtin dict object, setdefault returns the current value |
| for a key, and if it isn’t there, stores the default value and returns it.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>key</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – Dict key for this Variable</p></li> |
| <li><p><strong>default</strong> (<em>Mixed</em>) – Default value to set and return if the variable |
| isn’t already in the DB</p></li> |
| <li><p><strong>deserialize_json</strong> – Store this as a JSON encoded value in the DB |
| and un-encode it when retrieving a value</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>Mixed</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Variable.get"> |
| <em class="property">classmethod </em><code class="sig-name descname">get</code><span class="sig-paren">(</span><em class="sig-param">cls</em>, <em class="sig-param">key</em>, <em class="sig-param">default_var=__NO_DEFAULT_SENTINEL</em>, <em class="sig-param">deserialize_json=False</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Variable.get" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Variable.set"> |
| <em class="property">classmethod </em><code class="sig-name descname">set</code><span class="sig-paren">(</span><em class="sig-param">cls</em>, <em class="sig-param">key</em>, <em class="sig-param">value</em>, <em class="sig-param">serialize_json=False</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Variable.set" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Variable.delete"> |
| <em class="property">classmethod </em><code class="sig-name descname">delete</code><span class="sig-paren">(</span><em class="sig-param">cls</em>, <em class="sig-param">key</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Variable.delete" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Variable.rotate_fernet_key"> |
| <code class="sig-name descname">rotate_fernet_key</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Variable.rotate_fernet_key" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.XCom"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">XCom</code><a class="reference internal" href="../../../_modules/airflow/models/xcom.html#XCom"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.XCom" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a>, <code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.utils.log.logging_mixin.LoggingMixin</span></code></p> |
| <p>Base class for XCom objects.</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.XCom.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = xcom</em><a class="headerlink" href="#airflow.models.XCom.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.XCom.id"> |
| <code class="sig-name descname">id</code><a class="headerlink" href="#airflow.models.XCom.id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.XCom.key"> |
| <code class="sig-name descname">key</code><a class="headerlink" href="#airflow.models.XCom.key" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.XCom.value"> |
| <code class="sig-name descname">value</code><a class="headerlink" href="#airflow.models.XCom.value" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.XCom.timestamp"> |
| <code class="sig-name descname">timestamp</code><a class="headerlink" href="#airflow.models.XCom.timestamp" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.XCom.execution_date"> |
| <code class="sig-name descname">execution_date</code><a class="headerlink" href="#airflow.models.XCom.execution_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.XCom.task_id"> |
| <code class="sig-name descname">task_id</code><a class="headerlink" href="#airflow.models.XCom.task_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.XCom.dag_id"> |
| <code class="sig-name descname">dag_id</code><a class="headerlink" href="#airflow.models.XCom.dag_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.XCom.__table_args__"> |
| <code class="sig-name descname">__table_args__</code><a class="headerlink" href="#airflow.models.XCom.__table_args__" title="Permalink to this definition">¶</a></dt> |
| <dd><p>TODO: “pickling” has been deprecated and JSON is preferred. |
| “pickling” will be removed in Airflow 2.0.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.XCom.init_on_load"> |
| <code class="sig-name descname">init_on_load</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.XCom.init_on_load" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.XCom.__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="headerlink" href="#airflow.models.XCom.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.XCom.set"> |
| <em class="property">classmethod </em><code class="sig-name descname">set</code><span class="sig-paren">(</span><em class="sig-param">cls</em>, <em class="sig-param">key</em>, <em class="sig-param">value</em>, <em class="sig-param">execution_date</em>, <em class="sig-param">task_id</em>, <em class="sig-param">dag_id</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.XCom.set" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Store an XCom value.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>None</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.XCom.get_one"> |
| <em class="property">classmethod </em><code class="sig-name descname">get_one</code><span class="sig-paren">(</span><em class="sig-param">cls</em>, <em class="sig-param">execution_date</em>, <em class="sig-param">key=None</em>, <em class="sig-param">task_id=None</em>, <em class="sig-param">dag_id=None</em>, <em class="sig-param">include_prior_dates=False</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.XCom.get_one" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Retrieve an XCom value, optionally meeting certain criteria. |
| TODO: “pickling” has been deprecated and JSON is preferred. |
| “pickling” will be removed in Airflow 2.0.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>XCom value</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.XCom.get_many"> |
| <em class="property">classmethod </em><code class="sig-name descname">get_many</code><span class="sig-paren">(</span><em class="sig-param">cls</em>, <em class="sig-param">execution_date</em>, <em class="sig-param">key=None</em>, <em class="sig-param">task_ids=None</em>, <em class="sig-param">dag_ids=None</em>, <em class="sig-param">include_prior_dates=False</em>, <em class="sig-param">limit=100</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.XCom.get_many" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Retrieve an XCom value, optionally meeting certain criteria |
| TODO: “pickling” has been deprecated and JSON is preferred. |
| “pickling” will be removed in Airflow 2.0.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.XCom.delete"> |
| <em class="property">classmethod </em><code class="sig-name descname">delete</code><span class="sig-paren">(</span><em class="sig-param">cls</em>, <em class="sig-param">xcoms</em>, <em class="sig-param">session=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.XCom.delete" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.XCom.serialize_value"> |
| <em class="property">static </em><code class="sig-name descname">serialize_value</code><span class="sig-paren">(</span><em class="sig-param">value</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.XCom.serialize_value" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="data"> |
| <dt id="airflow.models.XCOM_RETURN_KEY"> |
| <code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">XCOM_RETURN_KEY</code><em class="property"> = return_value</em><a class="reference internal" href="../../../_modules/airflow/models/xcom.html#XCOM_RETURN_KEY"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.XCOM_RETURN_KEY" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.KnownEvent"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">KnownEvent</code><a class="reference internal" href="../../../_modules/airflow/models/knownevent.html#KnownEvent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.KnownEvent" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a></p> |
| <dl class="attribute"> |
| <dt id="airflow.models.KnownEvent.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = known_event</em><a class="headerlink" href="#airflow.models.KnownEvent.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.KnownEvent.id"> |
| <code class="sig-name descname">id</code><a class="headerlink" href="#airflow.models.KnownEvent.id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.KnownEvent.label"> |
| <code class="sig-name descname">label</code><a class="headerlink" href="#airflow.models.KnownEvent.label" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.KnownEvent.start_date"> |
| <code class="sig-name descname">start_date</code><a class="headerlink" href="#airflow.models.KnownEvent.start_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.KnownEvent.end_date"> |
| <code class="sig-name descname">end_date</code><a class="headerlink" href="#airflow.models.KnownEvent.end_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.KnownEvent.user_id"> |
| <code class="sig-name descname">user_id</code><a class="headerlink" href="#airflow.models.KnownEvent.user_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.KnownEvent.known_event_type_id"> |
| <code class="sig-name descname">known_event_type_id</code><a class="headerlink" href="#airflow.models.KnownEvent.known_event_type_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.KnownEvent.reported_by"> |
| <code class="sig-name descname">reported_by</code><a class="headerlink" href="#airflow.models.KnownEvent.reported_by" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.KnownEvent.event_type"> |
| <code class="sig-name descname">event_type</code><a class="headerlink" href="#airflow.models.KnownEvent.event_type" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.KnownEvent.description"> |
| <code class="sig-name descname">description</code><a class="headerlink" href="#airflow.models.KnownEvent.description" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.KnownEvent.__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="headerlink" href="#airflow.models.KnownEvent.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.KnownEventType"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">KnownEventType</code><a class="reference internal" href="../../../_modules/airflow/models/knownevent.html#KnownEventType"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.KnownEventType" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a></p> |
| <dl class="attribute"> |
| <dt id="airflow.models.KnownEventType.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = known_event_type</em><a class="headerlink" href="#airflow.models.KnownEventType.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.KnownEventType.id"> |
| <code class="sig-name descname">id</code><a class="headerlink" href="#airflow.models.KnownEventType.id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.KnownEventType.know_event_type"> |
| <code class="sig-name descname">know_event_type</code><a class="headerlink" href="#airflow.models.KnownEventType.know_event_type" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.KnownEventType.__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="headerlink" href="#airflow.models.KnownEventType.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.User"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">User</code><a class="reference internal" href="../../../_modules/airflow/models/user.html#User"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.User" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a></p> |
| <dl class="attribute"> |
| <dt id="airflow.models.User.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = users</em><a class="headerlink" href="#airflow.models.User.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.User.id"> |
| <code class="sig-name descname">id</code><a class="headerlink" href="#airflow.models.User.id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.User.username"> |
| <code class="sig-name descname">username</code><a class="headerlink" href="#airflow.models.User.username" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.User.email"> |
| <code class="sig-name descname">email</code><a class="headerlink" href="#airflow.models.User.email" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.User.superuser"> |
| <code class="sig-name descname">superuser</code><a class="headerlink" href="#airflow.models.User.superuser" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.User.__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="headerlink" href="#airflow.models.User.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.User.get_id"> |
| <code class="sig-name descname">get_id</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.User.get_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.User.is_superuser"> |
| <code class="sig-name descname">is_superuser</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.User.is_superuser" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.Chart"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.models.</code><code class="sig-name descname">Chart</code><a class="reference internal" href="../../../_modules/airflow/models/chart.html#Chart"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.Chart" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="base/index.html#airflow.models.base.Base" title="airflow.models.base.Base"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.models.base.Base</span></code></a></p> |
| <dl class="attribute"> |
| <dt id="airflow.models.Chart.__tablename__"> |
| <code class="sig-name descname">__tablename__</code><em class="property"> = chart</em><a class="headerlink" href="#airflow.models.Chart.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Chart.id"> |
| <code class="sig-name descname">id</code><a class="headerlink" href="#airflow.models.Chart.id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Chart.label"> |
| <code class="sig-name descname">label</code><a class="headerlink" href="#airflow.models.Chart.label" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Chart.conn_id"> |
| <code class="sig-name descname">conn_id</code><a class="headerlink" href="#airflow.models.Chart.conn_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Chart.user_id"> |
| <code class="sig-name descname">user_id</code><a class="headerlink" href="#airflow.models.Chart.user_id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Chart.chart_type"> |
| <code class="sig-name descname">chart_type</code><a class="headerlink" href="#airflow.models.Chart.chart_type" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Chart.sql_layout"> |
| <code class="sig-name descname">sql_layout</code><a class="headerlink" href="#airflow.models.Chart.sql_layout" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Chart.sql"> |
| <code class="sig-name descname">sql</code><a class="headerlink" href="#airflow.models.Chart.sql" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Chart.y_log_scale"> |
| <code class="sig-name descname">y_log_scale</code><a class="headerlink" href="#airflow.models.Chart.y_log_scale" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Chart.show_datatable"> |
| <code class="sig-name descname">show_datatable</code><a class="headerlink" href="#airflow.models.Chart.show_datatable" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Chart.show_sql"> |
| <code class="sig-name descname">show_sql</code><a class="headerlink" href="#airflow.models.Chart.show_sql" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Chart.height"> |
| <code class="sig-name descname">height</code><a class="headerlink" href="#airflow.models.Chart.height" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Chart.default_params"> |
| <code class="sig-name descname">default_params</code><a class="headerlink" href="#airflow.models.Chart.default_params" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Chart.owner"> |
| <code class="sig-name descname">owner</code><a class="headerlink" href="#airflow.models.Chart.owner" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Chart.x_is_date"> |
| <code class="sig-name descname">x_is_date</code><a class="headerlink" href="#airflow.models.Chart.x_is_date" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Chart.iteration_no"> |
| <code class="sig-name descname">iteration_no</code><a class="headerlink" href="#airflow.models.Chart.iteration_no" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Chart.last_modified"> |
| <code class="sig-name descname">last_modified</code><a class="headerlink" href="#airflow.models.Chart.last_modified" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Chart.__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="headerlink" href="#airflow.models.Chart.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| </div> |
| </div> |
| |
| |
| </div> |
| |
| </div> |
| |
| |
| <footer> |
| |
| <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
| |
| <a href="base/index.html" class="btn btn-neutral float-right" title="airflow.models.base" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> |
| |
| |
| <a href="../contrib/executors/mesos_executor/index.html" class="btn btn-neutral float-left" title="airflow.contrib.executors.mesos_executor" 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. |
| <script type="text/javascript"> |
| (function() { |
| var ga = document.createElement('script'); |
| ga.src = ('https:' == document.location.protocol ? |
| 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; |
| ga.setAttribute('async', 'true'); |
| var nodes = document.documentElement.childNodes; |
| var i = -1; |
| var node; |
| do { |
| i++; |
| node = nodes[i] |
| } while(node.nodeType !== Node.ELEMENT_NODE); |
| node.appendChild(ga); |
| })(); |
| </script> |
| </div> |
| |
| |
| </footer> |
| |
| </div> |
| </div> |
| |
| </section> |
| |
| </div> |
| |
| |
| |
| <script type="text/javascript"> |
| jQuery(function () { |
| SphinxRtdTheme.Navigation.enable(true); |
| }); |
| </script> |
| |
| |
| |
| |
| |
| |
| </body> |
| </html> |