| |
| |
| |
| |
| <!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> |
| <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> |
| |
| <script type="application/javascript"> |
| window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; |
| ga("create", "UA-140539454-1", "auto"); |
| ga("send", "pageview"); |
| </script> |
| <script async src="https://www.google-analytics.com/analytics.js"></script> |
| </head> |
| |
| |
| <body class="wy-body-for-nav"> |
| |
| |
| <div class="wy-grid-for-nav"> |
| |
| <nav data-toggle="wy-nav-shift" class="wy-nav-side"> |
| <div class="wy-side-scroll"> |
| <div class="wy-side-nav-search" > |
| |
| |
| |
| <a href="../../../index.html" class="icon icon-home"> Airflow |
| |
| |
| |
| </a> |
| |
| |
| |
| |
| <div class="version"> |
| 1.10.3 |
| </div> |
| |
| |
| |
| |
| <div role="search"> |
| <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get"> |
| <input type="text" name="q" placeholder="Search docs" /> |
| <input type="hidden" name="check_keywords" value="yes" /> |
| <input type="hidden" name="area" value="default" /> |
| </form> |
| </div> |
| |
| |
| </div> |
| |
| <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> |
| |
| |
| |
| |
| |
| |
| <ul class="current"> |
| <li class="toctree-l1"><a class="reference internal" href="../../../project.html">Project</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../license.html">License</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../start.html">Quick Start</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../installation.html">Installation</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../tutorial.html">Tutorial</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../howto/index.html">How-to Guides</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../ui.html">UI / Screenshots</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../concepts.html">Concepts</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../profiling.html">Data Profiling</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../cli.html">Command Line Interface</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../scheduler.html">Scheduling & Triggers</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../plugins.html">Plugins</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../security.html">Security</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../timezone.html">Time zones</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../api.html">Experimental Rest API</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../integration.html">Integration</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../metrics.html">Metrics</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../kubernetes.html">Kubernetes</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../lineage.html">Lineage</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../changelog.html">Changelog</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../faq.html">FAQ</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../macros.html">Macros reference</a></li> |
| <li class="toctree-l1 current"><a class="reference internal" href="../../index.html">API Reference</a><ul class="current"> |
| <li class="toctree-l2"><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> |
| </ul> |
| |
| |
| |
| </div> |
| </div> |
| </nav> |
| |
| <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> |
| |
| |
| <nav class="wy-nav-top" aria-label="top navigation"> |
| |
| <i data-toggle="wy-nav-top" class="fa fa-bars"></i> |
| <a href="../../../index.html">Airflow</a> |
| |
| </nav> |
| |
| |
| <div class="wy-nav-content"> |
| |
| <div class="rst-content"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div role="navigation" aria-label="breadcrumbs navigation"> |
| |
| <ul class="wy-breadcrumbs"> |
| |
| <li><a href="../../../index.html">Docs</a> »</li> |
| |
| <li><a href="../../index.html">API Reference</a> »</li> |
| |
| <li><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.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="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="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="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="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="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="taskreschedule/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.models.taskreschedule</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="descclassname">airflow.models.</code><code class="descname">Base</code><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="descclassname">airflow.models.</code><code class="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="function"> |
| <dt id="airflow.models.GetDefaultExecutor"> |
| <code class="descclassname">airflow.models.</code><code class="descname">GetDefaultExecutor</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/executors.html#GetDefaultExecutor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.GetDefaultExecutor" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Creates a new instance of the configured executor if none exists and returns it</p> |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.LocalExecutor"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">LocalExecutor</code><a class="headerlink" href="#airflow.models.LocalExecutor" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference internal" href="../executors/base_executor/index.html#airflow.executors.base_executor.BaseExecutor" title="airflow.executors.base_executor.BaseExecutor"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.executors.base_executor.BaseExecutor</span></code></a></p> |
| <p>LocalExecutor executes tasks locally in parallel. It uses the |
| multiprocessing Python library and queues to parallelize the execution |
| of tasks.</p> |
| <dl class="class"> |
| <dt id="airflow.models.LocalExecutor._UnlimitedParallelism"> |
| <em class="property">class </em><code class="descname">_UnlimitedParallelism</code><span class="sig-paren">(</span><em>executor</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.LocalExecutor._UnlimitedParallelism" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <p>Implements LocalExecutor with unlimited parallelism, starting one process |
| per each command to execute.</p> |
| <dl class="method"> |
| <dt id="airflow.models.LocalExecutor._UnlimitedParallelism.start"> |
| <code class="descname">start</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.LocalExecutor._UnlimitedParallelism.start" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.LocalExecutor._UnlimitedParallelism.execute_async"> |
| <code class="descname">execute_async</code><span class="sig-paren">(</span><em>self</em>, <em>key</em>, <em>command</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.LocalExecutor._UnlimitedParallelism.execute_async" 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>key</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.7)"><em>tuple</em></a><em>(</em><em>dag_id</em><em>, </em><em>task_id</em><em>, </em><em>execution_date</em><em>)</em>) – the key to identify the TI</p></li> |
| <li><p><strong>command</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 command to execute</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.LocalExecutor._UnlimitedParallelism.sync"> |
| <code class="descname">sync</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.LocalExecutor._UnlimitedParallelism.sync" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.LocalExecutor._UnlimitedParallelism.end"> |
| <code class="descname">end</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.LocalExecutor._UnlimitedParallelism.end" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.LocalExecutor._LimitedParallelism"> |
| <em class="property">class </em><code class="descname">_LimitedParallelism</code><span class="sig-paren">(</span><em>executor</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.LocalExecutor._LimitedParallelism" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <p>Implements LocalExecutor with limited parallelism using a task queue to |
| coordinate work distribution.</p> |
| <dl class="method"> |
| <dt id="airflow.models.LocalExecutor._LimitedParallelism.start"> |
| <code class="descname">start</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.LocalExecutor._LimitedParallelism.start" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.LocalExecutor._LimitedParallelism.execute_async"> |
| <code class="descname">execute_async</code><span class="sig-paren">(</span><em>self</em>, <em>key</em>, <em>command</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.LocalExecutor._LimitedParallelism.execute_async" 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>key</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.7)"><em>tuple</em></a><em>(</em><em>dag_id</em><em>, </em><em>task_id</em><em>, </em><em>execution_date</em><em>)</em>) – the key to identify the TI</p></li> |
| <li><p><strong>command</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 command to execute</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.LocalExecutor._LimitedParallelism.sync"> |
| <code class="descname">sync</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.LocalExecutor._LimitedParallelism.sync" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.LocalExecutor._LimitedParallelism.end"> |
| <code class="descname">end</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.LocalExecutor._LimitedParallelism.end" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.LocalExecutor.start"> |
| <code class="descname">start</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.LocalExecutor.start" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.LocalExecutor.execute_async"> |
| <code class="descname">execute_async</code><span class="sig-paren">(</span><em>self</em>, <em>key</em>, <em>command</em>, <em>queue=None</em>, <em>executor_config=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.LocalExecutor.execute_async" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.LocalExecutor.sync"> |
| <code class="descname">sync</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.LocalExecutor.sync" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.LocalExecutor.end"> |
| <code class="descname">end</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.LocalExecutor.end" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="exception"> |
| <dt id="airflow.models.AirflowDagCycleException"> |
| <em class="property">exception </em><code class="descclassname">airflow.models.</code><code class="descname">AirflowDagCycleException</code><a class="reference internal" href="../../../_modules/airflow/exceptions.html#AirflowDagCycleException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.AirflowDagCycleException" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.exceptions.AirflowException</span></code></p> |
| </dd></dl> |
| |
| <dl class="exception"> |
| <dt id="airflow.models.AirflowException"> |
| <em class="property">exception </em><code class="descclassname">airflow.models.</code><code class="descname">AirflowException</code><a class="reference internal" href="../../../_modules/airflow/exceptions.html#AirflowException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.AirflowException" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference external" href="https://docs.python.org/3/library/exceptions.html#Exception" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></a></p> |
| <p>Base class for all Airflow’s errors. |
| Each custom exception should be derived from this class</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.AirflowException.status_code"> |
| <code class="descname">status_code</code><em class="property"> = 500</em><a class="headerlink" href="#airflow.models.AirflowException.status_code" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="exception"> |
| <dt id="airflow.models.AirflowSkipException"> |
| <em class="property">exception </em><code class="descclassname">airflow.models.</code><code class="descname">AirflowSkipException</code><a class="reference internal" href="../../../_modules/airflow/exceptions.html#AirflowSkipException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.AirflowSkipException" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.exceptions.AirflowException</span></code></p> |
| </dd></dl> |
| |
| <dl class="exception"> |
| <dt id="airflow.models.AirflowTaskTimeout"> |
| <em class="property">exception </em><code class="descclassname">airflow.models.</code><code class="descname">AirflowTaskTimeout</code><a class="reference internal" href="../../../_modules/airflow/exceptions.html#AirflowTaskTimeout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.AirflowTaskTimeout" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.exceptions.AirflowException</span></code></p> |
| </dd></dl> |
| |
| <dl class="exception"> |
| <dt id="airflow.models.AirflowRescheduleException"> |
| <em class="property">exception </em><code class="descclassname">airflow.models.</code><code class="descname">AirflowRescheduleException</code><span class="sig-paren">(</span><em>reschedule_date</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/exceptions.html#AirflowRescheduleException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.AirflowRescheduleException" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.exceptions.AirflowException</span></code></p> |
| <p>Raise when the task should be re-scheduled at a later time.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>reschedule_date</strong> – The date when the task should be rescheduled</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.BaseDag"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">BaseDag</code><a class="reference internal" href="../../../_modules/airflow/dag/base_dag.html#BaseDag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.BaseDag" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <p>Base DAG object that both the SimpleDag and DAG inherit.</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseDag.__metaclass__"> |
| <code class="descname">__metaclass__</code><a class="headerlink" href="#airflow.models.BaseDag.__metaclass__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseDag.dag_id"> |
| <code class="descname">dag_id</code><a class="headerlink" href="#airflow.models.BaseDag.dag_id" 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 DAG ID</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p>unicode</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseDag.task_ids"> |
| <code class="descname">task_ids</code><a class="headerlink" href="#airflow.models.BaseDag.task_ids" title="Permalink to this definition">¶</a></dt> |
| <dd><dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>A list of task IDs that are in this DAG</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p>List[unicode]</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseDag.full_filepath"> |
| <code class="descname">full_filepath</code><a class="headerlink" href="#airflow.models.BaseDag.full_filepath" 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 absolute path to the file that contains this DAG’s definition</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p>unicode</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.BaseDag.concurrency"> |
| <code class="descname">concurrency</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.BaseDag.concurrency" title="Permalink to this definition">¶</a></dt> |
| <dd><dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>maximum number of tasks that can run simultaneously from this DAG</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/functions.html#int" title="(in Python v3.7)">int</a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.BaseDag.is_paused"> |
| <code class="descname">is_paused</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.BaseDag.is_paused" title="Permalink to this definition">¶</a></dt> |
| <dd><dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>whether this DAG is paused or not</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/functions.html#bool" title="(in Python v3.7)">bool</a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.BaseDag.pickle_id"> |
| <code class="descname">pickle_id</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.BaseDag.pickle_id" 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 pickle ID for this DAG, if it has one. Otherwise None.</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p>unicode</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.BaseDagBag"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">BaseDagBag</code><a class="reference internal" href="../../../_modules/airflow/dag/base_dag.html#BaseDagBag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.BaseDagBag" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <p>Base object that both the SimpleDagBag and DagBag inherit.</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseDagBag.dag_ids"> |
| <code class="descname">dag_ids</code><a class="headerlink" href="#airflow.models.BaseDagBag.dag_ids" title="Permalink to this definition">¶</a></dt> |
| <dd><dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>a list of DAG IDs in this bag</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p>List[unicode]</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.BaseDagBag.get_dag"> |
| <code class="descname">get_dag</code><span class="sig-paren">(</span><em>self</em>, <em>dag_id</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.BaseDagBag.get_dag" title="Permalink to this definition">¶</a></dt> |
| <dd><dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>whether the task exists in this bag</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p>airflow.dag.base_dag.BaseDag</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.models.apply_lineage"> |
| <code class="descclassname">airflow.models.</code><code class="descname">apply_lineage</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/lineage.html#apply_lineage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.apply_lineage" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Saves the lineage to XCom and if configured to do so sends it |
| to the backend.</p> |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.models.prepare_lineage"> |
| <code class="descclassname">airflow.models.</code><code class="descname">prepare_lineage</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/lineage.html#prepare_lineage"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.prepare_lineage" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Prepares the lineage inlets and outlets. Inlets can be:</p> |
| <ul class="simple"> |
| <li><p>“auto” -> picks up any outlets from direct upstream tasks that have outlets defined, as such that |
| if A -> B -> C and B does not have outlets but A does, these are provided as inlets.</p></li> |
| <li><p>“list of task_ids” -> picks up outlets from the upstream task_ids</p></li> |
| <li><p>“list of datasets” -> manually defined list of DataSet</p></li> |
| </ul> |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.DagPickle"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">DagPickle</code><span class="sig-paren">(</span><em>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="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="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="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="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="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.ImportError"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">ImportError</code><a class="reference internal" href="../../../_modules/airflow/models/errors.html#ImportError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.ImportError" 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.ImportError.__tablename__"> |
| <code class="descname">__tablename__</code><em class="property"> = import_error</em><a class="headerlink" href="#airflow.models.ImportError.__tablename__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.ImportError.id"> |
| <code class="descname">id</code><a class="headerlink" href="#airflow.models.ImportError.id" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.ImportError.timestamp"> |
| <code class="descname">timestamp</code><a class="headerlink" href="#airflow.models.ImportError.timestamp" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.ImportError.filename"> |
| <code class="descname">filename</code><a class="headerlink" href="#airflow.models.ImportError.filename" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.ImportError.stacktrace"> |
| <code class="descname">stacktrace</code><a class="headerlink" href="#airflow.models.ImportError.stacktrace" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.SlaMiss"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="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="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="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="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="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="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="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="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="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="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="descname">__repr__</code><span class="sig-paren">(</span><em>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="class"> |
| <dt id="airflow.models.KubeWorkerIdentifier"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="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="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="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="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="staticmethod"> |
| <dt id="airflow.models.KubeWorkerIdentifier.get_or_create_current_kube_worker_uuid"> |
| <em class="property">static </em><code class="descname">get_or_create_current_kube_worker_uuid</code><span class="sig-paren">(</span><em>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="staticmethod"> |
| <dt id="airflow.models.KubeWorkerIdentifier.checkpoint_kube_worker_uuid"> |
| <em class="property">static </em><code class="descname">checkpoint_kube_worker_uuid</code><span class="sig-paren">(</span><em>worker_uuid</em>, <em>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="descclassname">airflow.models.</code><code class="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="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="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="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="staticmethod"> |
| <dt id="airflow.models.KubeResourceVersion.get_current_resource_version"> |
| <em class="property">static </em><code class="descname">get_current_resource_version</code><span class="sig-paren">(</span><em>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="staticmethod"> |
| <dt id="airflow.models.KubeResourceVersion.checkpoint_resource_version"> |
| <em class="property">static </em><code class="descname">checkpoint_resource_version</code><span class="sig-paren">(</span><em>resource_version</em>, <em>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="staticmethod"> |
| <dt id="airflow.models.KubeResourceVersion.reset_resource_version"> |
| <em class="property">static </em><code class="descname">reset_resource_version</code><span class="sig-paren">(</span><em>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="descclassname">airflow.models.</code><code class="descname">Log</code><span class="sig-paren">(</span><em>event</em>, <em>task_instance</em>, <em>owner=None</em>, <em>extra=None</em>, <em>**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="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="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="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="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="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="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="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="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="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="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.TaskFail"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">TaskFail</code><span class="sig-paren">(</span><em>task</em>, <em>execution_date</em>, <em>start_date</em>, <em>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="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="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="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="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="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="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="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="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="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.TaskReschedule"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">TaskReschedule</code><span class="sig-paren">(</span><em>task</em>, <em>execution_date</em>, <em>try_number</em>, <em>start_date</em>, <em>end_date</em>, <em>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="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="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="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="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="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="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="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="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="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="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="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="staticmethod"> |
| <dt id="airflow.models.TaskReschedule.find_for_task_instance"> |
| <em class="property">static </em><code class="descname">find_for_task_instance</code><span class="sig-paren">(</span><em>task_instance</em>, <em>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.NotInRetryPeriodDep"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">NotInRetryPeriodDep</code><a class="reference internal" href="../../../_modules/airflow/ti_deps/deps/not_in_retry_period_dep.html#NotInRetryPeriodDep"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.NotInRetryPeriodDep" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.ti_deps.deps.base_ti_dep.BaseTIDep</span></code></p> |
| <dl class="attribute"> |
| <dt id="airflow.models.NotInRetryPeriodDep.NAME"> |
| <code class="descname">NAME</code><em class="property"> = Not In Retry Period</em><a class="headerlink" href="#airflow.models.NotInRetryPeriodDep.NAME" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.NotInRetryPeriodDep.IGNOREABLE"> |
| <code class="descname">IGNOREABLE</code><em class="property"> = True</em><a class="headerlink" href="#airflow.models.NotInRetryPeriodDep.IGNOREABLE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.NotInRetryPeriodDep.IS_TASK_DEP"> |
| <code class="descname">IS_TASK_DEP</code><em class="property"> = True</em><a class="headerlink" href="#airflow.models.NotInRetryPeriodDep.IS_TASK_DEP" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.NotInRetryPeriodDep._get_dep_statuses"> |
| <code class="descname">_get_dep_statuses</code><span class="sig-paren">(</span><em>self</em>, <em>ti</em>, <em>session</em>, <em>dep_context</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.NotInRetryPeriodDep._get_dep_statuses" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.PrevDagrunDep"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">PrevDagrunDep</code><a class="reference internal" href="../../../_modules/airflow/ti_deps/deps/prev_dagrun_dep.html#PrevDagrunDep"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.PrevDagrunDep" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.ti_deps.deps.base_ti_dep.BaseTIDep</span></code></p> |
| <p>Is the past dagrun in a state that allows this task instance to run, e.g. did this |
| task instance’s task in the previous dagrun complete if we are depending on past.</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.PrevDagrunDep.NAME"> |
| <code class="descname">NAME</code><em class="property"> = Previous Dagrun State</em><a class="headerlink" href="#airflow.models.PrevDagrunDep.NAME" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.PrevDagrunDep.IGNOREABLE"> |
| <code class="descname">IGNOREABLE</code><em class="property"> = True</em><a class="headerlink" href="#airflow.models.PrevDagrunDep.IGNOREABLE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.PrevDagrunDep.IS_TASK_DEP"> |
| <code class="descname">IS_TASK_DEP</code><em class="property"> = True</em><a class="headerlink" href="#airflow.models.PrevDagrunDep.IS_TASK_DEP" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.PrevDagrunDep._get_dep_statuses"> |
| <code class="descname">_get_dep_statuses</code><span class="sig-paren">(</span><em>self</em>, <em>ti</em>, <em>session</em>, <em>dep_context</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.PrevDagrunDep._get_dep_statuses" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.TriggerRuleDep"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">TriggerRuleDep</code><a class="reference internal" href="../../../_modules/airflow/ti_deps/deps/trigger_rule_dep.html#TriggerRuleDep"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.TriggerRuleDep" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.ti_deps.deps.base_ti_dep.BaseTIDep</span></code></p> |
| <p>Determines if a task’s upstream tasks are in a state that allows a given task instance |
| to run.</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.TriggerRuleDep.NAME"> |
| <code class="descname">NAME</code><em class="property"> = Trigger Rule</em><a class="headerlink" href="#airflow.models.TriggerRuleDep.NAME" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TriggerRuleDep.IGNOREABLE"> |
| <code class="descname">IGNOREABLE</code><em class="property"> = True</em><a class="headerlink" href="#airflow.models.TriggerRuleDep.IGNOREABLE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TriggerRuleDep.IS_TASK_DEP"> |
| <code class="descname">IS_TASK_DEP</code><em class="property"> = True</em><a class="headerlink" href="#airflow.models.TriggerRuleDep.IS_TASK_DEP" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TriggerRuleDep._get_dep_statuses"> |
| <code class="descname">_get_dep_statuses</code><span class="sig-paren">(</span><em>self</em>, <em>ti</em>, <em>session</em>, <em>dep_context</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TriggerRuleDep._get_dep_statuses" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TriggerRuleDep._evaluate_trigger_rule"> |
| <code class="descname">_evaluate_trigger_rule</code><span class="sig-paren">(</span><em>self</em>, <em>ti</em>, <em>successes</em>, <em>skipped</em>, <em>failed</em>, <em>upstream_failed</em>, <em>done</em>, <em>flag_upstream_failed</em>, <em>session</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TriggerRuleDep._evaluate_trigger_rule" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Yields a dependency status that indicate whether the given task instance’s trigger |
| rule was met.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>ti</strong> (<a class="reference internal" href="#airflow.models.TaskInstance" title="airflow.models.TaskInstance"><em>airflow.models.TaskInstance</em></a>) – the task instance to evaluate the trigger rule of</p></li> |
| <li><p><strong>successes</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Number of successful upstream tasks</p></li> |
| <li><p><strong>skipped</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Number of skipped upstream tasks</p></li> |
| <li><p><strong>failed</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Number of failed upstream tasks</p></li> |
| <li><p><strong>upstream_failed</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Number of upstream_failed upstream tasks</p></li> |
| <li><p><strong>done</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – Number of completed upstream tasks</p></li> |
| <li><p><strong>flag_upstream_failed</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – This is a hack to generate |
| the upstream_failed state creation while checking to see |
| whether the task instance is runnable. It was the shortest |
| path to add the feature</p></li> |
| <li><p><strong>session</strong> (<a class="reference external" href="https://docs.sqlalchemy.org/en/latest/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> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.DepContext"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">DepContext</code><span class="sig-paren">(</span><em>deps=None</em>, <em>flag_upstream_failed=False</em>, <em>ignore_all_deps=False</em>, <em>ignore_depends_on_past=False</em>, <em>ignore_in_retry_period=False</em>, <em>ignore_in_reschedule_period=False</em>, <em>ignore_task_deps=False</em>, <em>ignore_ti_state=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/ti_deps/dep_context.html#DepContext"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.DepContext" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <p>A base class for contexts that specifies which dependencies should be evaluated in |
| the context for a task instance to satisfy the requirements of the context. Also |
| stores state related to the context that can be used by dependency classes.</p> |
| <p>For example there could be a SomeRunContext that subclasses this class which has |
| dependencies for:</p> |
| <ul class="simple"> |
| <li><p>Making sure there are slots available on the infrastructure to run the task instance</p></li> |
| <li><p>A task-instance’s task-specific dependencies are met (e.g. the previous task |
| instance completed successfully)</p></li> |
| <li><p>…</p></li> |
| </ul> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>deps</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#set" title="(in Python v3.7)"><em>set</em></a><em>(</em><em>airflow.ti_deps.deps.base_ti_dep.BaseTIDep</em><em>)</em>) – The context-specific dependencies that need to be evaluated for a |
| task instance to run in this execution context.</p></li> |
| <li><p><strong>flag_upstream_failed</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.7)"><em>bool</em></a>) – This is a hack to generate the upstream_failed state |
| creation while checking to see whether the task instance is runnable. It was the |
| shortest path to add the feature. This is bad since this class should be pure (no |
| side effects).</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>) – Whether or not the context should ignore all ignoreable |
| 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_in_retry_period</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 retry period for task instances</p></li> |
| <li><p><strong>ignore_in_reschedule_period</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 reschedule period for task instances</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> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="data"> |
| <dt id="airflow.models.QUEUE_DEPS"> |
| <code class="descclassname">airflow.models.</code><code class="descname">QUEUE_DEPS</code><a class="reference internal" href="../../../_modules/airflow/ti_deps/dep_context.html#QUEUE_DEPS"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.QUEUE_DEPS" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="data"> |
| <dt id="airflow.models.RUN_DEPS"> |
| <code class="descclassname">airflow.models.</code><code class="descname">RUN_DEPS</code><a class="reference internal" href="../../../_modules/airflow/ti_deps/dep_context.html#RUN_DEPS"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.RUN_DEPS" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.models.list_py_file_paths"> |
| <code class="descclassname">airflow.models.</code><code class="descname">list_py_file_paths</code><span class="sig-paren">(</span><em>directory</em>, <em>safe_mode=True</em>, <em>include_examples=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/utils/dag_processing.html#list_py_file_paths"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.list_py_file_paths" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Traverse a directory and look for Python files.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>directory</strong> (<em>unicode</em>) – the directory to traverse</p></li> |
| <li><p><strong>safe_mode</strong> – whether to use a heuristic to determine whether a file |
| contains Airflow DAG definitions</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>a list of paths to Python files in the specified directory</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>[unicode]</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="data"> |
| <dt id="airflow.models.cron_presets"> |
| <code class="descclassname">airflow.models.</code><code class="descname">cron_presets</code><a class="reference internal" href="../../../_modules/airflow/utils/dates.html#cron_presets"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.cron_presets" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.models.utils_date_range"> |
| <code class="descclassname">airflow.models.</code><code class="descname">utils_date_range</code><span class="sig-paren">(</span><em>start_date</em>, <em>end_date=None</em>, <em>num=None</em>, <em>delta=None</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.utils_date_range" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get a set of dates as a list based on a start, end and delta, delta |
| can be something that can be added to <cite>datetime.datetime</cite> |
| or a cron expression as a <cite>str</cite></p> |
| <p>:Example:</p> |
| <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">date_range</span><span class="p">(</span><span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="n">delta</span><span class="o">=</span><span class="n">timedelta</span><span class="p">(</span><span class="mi">1</span><span class="p">))</span> |
| <span class="p">[</span><span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> |
| <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)]</span> |
| <span class="n">date_range</span><span class="p">(</span><span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="n">delta</span><span class="o">=</span><span class="s1">'0 0 * * *'</span><span class="p">)</span> |
| <span class="p">[</span><span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> |
| <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)]</span> |
| <span class="n">date_range</span><span class="p">(</span><span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="n">delta</span><span class="o">=</span><span class="s2">"0 0 0 * *"</span><span class="p">)</span> |
| <span class="p">[</span><span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">),</span> |
| <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="p">(</span><span class="mi">2016</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">)]</span> |
| </pre></div> |
| </div> |
| <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>) – anchor date to start the series from</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>) – right boundary for the date range</p></li> |
| <li><p><strong>num</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><em>int</em></a>) – alternatively to end_date, you can specify the number of |
| number of entries you want in the range. This number can be negative, |
| output will always be sorted regardless</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.models.provide_session"> |
| <code class="descclassname">airflow.models.</code><code class="descname">provide_session</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/utils/db.html#provide_session"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.provide_session" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Function decorator that provides a session if it isn’t provided. |
| If you want to reuse a session or run the function as part of a |
| database transaction, you pass it to the function, if not this wrapper |
| will create one and close it for you.</p> |
| </dd></dl> |
| |
| <dl class="data"> |
| <dt id="airflow.models.apply_defaults"> |
| <code class="descclassname">airflow.models.</code><code class="descname">apply_defaults</code><a class="reference internal" href="../../../_modules/airflow/utils/decorators.html#apply_defaults"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.apply_defaults" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.models.send_email"> |
| <code class="descclassname">airflow.models.</code><code class="descname">send_email</code><span class="sig-paren">(</span><em>to</em>, <em>subject</em>, <em>html_content</em>, <em>files=None</em>, <em>dryrun=False</em>, <em>cc=None</em>, <em>bcc=None</em>, <em>mime_subtype='mixed'</em>, <em>mime_charset='us-ascii'</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/utils/email.html#send_email"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.send_email" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Send email using backend specified in EMAIL_BACKEND.</p> |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.models.as_tuple"> |
| <code class="descclassname">airflow.models.</code><code class="descname">as_tuple</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/utils/helpers.html#as_tuple"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.as_tuple" title="Permalink to this definition">¶</a></dt> |
| <dd><p>If obj is a container, returns obj as a tuple. |
| Otherwise, returns a tuple containing obj.</p> |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.models.is_container"> |
| <code class="descclassname">airflow.models.</code><code class="descname">is_container</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/utils/helpers.html#is_container"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.is_container" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Test if an object is a container (iterable) but not a string</p> |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.models.validate_key"> |
| <code class="descclassname">airflow.models.</code><code class="descname">validate_key</code><span class="sig-paren">(</span><em>k</em>, <em>max_length=250</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/utils/helpers.html#validate_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.validate_key" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.models.pprinttable"> |
| <code class="descclassname">airflow.models.</code><code class="descname">pprinttable</code><span class="sig-paren">(</span><em>rows</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/utils/helpers.html#pprinttable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.pprinttable" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns a pretty ascii table from tuples</p> |
| <p>If namedtuple are used, the table will have headers</p> |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.Resources"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">Resources</code><span class="sig-paren">(</span><em>cpus=configuration.conf.getint('operators'</em>, <em>'default_cpus')</em>, <em>ram=configuration.conf.getint('operators'</em>, <em>'default_ram')</em>, <em>disk=configuration.conf.getint('operators'</em>, <em>'default_disk')</em>, <em>gpus=configuration.conf.getint('operators'</em>, <em>'default_gpus')</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/utils/operator_resources.html#Resources"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.Resources" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <p>The resources required by an operator. Resources that are not specified will use the |
| default values from the airflow config.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>cpus</strong> (<em>long</em>) – The number of cpu cores that are required</p></li> |
| <li><p><strong>ram</strong> (<em>long</em>) – The amount of RAM required</p></li> |
| <li><p><strong>disk</strong> (<em>long</em>) – The amount of disk space required</p></li> |
| <li><p><strong>gpus</strong> (<em>long</em>) – The number of gpu units that are required</p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="method"> |
| <dt id="airflow.models.Resources.__eq__"> |
| <code class="descname">__eq__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Resources.__eq__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Resources.__repr__"> |
| <code class="descname">__repr__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Resources.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.State"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">State</code><a class="reference internal" href="../../../_modules/airflow/utils/state.html#State"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.State" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <p>Static class with task instance states constants and color method to |
| avoid hardcoding.</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.State.NONE"> |
| <code class="descname">NONE</code><a class="headerlink" href="#airflow.models.State.NONE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.State.REMOVED"> |
| <code class="descname">REMOVED</code><em class="property"> = removed</em><a class="headerlink" href="#airflow.models.State.REMOVED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.State.SCHEDULED"> |
| <code class="descname">SCHEDULED</code><em class="property"> = scheduled</em><a class="headerlink" href="#airflow.models.State.SCHEDULED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.State.QUEUED"> |
| <code class="descname">QUEUED</code><em class="property"> = queued</em><a class="headerlink" href="#airflow.models.State.QUEUED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.State.RUNNING"> |
| <code class="descname">RUNNING</code><em class="property"> = running</em><a class="headerlink" href="#airflow.models.State.RUNNING" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.State.SUCCESS"> |
| <code class="descname">SUCCESS</code><em class="property"> = success</em><a class="headerlink" href="#airflow.models.State.SUCCESS" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.State.SHUTDOWN"> |
| <code class="descname">SHUTDOWN</code><em class="property"> = shutdown</em><a class="headerlink" href="#airflow.models.State.SHUTDOWN" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.State.FAILED"> |
| <code class="descname">FAILED</code><em class="property"> = failed</em><a class="headerlink" href="#airflow.models.State.FAILED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.State.UP_FOR_RETRY"> |
| <code class="descname">UP_FOR_RETRY</code><em class="property"> = up_for_retry</em><a class="headerlink" href="#airflow.models.State.UP_FOR_RETRY" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.State.UP_FOR_RESCHEDULE"> |
| <code class="descname">UP_FOR_RESCHEDULE</code><em class="property"> = up_for_reschedule</em><a class="headerlink" href="#airflow.models.State.UP_FOR_RESCHEDULE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.State.UPSTREAM_FAILED"> |
| <code class="descname">UPSTREAM_FAILED</code><em class="property"> = upstream_failed</em><a class="headerlink" href="#airflow.models.State.UPSTREAM_FAILED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.State.SKIPPED"> |
| <code class="descname">SKIPPED</code><em class="property"> = skipped</em><a class="headerlink" href="#airflow.models.State.SKIPPED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.State.task_states"> |
| <code class="descname">task_states</code><a class="headerlink" href="#airflow.models.State.task_states" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.State.dag_states"> |
| <code class="descname">dag_states</code><a class="headerlink" href="#airflow.models.State.dag_states" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.State.state_color"> |
| <code class="descname">state_color</code><a class="headerlink" href="#airflow.models.State.state_color" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="classmethod"> |
| <dt id="airflow.models.State.color"> |
| <em class="property">classmethod </em><code class="descname">color</code><span class="sig-paren">(</span><em>cls</em>, <em>state</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.State.color" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="classmethod"> |
| <dt id="airflow.models.State.color_fg"> |
| <em class="property">classmethod </em><code class="descname">color_fg</code><span class="sig-paren">(</span><em>cls</em>, <em>state</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.State.color_fg" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="classmethod"> |
| <dt id="airflow.models.State.finished"> |
| <em class="property">classmethod </em><code class="descname">finished</code><span class="sig-paren">(</span><em>cls</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.State.finished" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A list of states indicating that a task started and completed a |
| run attempt. Note that the attempt could have resulted in failure or |
| have been interrupted; in any case, it is no longer running.</p> |
| </dd></dl> |
| |
| <dl class="classmethod"> |
| <dt id="airflow.models.State.unfinished"> |
| <em class="property">classmethod </em><code class="descname">unfinished</code><span class="sig-paren">(</span><em>cls</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.State.unfinished" title="Permalink to this definition">¶</a></dt> |
| <dd><p>A list of states indicating that a task either has not completed |
| a run or has not even started.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.UtcDateTime"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">UtcDateTime</code><a class="reference internal" href="../../../_modules/airflow/utils/sqlalchemy.html#UtcDateTime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.UtcDateTime" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference external" href="https://docs.sqlalchemy.org/en/latest/core/custom_types.html#sqlalchemy.types.TypeDecorator" title="(in SQLAlchemy v1.3)"><code class="xref py py-class docutils literal notranslate"><span class="pre">sqlalchemy.types.TypeDecorator</span></code></a></p> |
| <p>Almost equivalent to <a class="reference external" href="https://docs.sqlalchemy.org/en/latest/core/type_basics.html#sqlalchemy.types.DateTime" title="(in SQLAlchemy v1.3)"><code class="xref py py-class docutils literal notranslate"><span class="pre">DateTime</span></code></a> with |
| <code class="docutils literal notranslate"><span class="pre">timezone=True</span></code> option, but it differs from that by:</p> |
| <ul class="simple"> |
| <li><p>Never silently take naive <a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime</span></code></a>, instead it |
| always raise <a class="reference external" href="https://docs.python.org/3/library/exceptions.html#ValueError" title="(in Python v3.7)"><code class="xref py py-exc docutils literal notranslate"><span class="pre">ValueError</span></code></a> unless time zone aware value.</p></li> |
| <li><p><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime</span></code></a> value’s <a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime.tzinfo" title="(in Python v3.7)"><code class="xref py py-attr docutils literal notranslate"><span class="pre">tzinfo</span></code></a> |
| is always converted to UTC.</p></li> |
| <li><p>Unlike SQLAlchemy’s built-in <a class="reference external" href="https://docs.sqlalchemy.org/en/latest/core/type_basics.html#sqlalchemy.types.DateTime" title="(in SQLAlchemy v1.3)"><code class="xref py py-class docutils literal notranslate"><span class="pre">DateTime</span></code></a>, |
| it never return naive <a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">datetime</span></code></a>, but time zone |
| aware value, even with SQLite or MySQL.</p></li> |
| <li><p>Always returns DateTime in UTC</p></li> |
| </ul> |
| <dl class="attribute"> |
| <dt id="airflow.models.UtcDateTime.impl"> |
| <code class="descname">impl</code><a class="headerlink" href="#airflow.models.UtcDateTime.impl" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.UtcDateTime.process_bind_param"> |
| <code class="descname">process_bind_param</code><span class="sig-paren">(</span><em>self</em>, <em>value</em>, <em>dialect</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.UtcDateTime.process_bind_param" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.UtcDateTime.process_result_value"> |
| <code class="descname">process_result_value</code><span class="sig-paren">(</span><em>self</em>, <em>value</em>, <em>dialect</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.UtcDateTime.process_result_value" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Processes DateTimes from the DB making sure it is always |
| returning UTC. Not using timezone.convert_to_utc as that |
| converts to configured TIMEZONE while the DB might be |
| running with some other setting. We assume UTC datetimes |
| in the database.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.Interval"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">Interval</code><a class="reference internal" href="../../../_modules/airflow/utils/sqlalchemy.html#Interval"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.Interval" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference external" href="https://docs.sqlalchemy.org/en/latest/core/custom_types.html#sqlalchemy.types.TypeDecorator" title="(in SQLAlchemy v1.3)"><code class="xref py py-class docutils literal notranslate"><span class="pre">sqlalchemy.types.TypeDecorator</span></code></a></p> |
| <dl class="attribute"> |
| <dt id="airflow.models.Interval.impl"> |
| <code class="descname">impl</code><a class="headerlink" href="#airflow.models.Interval.impl" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.Interval.attr_keys"> |
| <code class="descname">attr_keys</code><a class="headerlink" href="#airflow.models.Interval.attr_keys" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Interval.process_bind_param"> |
| <code class="descname">process_bind_param</code><span class="sig-paren">(</span><em>self</em>, <em>value</em>, <em>dialect</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Interval.process_bind_param" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Interval.process_result_value"> |
| <code class="descname">process_result_value</code><span class="sig-paren">(</span><em>self</em>, <em>value</em>, <em>dialect</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.Interval.process_result_value" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.timeout"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">timeout</code><span class="sig-paren">(</span><em>seconds=1</em>, <em>error_message='Timeout'</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/utils/timeout.html#timeout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.timeout" 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>To be used in a <code class="docutils literal notranslate"><span class="pre">with</span></code> block and timeout its content.</p> |
| <dl class="method"> |
| <dt id="airflow.models.timeout.handle_timeout"> |
| <code class="descname">handle_timeout</code><span class="sig-paren">(</span><em>self</em>, <em>signum</em>, <em>frame</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.timeout.handle_timeout" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.timeout.__enter__"> |
| <code class="descname">__enter__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.timeout.__enter__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.timeout.__exit__"> |
| <code class="descname">__exit__</code><span class="sig-paren">(</span><em>self</em>, <em>type</em>, <em>value</em>, <em>traceback</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.timeout.__exit__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.TriggerRule"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">TriggerRule</code><a class="reference internal" href="../../../_modules/airflow/utils/trigger_rule.html#TriggerRule"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.TriggerRule" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <dl class="attribute"> |
| <dt id="airflow.models.TriggerRule.ALL_SUCCESS"> |
| <code class="descname">ALL_SUCCESS</code><em class="property"> = all_success</em><a class="headerlink" href="#airflow.models.TriggerRule.ALL_SUCCESS" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TriggerRule.ALL_FAILED"> |
| <code class="descname">ALL_FAILED</code><em class="property"> = all_failed</em><a class="headerlink" href="#airflow.models.TriggerRule.ALL_FAILED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TriggerRule.ALL_DONE"> |
| <code class="descname">ALL_DONE</code><em class="property"> = all_done</em><a class="headerlink" href="#airflow.models.TriggerRule.ALL_DONE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TriggerRule.ONE_SUCCESS"> |
| <code class="descname">ONE_SUCCESS</code><em class="property"> = one_success</em><a class="headerlink" href="#airflow.models.TriggerRule.ONE_SUCCESS" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TriggerRule.ONE_FAILED"> |
| <code class="descname">ONE_FAILED</code><em class="property"> = one_failed</em><a class="headerlink" href="#airflow.models.TriggerRule.ONE_FAILED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TriggerRule.NONE_FAILED"> |
| <code class="descname">NONE_FAILED</code><em class="property"> = none_failed</em><a class="headerlink" href="#airflow.models.TriggerRule.NONE_FAILED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TriggerRule.NONE_SKIPPED"> |
| <code class="descname">NONE_SKIPPED</code><em class="property"> = none_skipped</em><a class="headerlink" href="#airflow.models.TriggerRule.NONE_SKIPPED" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TriggerRule.DUMMY"> |
| <code class="descname">DUMMY</code><em class="property"> = dummy</em><a class="headerlink" href="#airflow.models.TriggerRule.DUMMY" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.TriggerRule._ALL_TRIGGER_RULES"> |
| <code class="descname">_ALL_TRIGGER_RULES</code><a class="headerlink" href="#airflow.models.TriggerRule._ALL_TRIGGER_RULES" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="classmethod"> |
| <dt id="airflow.models.TriggerRule.is_valid"> |
| <em class="property">classmethod </em><code class="descname">is_valid</code><span class="sig-paren">(</span><em>cls</em>, <em>trigger_rule</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TriggerRule.is_valid" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="classmethod"> |
| <dt id="airflow.models.TriggerRule.all_triggers"> |
| <em class="property">classmethod </em><code class="descname">all_triggers</code><span class="sig-paren">(</span><em>cls</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.TriggerRule.all_triggers" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.WeightRule"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">WeightRule</code><a class="reference internal" href="../../../_modules/airflow/utils/weight_rule.html#WeightRule"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.WeightRule" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <dl class="attribute"> |
| <dt id="airflow.models.WeightRule.DOWNSTREAM"> |
| <code class="descname">DOWNSTREAM</code><em class="property"> = downstream</em><a class="headerlink" href="#airflow.models.WeightRule.DOWNSTREAM" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.WeightRule.UPSTREAM"> |
| <code class="descname">UPSTREAM</code><em class="property"> = upstream</em><a class="headerlink" href="#airflow.models.WeightRule.UPSTREAM" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.WeightRule.ABSOLUTE"> |
| <code class="descname">ABSOLUTE</code><em class="property"> = absolute</em><a class="headerlink" href="#airflow.models.WeightRule.ABSOLUTE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.WeightRule._ALL_WEIGHT_RULES"> |
| <code class="descname">_ALL_WEIGHT_RULES</code><a class="headerlink" href="#airflow.models.WeightRule._ALL_WEIGHT_RULES" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="classmethod"> |
| <dt id="airflow.models.WeightRule.is_valid"> |
| <em class="property">classmethod </em><code class="descname">is_valid</code><span class="sig-paren">(</span><em>cls</em>, <em>weight_rule</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.WeightRule.is_valid" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="classmethod"> |
| <dt id="airflow.models.WeightRule.all_weight_rules"> |
| <em class="property">classmethod </em><code class="descname">all_weight_rules</code><span class="sig-paren">(</span><em>cls</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.WeightRule.all_weight_rules" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.models.get_hostname"> |
| <code class="descclassname">airflow.models.</code><code class="descname">get_hostname</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/utils/net.html#get_hostname"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.get_hostname" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Fetch the hostname using the callable from the config or using |
| <cite>socket.getfqdn</cite> as a fallback.</p> |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.LoggingMixin"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">LoggingMixin</code><span class="sig-paren">(</span><em>context=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/utils/log/logging_mixin.html#LoggingMixin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.LoggingMixin" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <p>Convenience super-class to have a logger configured with the class name</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.LoggingMixin.logger"> |
| <code class="descname">logger</code><a class="headerlink" href="#airflow.models.LoggingMixin.logger" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.LoggingMixin.log"> |
| <code class="descname">log</code><a class="headerlink" href="#airflow.models.LoggingMixin.log" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.LoggingMixin._set_context"> |
| <code class="descname">_set_context</code><span class="sig-paren">(</span><em>self</em>, <em>context</em><span class="sig-paren">)</span><a class="headerlink" href="#airflow.models.LoggingMixin._set_context" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="data"> |
| <dt id="airflow.models.XCOM_RETURN_KEY"> |
| <code class="descclassname">airflow.models.</code><code class="descname">XCOM_RETURN_KEY</code><em class="property"> = return_value</em><a class="reference internal" href="../../../_modules/airflow/models.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="data"> |
| <dt id="airflow.models.Stats"> |
| <code class="descclassname">airflow.models.</code><code class="descname">Stats</code><a class="reference internal" href="../../../_modules/airflow/models.html#Stats"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.Stats" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="exception"> |
| <dt id="airflow.models.InvalidFernetToken"> |
| <em class="property">exception </em><code class="descclassname">airflow.models.</code><code class="descname">InvalidFernetToken</code><a class="reference internal" href="../../../_modules/airflow/models.html#InvalidFernetToken"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.InvalidFernetToken" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference external" href="https://docs.python.org/3/library/exceptions.html#Exception" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">Exception</span></code></a></p> |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.NullFernet"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">NullFernet</code><a class="reference internal" href="../../../_modules/airflow/models.html#NullFernet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.NullFernet" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases:<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.7)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <p>A “Null” encryptor class that doesn’t encrypt or decrypt but that presents |
| a similar interface to Fernet.</p> |
| <p>The purpose of this is to make the rest of the code not have to know the |
| difference, and to only display the message once, not 20 times when |
| <cite>airflow initdb</cite> is ran.</p> |
| <dl class="attribute"> |
| <dt id="airflow.models.NullFernet.is_encrypted"> |
| <code class="descname">is_encrypted</code><em class="property"> = False</em><a class="reference internal" href="../../../_modules/airflow/models.html#NullFernet.is_encrypted"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.NullFernet.is_encrypted" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.NullFernet.decrpyt"> |
| <code class="descname">decrpyt</code><span class="sig-paren">(</span><em>self</em>, <em>b</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#NullFernet.decrpyt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.NullFernet.decrpyt" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.NullFernet.encrypt"> |
| <code class="descname">encrypt</code><span class="sig-paren">(</span><em>self</em>, <em>b</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#NullFernet.encrypt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.NullFernet.encrypt" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="data"> |
| <dt id="airflow.models._fernet"> |
| <code class="descclassname">airflow.models.</code><code class="descname">_fernet</code><a class="reference internal" href="../../../_modules/airflow/models.html#_fernet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models._fernet" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.models.get_fernet"> |
| <code class="descclassname">airflow.models.</code><code class="descname">get_fernet</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#get_fernet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.get_fernet" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Deferred load of Fernet key.</p> |
| <p>This function could fail either because Cryptography is not installed |
| or because the Fernet key is invalid.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Returns</dt> |
| <dd class="field-odd"><p>Fernet object</p> |
| </dd> |
| <dt class="field-even">Raises</dt> |
| <dd class="field-even"><p>airflow.exceptions.AirflowException if there’s a problem trying to load Fernet</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="data"> |
| <dt id="airflow.models._CONTEXT_MANAGER_DAG"> |
| <code class="descclassname">airflow.models.</code><code class="descname">_CONTEXT_MANAGER_DAG</code><a class="reference internal" href="../../../_modules/airflow/models.html#_CONTEXT_MANAGER_DAG"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models._CONTEXT_MANAGER_DAG" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.models.clear_task_instances"> |
| <code class="descclassname">airflow.models.</code><code class="descname">clear_task_instances</code><span class="sig-paren">(</span><em>tis</em>, <em>session</em>, <em>activate_dag_runs=True</em>, <em>dag=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.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> |
| <dd><p>Clears a set of task instances, but makes sure the running ones |
| get killed.</p> |
| <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="function"> |
| <dt id="airflow.models.get_last_dagrun"> |
| <code class="descclassname">airflow.models.</code><code class="descname">get_last_dagrun</code><span class="sig-paren">(</span><em>dag_id</em>, <em>session</em>, <em>include_externally_triggered=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#get_last_dagrun"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.get_last_dagrun" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the last dag run for a dag, None if there was none. |
| Last dag run can be any type of run eg. scheduled or backfilled. |
| Overridden DagRuns are ignored.</p> |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.DagBag"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">DagBag</code><span class="sig-paren">(</span><em>dag_folder=None</em>, <em>executor=None</em>, <em>include_examples=configuration.conf.getboolean('core'</em>, <em>'LOAD_EXAMPLES')</em>, <em>safe_mode=configuration.conf.getboolean('core'</em>, <em>'DAG_DISCOVERY_SAFE_MODE')</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.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="descname">CYCLE_NEW</code><em class="property"> = 0</em><a class="reference internal" href="../../../_modules/airflow/models.html#DagBag.CYCLE_NEW"><span class="viewcode-link">[source]</span></a><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="descname">CYCLE_IN_PROGRESS</code><em class="property"> = 1</em><a class="reference internal" href="../../../_modules/airflow/models.html#DagBag.CYCLE_IN_PROGRESS"><span class="viewcode-link">[source]</span></a><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="descname">CYCLE_DONE</code><em class="property"> = 2</em><a class="reference internal" href="../../../_modules/airflow/models.html#DagBag.CYCLE_DONE"><span class="viewcode-link">[source]</span></a><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="descname">dag_ids</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagBag.dag_ids"><span class="viewcode-link">[source]</span></a><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="descname">size</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagBag.size"><span class="viewcode-link">[source]</span></a><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="descname">get_dag</code><span class="sig-paren">(</span><em>self</em>, <em>dag_id</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagBag.get_dag"><span class="viewcode-link">[source]</span></a><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="descname">process_file</code><span class="sig-paren">(</span><em>self</em>, <em>filepath</em>, <em>only_if_updated=True</em>, <em>safe_mode=True</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagBag.process_file"><span class="viewcode-link">[source]</span></a><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="descname">kill_zombies</code><span class="sig-paren">(</span><em>self</em>, <em>zombies</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagBag.kill_zombies"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.DagBag.kill_zombies" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Fail given 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"><ul class="simple"> |
| <li><p><strong>zombies</strong> (<em>airflow.utils.dag_processing.SimpleTaskInstance</em>) – zombie task instances to kill.</p></li> |
| <li><p><strong>session</strong> (<a class="reference external" href="https://docs.sqlalchemy.org/en/latest/orm/session_api.html#sqlalchemy.orm.session.Session" title="(in SQLAlchemy v1.3)"><em>sqlalchemy.orm.session.Session</em></a>) – DB session.</p></li> |
| </ul> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DagBag.bag_dag"> |
| <code class="descname">bag_dag</code><span class="sig-paren">(</span><em>self</em>, <em>dag</em>, <em>parent_dag</em>, <em>root_dag</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagBag.bag_dag"><span class="viewcode-link">[source]</span></a><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="descname">collect_dags</code><span class="sig-paren">(</span><em>self</em>, <em>dag_folder=None</em>, <em>only_if_updated=True</em>, <em>include_examples=configuration.conf.getboolean('core'</em>, <em>'LOAD_EXAMPLES')</em>, <em>safe_mode=configuration.conf.getboolean('core'</em>, <em>'DAG_DISCOVERY_SAFE_MODE')</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagBag.collect_dags"><span class="viewcode-link">[source]</span></a><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="descname">dagbag_report</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagBag.dagbag_report"><span class="viewcode-link">[source]</span></a><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.User"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">User</code><a class="reference internal" href="../../../_modules/airflow/models.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="descname">__tablename__</code><em class="property"> = users</em><a class="reference internal" href="../../../_modules/airflow/models.html#User.__tablename__"><span class="viewcode-link">[source]</span></a><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="descname">id</code><a class="reference internal" href="../../../_modules/airflow/models.html#User.id"><span class="viewcode-link">[source]</span></a><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="descname">username</code><a class="reference internal" href="../../../_modules/airflow/models.html#User.username"><span class="viewcode-link">[source]</span></a><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="descname">email</code><a class="reference internal" href="../../../_modules/airflow/models.html#User.email"><span class="viewcode-link">[source]</span></a><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="descname">superuser</code><a class="reference internal" href="../../../_modules/airflow/models.html#User.superuser"><span class="viewcode-link">[source]</span></a><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="descname">__repr__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#User.__repr__"><span class="viewcode-link">[source]</span></a><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="descname">get_id</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#User.get_id"><span class="viewcode-link">[source]</span></a><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="descname">is_superuser</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#User.is_superuser"><span class="viewcode-link">[source]</span></a><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.TaskInstance"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">TaskInstance</code><span class="sig-paren">(</span><em>task</em>, <em>execution_date</em>, <em>state=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.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="descname">__tablename__</code><em class="property"> = task_instance</em><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.__tablename__"><span class="viewcode-link">[source]</span></a><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="descname">task_id</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.task_id"><span class="viewcode-link">[source]</span></a><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="descname">dag_id</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.dag_id"><span class="viewcode-link">[source]</span></a><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="descname">execution_date</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.execution_date"><span class="viewcode-link">[source]</span></a><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="descname">start_date</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.start_date"><span class="viewcode-link">[source]</span></a><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="descname">end_date</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.end_date"><span class="viewcode-link">[source]</span></a><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="descname">duration</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.duration"><span class="viewcode-link">[source]</span></a><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="descname">state</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.state"><span class="viewcode-link">[source]</span></a><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="descname">_try_number</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance._try_number"><span class="viewcode-link">[source]</span></a><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="descname">max_tries</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.max_tries"><span class="viewcode-link">[source]</span></a><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="descname">hostname</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.hostname"><span class="viewcode-link">[source]</span></a><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="descname">unixname</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.unixname"><span class="viewcode-link">[source]</span></a><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="descname">job_id</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.job_id"><span class="viewcode-link">[source]</span></a><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="descname">pool</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.pool"><span class="viewcode-link">[source]</span></a><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="descname">queue</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.queue"><span class="viewcode-link">[source]</span></a><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="descname">priority_weight</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.priority_weight"><span class="viewcode-link">[source]</span></a><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="descname">operator</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.operator"><span class="viewcode-link">[source]</span></a><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="descname">queued_dttm</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.queued_dttm"><span class="viewcode-link">[source]</span></a><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="descname">pid</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.pid"><span class="viewcode-link">[source]</span></a><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="descname">executor_config</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.executor_config"><span class="viewcode-link">[source]</span></a><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="descname">__table_args__</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.__table_args__"><span class="viewcode-link">[source]</span></a><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="descname">try_number</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.try_number"><span class="viewcode-link">[source]</span></a><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="descname">next_try_number</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.next_try_number"><span class="viewcode-link">[source]</span></a><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="descname">log_filepath</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.log_filepath"><span class="viewcode-link">[source]</span></a><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="descname">log_url</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.log_url"><span class="viewcode-link">[source]</span></a><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="descname">mark_success_url</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.mark_success_url"><span class="viewcode-link">[source]</span></a><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="descname">key</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.key"><span class="viewcode-link">[source]</span></a><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="descname">is_premature</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.is_premature"><span class="viewcode-link">[source]</span></a><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="descname">previous_ti</code><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.previous_ti"><span class="viewcode-link">[source]</span></a><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="method"> |
| <dt id="airflow.models.TaskInstance.init_on_load"> |
| <code class="descname">init_on_load</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.init_on_load"><span class="viewcode-link">[source]</span></a><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="descname">command</code><span class="sig-paren">(</span><em>self</em>, <em>mark_success=False</em>, <em>ignore_all_deps=False</em>, <em>ignore_depends_on_past=False</em>, <em>ignore_task_deps=False</em>, <em>ignore_ti_state=False</em>, <em>local=False</em>, <em>pickle_id=None</em>, <em>raw=False</em>, <em>job_id=None</em>, <em>pool=None</em>, <em>cfg_path=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.command"><span class="viewcode-link">[source]</span></a><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="descname">command_as_list</code><span class="sig-paren">(</span><em>self</em>, <em>mark_success=False</em>, <em>ignore_all_deps=False</em>, <em>ignore_task_deps=False</em>, <em>ignore_depends_on_past=False</em>, <em>ignore_ti_state=False</em>, <em>local=False</em>, <em>pickle_id=None</em>, <em>raw=False</em>, <em>job_id=None</em>, <em>pool=None</em>, <em>cfg_path=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.command_as_list"><span class="viewcode-link">[source]</span></a><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="staticmethod"> |
| <dt id="airflow.models.TaskInstance.generate_command"> |
| <em class="property">static </em><code class="descname">generate_command</code><span class="sig-paren">(</span><em>dag_id</em>, <em>task_id</em>, <em>execution_date</em>, <em>mark_success=False</em>, <em>ignore_all_deps=False</em>, <em>ignore_depends_on_past=False</em>, <em>ignore_task_deps=False</em>, <em>ignore_ti_state=False</em>, <em>local=False</em>, <em>pickle_id=None</em>, <em>file_path=None</em>, <em>raw=False</em>, <em>job_id=None</em>, <em>pool=None</em>, <em>cfg_path=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.generate_command"><span class="viewcode-link">[source]</span></a><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> (<em>datetime</em>) – 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="descname">current_state</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.current_state"><span class="viewcode-link">[source]</span></a><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="descname">error</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.error"><span class="viewcode-link">[source]</span></a><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="descname">refresh_from_db</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em>, <em>lock_for_update=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.refresh_from_db"><span class="viewcode-link">[source]</span></a><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"><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> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.TaskInstance.clear_xcom_data"> |
| <code class="descname">clear_xcom_data</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.clear_xcom_data"><span class="viewcode-link">[source]</span></a><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="descname">set_state</code><span class="sig-paren">(</span><em>self</em>, <em>state</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.set_state"><span class="viewcode-link">[source]</span></a><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="descname">are_dependents_done</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.are_dependents_done"><span class="viewcode-link">[source]</span></a><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="descname">_get_previous_ti</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance._get_previous_ti"><span class="viewcode-link">[source]</span></a><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="descname">are_dependencies_met</code><span class="sig-paren">(</span><em>self</em>, <em>dep_context=None</em>, <em>session=None</em>, <em>verbose=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.are_dependencies_met"><span class="viewcode-link">[source]</span></a><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> (<a class="reference internal" href="#airflow.models.DepContext" title="airflow.models.DepContext"><em>DepContext</em></a>) – 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/latest/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="descname">get_failed_dep_statuses</code><span class="sig-paren">(</span><em>self</em>, <em>dep_context=None</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.get_failed_dep_statuses"><span class="viewcode-link">[source]</span></a><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="descname">__repr__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.__repr__"><span class="viewcode-link">[source]</span></a><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="descname">next_retry_datetime</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.next_retry_datetime"><span class="viewcode-link">[source]</span></a><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="descname">ready_for_retry</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.ready_for_retry"><span class="viewcode-link">[source]</span></a><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="descname">pool_full</code><span class="sig-paren">(</span><em>self</em>, <em>session</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.pool_full"><span class="viewcode-link">[source]</span></a><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="descname">get_dagrun</code><span class="sig-paren">(</span><em>self</em>, <em>session</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.get_dagrun"><span class="viewcode-link">[source]</span></a><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="descname">_check_and_change_state_before_execution</code><span class="sig-paren">(</span><em>self</em>, <em>verbose=True</em>, <em>ignore_all_deps=False</em>, <em>ignore_depends_on_past=False</em>, <em>ignore_task_deps=False</em>, <em>ignore_ti_state=False</em>, <em>mark_success=False</em>, <em>test_mode=False</em>, <em>job_id=None</em>, <em>pool=None</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance._check_and_change_state_before_execution"><span class="viewcode-link">[source]</span></a><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="descname">_run_raw_task</code><span class="sig-paren">(</span><em>self</em>, <em>mark_success=False</em>, <em>test_mode=False</em>, <em>job_id=None</em>, <em>pool=None</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance._run_raw_task"><span class="viewcode-link">[source]</span></a><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="descname">run</code><span class="sig-paren">(</span><em>self</em>, <em>verbose=True</em>, <em>ignore_all_deps=False</em>, <em>ignore_depends_on_past=False</em>, <em>ignore_task_deps=False</em>, <em>ignore_ti_state=False</em>, <em>mark_success=False</em>, <em>test_mode=False</em>, <em>job_id=None</em>, <em>pool=None</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.run"><span class="viewcode-link">[source]</span></a><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="descname">dry_run</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.dry_run"><span class="viewcode-link">[source]</span></a><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="descname">_handle_reschedule</code><span class="sig-paren">(</span><em>self</em>, <em>actual_start_date</em>, <em>reschedule_exception</em>, <em>test_mode=False</em>, <em>context=None</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance._handle_reschedule"><span class="viewcode-link">[source]</span></a><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="descname">handle_failure</code><span class="sig-paren">(</span><em>self</em>, <em>error</em>, <em>test_mode=False</em>, <em>context=None</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.handle_failure"><span class="viewcode-link">[source]</span></a><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="descname">is_eligible_to_retry</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.is_eligible_to_retry"><span class="viewcode-link">[source]</span></a><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="descname">get_template_context</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.get_template_context"><span class="viewcode-link">[source]</span></a><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="descname">overwrite_params_with_dag_run_conf</code><span class="sig-paren">(</span><em>self</em>, <em>params</em>, <em>dag_run</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.overwrite_params_with_dag_run_conf"><span class="viewcode-link">[source]</span></a><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="descname">render_templates</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.render_templates"><span class="viewcode-link">[source]</span></a><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="descname">email_alert</code><span class="sig-paren">(</span><em>self</em>, <em>exception</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.email_alert"><span class="viewcode-link">[source]</span></a><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="descname">set_duration</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.set_duration"><span class="viewcode-link">[source]</span></a><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="descname">xcom_push</code><span class="sig-paren">(</span><em>self</em>, <em>key</em>, <em>value</em>, <em>execution_date=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.xcom_push"><span class="viewcode-link">[source]</span></a><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="descname">xcom_pull</code><span class="sig-paren">(</span><em>self</em>, <em>task_ids=None</em>, <em>dag_id=None</em>, <em>key=XCOM_RETURN_KEY</em>, <em>include_prior_dates=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.xcom_pull"><span class="viewcode-link">[source]</span></a><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="descname">get_num_running_task_instances</code><span class="sig-paren">(</span><em>self</em>, <em>session</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.get_num_running_task_instances"><span class="viewcode-link">[source]</span></a><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="descname">init_run_context</code><span class="sig-paren">(</span><em>self</em>, <em>raw=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#TaskInstance.init_run_context"><span class="viewcode-link">[source]</span></a><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.BaseOperator"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">BaseOperator</code><span class="sig-paren">(</span><em>task_id</em>, <em>owner=configuration.conf.get('operators'</em>, <em>'DEFAULT_OWNER')</em>, <em>email=None</em>, <em>email_on_retry=True</em>, <em>email_on_failure=True</em>, <em>retries=0</em>, <em>retry_delay=timedelta(seconds=300)</em>, <em>retry_exponential_backoff=False</em>, <em>max_retry_delay=None</em>, <em>start_date=None</em>, <em>end_date=None</em>, <em>schedule_interval=None</em>, <em>depends_on_past=False</em>, <em>wait_for_downstream=False</em>, <em>dag=None</em>, <em>params=None</em>, <em>default_args=None</em>, <em>priority_weight=1</em>, <em>weight_rule=WeightRule.DOWNSTREAM</em>, <em>queue=configuration.conf.get('celery'</em>, <em>'default_queue')</em>, <em>pool=None</em>, <em>sla=None</em>, <em>execution_timeout=None</em>, <em>on_failure_callback=None</em>, <em>on_success_callback=None</em>, <em>on_retry_callback=None</em>, <em>trigger_rule=TriggerRule.ALL_SUCCESS</em>, <em>resources=None</em>, <em>run_as_user=None</em>, <em>task_concurrency=None</em>, <em>executor_config=None</em>, <em>inlets=None</em>, <em>outlets=None</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.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.</p></li> |
| <li><p><strong>weight_rule</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – weighting method used for the effective total |
| priority weight of the task. Options are: |
| <code class="docutils literal notranslate"><span class="pre">{</span> <span class="pre">downstream</span> <span class="pre">|</span> <span class="pre">upstream</span> <span class="pre">|</span> <span class="pre">absolute</span> <span class="pre">}</span></code> default is <code class="docutils literal notranslate"><span class="pre">downstream</span></code> |
| When set to <code class="docutils literal notranslate"><span class="pre">downstream</span></code> the effective weight of the task is the |
| aggregate sum of all downstream descendants. As a result, upstream |
| tasks will have higher weight and will be scheduled more aggressively |
| when using positive weight values. This is useful when you have |
| multiple dag run instances and desire to have all upstream tasks to |
| complete for all runs before each dag can continue processing |
| downstream tasks. When set to <code class="docutils literal notranslate"><span class="pre">upstream</span></code> the effective weight is the |
| aggregate sum of all upstream ancestors. This is the opposite where |
| downtream tasks have higher weight and will be scheduled more |
| aggressively when using positive weight values. This is useful when you |
| have multiple dag run instances and prefer to have each dag complete |
| before starting upstream tasks of other dags. When set to |
| <code class="docutils literal notranslate"><span class="pre">absolute</span></code>, the effective weight is the exact <code class="docutils literal notranslate"><span class="pre">priority_weight</span></code> |
| specified without additional weighting. You may want to do this when |
| you know exactly what priority weight each task should have. |
| Additionally, when set to <code class="docutils literal notranslate"><span class="pre">absolute</span></code>, there is bonus effect of |
| significantly speeding up the task creation process as for very large |
| DAGS. Options can be set as string or using the constants defined in |
| the static class <code class="docutils literal notranslate"><span class="pre">airflow.utils.WeightRule</span></code></p></li> |
| <li><p><strong>pool</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – the slot pool this task should run in, slot pools are a |
| way to limit concurrency for certain tasks</p></li> |
| <li><p><strong>sla</strong> (<a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.timedelta" title="(in Python v3.7)"><em>datetime.timedelta</em></a>) – time by which the job is expected to succeed. Note that |
| this represents the <code class="docutils literal notranslate"><span class="pre">timedelta</span></code> after the period is closed. For |
| example if you set an SLA of 1 hour, the scheduler would send an email |
| soon after 1:00AM on the <code class="docutils literal notranslate"><span class="pre">2016-01-02</span></code> if the <code class="docutils literal notranslate"><span class="pre">2016-01-01</span></code> instance |
| has not succeeded yet. |
| The scheduler pays special attention for jobs with an SLA and |
| sends alert |
| emails for sla misses. SLA misses are also recorded in the database |
| for future reference. All tasks that share the same SLA time |
| get bundled in a single email, sent soon after that time. SLA |
| notification are sent once and only once for each task instance.</p></li> |
| <li><p><strong>execution_timeout</strong> (<a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.timedelta" title="(in Python v3.7)"><em>datetime.timedelta</em></a>) – max time allowed for the execution of |
| this task instance, if it goes beyond it will raise and fail.</p></li> |
| <li><p><strong>on_failure_callback</strong> (<em>callable</em>) – a function to be called when a task instance |
| of this task fails. a context dictionary is passed as a single |
| parameter to this function. Context contains references to related |
| objects to the task instance and is documented under the macros |
| section of the API.</p></li> |
| <li><p><strong>on_retry_callback</strong> (<em>callable</em>) – much like the <code class="docutils literal notranslate"><span class="pre">on_failure_callback</span></code> except |
| that it is executed when retries occur.</p></li> |
| <li><p><strong>on_success_callback</strong> (<em>callable</em>) – much like the <code class="docutils literal notranslate"><span class="pre">on_failure_callback</span></code> except |
| that it is executed when the task succeeds.</p></li> |
| <li><p><strong>trigger_rule</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – defines the rule by which dependencies are applied |
| for the task to get triggered. Options are: |
| <code class="docutils literal notranslate"><span class="pre">{</span> <span class="pre">all_success</span> <span class="pre">|</span> <span class="pre">all_failed</span> <span class="pre">|</span> <span class="pre">all_done</span> <span class="pre">|</span> <span class="pre">one_success</span> <span class="pre">|</span> |
| <span class="pre">one_failed</span> <span class="pre">|</span> <span class="pre">none_failed</span> <span class="pre">|</span> <span class="pre">none_skipped</span> <span class="pre">|</span> <span class="pre">dummy}</span></code> |
| default is <code class="docutils literal notranslate"><span class="pre">all_success</span></code>. Options can be set as string or |
| using the constants defined in the static class |
| <code class="docutils literal notranslate"><span class="pre">airflow.utils.TriggerRule</span></code></p></li> |
| <li><p><strong>resources</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)"><em>dict</em></a>) – A map of resource parameter names (the argument names of the |
| Resources constructor) to their values.</p></li> |
| <li><p><strong>run_as_user</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.7)"><em>str</em></a>) – unix username to impersonate while running the task</p></li> |
| <li><p><strong>task_concurrency</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.7)"><em>int</em></a>) – When set, a task will be able to limit the concurrent |
| runs across execution_dates</p></li> |
| <li><p><strong>executor_config</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.7)"><em>dict</em></a>) – <p>Additional task-level configuration parameters that are |
| interpreted by a specific executor. Parameters are namespaced by the name of |
| executor.</p> |
| <p><strong>Example</strong>: to run this task in a specific docker container through |
| the KubernetesExecutor</p> |
| <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">MyOperator</span><span class="p">(</span><span class="o">...</span><span class="p">,</span> |
| <span class="n">executor_config</span><span class="o">=</span><span class="p">{</span> |
| <span class="s2">"KubernetesExecutor"</span><span class="p">:</span> |
| <span class="p">{</span><span class="s2">"image"</span><span class="p">:</span> <span class="s2">"myCustomDockerImage"</span><span class="p">}</span> |
| <span class="p">}</span> |
| <span class="p">)</span> |
| </pre></div> |
| </div> |
| </p></li> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="attribute"> |
| <dt id="airflow.models.BaseOperator.template_fields"> |
| <code class="descname">template_fields</code><em class="property"> = []</em><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.template_fields"><span class="viewcode-link">[source]</span></a><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="descname">template_ext</code><em class="property"> = []</em><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.template_ext"><span class="viewcode-link">[source]</span></a><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="descname">ui_color</code><em class="property"> = #fff</em><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.ui_color"><span class="viewcode-link">[source]</span></a><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="descname">ui_fgcolor</code><em class="property"> = #000</em><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.ui_fgcolor"><span class="viewcode-link">[source]</span></a><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="descname">_base_operator_shallow_copy_attrs</code><em class="property"> = ['user_defined_macros', 'user_defined_filters', 'params', '_log']</em><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator._base_operator_shallow_copy_attrs"><span class="viewcode-link">[source]</span></a><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="descname">shallow_copy_attrs</code><em class="property"> = []</em><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.shallow_copy_attrs"><span class="viewcode-link">[source]</span></a><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.dag"> |
| <code class="descname">dag</code><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.dag"><span class="viewcode-link">[source]</span></a><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="descname">dag_id</code><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.dag_id"><span class="viewcode-link">[source]</span></a><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="descname">deps</code><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.deps"><span class="viewcode-link">[source]</span></a><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="descname">schedule_interval</code><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.schedule_interval"><span class="viewcode-link">[source]</span></a><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="descname">priority_weight_total</code><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.priority_weight_total"><span class="viewcode-link">[source]</span></a><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="descname">upstream_list</code><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.upstream_list"><span class="viewcode-link">[source]</span></a><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="descname">upstream_task_ids</code><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.upstream_task_ids"><span class="viewcode-link">[source]</span></a><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="descname">downstream_list</code><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.downstream_list"><span class="viewcode-link">[source]</span></a><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="descname">downstream_task_ids</code><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.downstream_task_ids"><span class="viewcode-link">[source]</span></a><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="descname">task_type</code><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.task_type"><span class="viewcode-link">[source]</span></a><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="descname">__eq__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.__eq__"><span class="viewcode-link">[source]</span></a><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="descname">__ne__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.__ne__"><span class="viewcode-link">[source]</span></a><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="descname">__lt__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.__lt__"><span class="viewcode-link">[source]</span></a><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="descname">__hash__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.__hash__"><span class="viewcode-link">[source]</span></a><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="descname">__rshift__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.__rshift__"><span class="viewcode-link">[source]</span></a><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="descname">__lshift__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.__lshift__"><span class="viewcode-link">[source]</span></a><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="descname">__rrshift__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.__rrshift__"><span class="viewcode-link">[source]</span></a><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="descname">__rlshift__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.__rlshift__"><span class="viewcode-link">[source]</span></a><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="descname">has_dag</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.has_dag"><span class="viewcode-link">[source]</span></a><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.pre_execute"> |
| <code class="descname">pre_execute</code><span class="sig-paren">(</span><em>self</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.pre_execute"><span class="viewcode-link">[source]</span></a><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="descname">execute</code><span class="sig-paren">(</span><em>self</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.execute"><span class="viewcode-link">[source]</span></a><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="descname">post_execute</code><span class="sig-paren">(</span><em>self</em>, <em>context</em>, <em>result=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.post_execute"><span class="viewcode-link">[source]</span></a><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="descname">on_kill</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.on_kill"><span class="viewcode-link">[source]</span></a><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="descname">__deepcopy__</code><span class="sig-paren">(</span><em>self</em>, <em>memo</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.__deepcopy__"><span class="viewcode-link">[source]</span></a><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="descname">__getstate__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.__getstate__"><span class="viewcode-link">[source]</span></a><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="descname">__setstate__</code><span class="sig-paren">(</span><em>self</em>, <em>state</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.__setstate__"><span class="viewcode-link">[source]</span></a><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="descname">render_template_from_field</code><span class="sig-paren">(</span><em>self</em>, <em>attr</em>, <em>content</em>, <em>context</em>, <em>jinja_env</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.render_template_from_field"><span class="viewcode-link">[source]</span></a><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="descname">render_template</code><span class="sig-paren">(</span><em>self</em>, <em>attr</em>, <em>content</em>, <em>context</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.render_template"><span class="viewcode-link">[source]</span></a><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="descname">get_template_env</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.get_template_env"><span class="viewcode-link">[source]</span></a><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="descname">prepare_template</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.prepare_template"><span class="viewcode-link">[source]</span></a><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="descname">resolve_template_files</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.resolve_template_files"><span class="viewcode-link">[source]</span></a><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="descname">clear</code><span class="sig-paren">(</span><em>self</em>, <em>start_date=None</em>, <em>end_date=None</em>, <em>upstream=False</em>, <em>downstream=False</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.clear"><span class="viewcode-link">[source]</span></a><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="descname">get_task_instances</code><span class="sig-paren">(</span><em>self</em>, <em>session</em>, <em>start_date=None</em>, <em>end_date=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.get_task_instances"><span class="viewcode-link">[source]</span></a><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="descname">get_flat_relative_ids</code><span class="sig-paren">(</span><em>self</em>, <em>upstream=False</em>, <em>found_descendants=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.get_flat_relative_ids"><span class="viewcode-link">[source]</span></a><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="descname">get_flat_relatives</code><span class="sig-paren">(</span><em>self</em>, <em>upstream=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.get_flat_relatives"><span class="viewcode-link">[source]</span></a><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="descname">run</code><span class="sig-paren">(</span><em>self</em>, <em>start_date=None</em>, <em>end_date=None</em>, <em>ignore_first_depends_on_past=False</em>, <em>ignore_ti_state=False</em>, <em>mark_success=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.run"><span class="viewcode-link">[source]</span></a><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="descname">dry_run</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.dry_run"><span class="viewcode-link">[source]</span></a><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="descname">get_direct_relative_ids</code><span class="sig-paren">(</span><em>self</em>, <em>upstream=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.get_direct_relative_ids"><span class="viewcode-link">[source]</span></a><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="descname">get_direct_relatives</code><span class="sig-paren">(</span><em>self</em>, <em>upstream=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.get_direct_relatives"><span class="viewcode-link">[source]</span></a><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="descname">__repr__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.__repr__"><span class="viewcode-link">[source]</span></a><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="descname">add_only_new</code><span class="sig-paren">(</span><em>self</em>, <em>item_set</em>, <em>item</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.add_only_new"><span class="viewcode-link">[source]</span></a><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="descname">_set_relatives</code><span class="sig-paren">(</span><em>self</em>, <em>task_or_task_list</em>, <em>upstream=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator._set_relatives"><span class="viewcode-link">[source]</span></a><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="descname">set_downstream</code><span class="sig-paren">(</span><em>self</em>, <em>task_or_task_list</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.set_downstream"><span class="viewcode-link">[source]</span></a><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="descname">set_upstream</code><span class="sig-paren">(</span><em>self</em>, <em>task_or_task_list</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.set_upstream"><span class="viewcode-link">[source]</span></a><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="descname">xcom_push</code><span class="sig-paren">(</span><em>self</em>, <em>context</em>, <em>key</em>, <em>value</em>, <em>execution_date=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.xcom_push"><span class="viewcode-link">[source]</span></a><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="descname">xcom_pull</code><span class="sig-paren">(</span><em>self</em>, <em>context</em>, <em>task_ids=None</em>, <em>dag_id=None</em>, <em>key=XCOM_RETURN_KEY</em>, <em>include_prior_dates=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#BaseOperator.xcom_pull"><span class="viewcode-link">[source]</span></a><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> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.DagModel"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">DagModel</code><a class="reference internal" href="../../../_modules/airflow/models.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="descname">__tablename__</code><em class="property"> = dag</em><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.__tablename__"><span class="viewcode-link">[source]</span></a><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="descname">dag_id</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.dag_id"><span class="viewcode-link">[source]</span></a><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="descname">is_paused_at_creation</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.is_paused_at_creation"><span class="viewcode-link">[source]</span></a><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="descname">is_paused</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.is_paused"><span class="viewcode-link">[source]</span></a><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="descname">is_subdag</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.is_subdag"><span class="viewcode-link">[source]</span></a><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="descname">is_active</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.is_active"><span class="viewcode-link">[source]</span></a><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="descname">last_scheduler_run</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.last_scheduler_run"><span class="viewcode-link">[source]</span></a><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="descname">last_pickled</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.last_pickled"><span class="viewcode-link">[source]</span></a><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="descname">last_expired</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.last_expired"><span class="viewcode-link">[source]</span></a><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="descname">scheduler_lock</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.scheduler_lock"><span class="viewcode-link">[source]</span></a><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="descname">pickle_id</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.pickle_id"><span class="viewcode-link">[source]</span></a><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="descname">fileloc</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.fileloc"><span class="viewcode-link">[source]</span></a><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="descname">owners</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.owners"><span class="viewcode-link">[source]</span></a><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="descname">description</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.description"><span class="viewcode-link">[source]</span></a><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="descname">default_view</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.default_view"><span class="viewcode-link">[source]</span></a><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="descname">schedule_interval</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.schedule_interval"><span class="viewcode-link">[source]</span></a><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="descname">timezone</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.timezone"><span class="viewcode-link">[source]</span></a><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="descname">safe_dag_id</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.safe_dag_id"><span class="viewcode-link">[source]</span></a><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="descname">__repr__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.__repr__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.DagModel.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="staticmethod"> |
| <dt id="airflow.models.DagModel.get_dagmodel"> |
| <em class="property">static </em><code class="descname">get_dagmodel</code><span class="sig-paren">(</span><em>dag_id</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.get_dagmodel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.DagModel.get_dagmodel" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="classmethod"> |
| <dt id="airflow.models.DagModel.get_current"> |
| <em class="property">classmethod </em><code class="descname">get_current</code><span class="sig-paren">(</span><em>cls</em>, <em>dag_id</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.get_current"><span class="viewcode-link">[source]</span></a><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="descname">get_default_view</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.get_default_view"><span class="viewcode-link">[source]</span></a><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="descname">get_last_dagrun</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em>, <em>include_externally_triggered=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.get_last_dagrun"><span class="viewcode-link">[source]</span></a><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="descname">get_dag</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.get_dag"><span class="viewcode-link">[source]</span></a><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="descname">create_dagrun</code><span class="sig-paren">(</span><em>self</em>, <em>run_id</em>, <em>state</em>, <em>execution_date</em>, <em>start_date=None</em>, <em>external_trigger=False</em>, <em>conf=None</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagModel.create_dagrun"><span class="viewcode-link">[source]</span></a><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/latest/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> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.models.DAG"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">DAG</code><span class="sig-paren">(</span><em>dag_id</em>, <em>description=''</em>, <em>schedule_interval=timedelta(days=1)</em>, <em>start_date=None</em>, <em>end_date=None</em>, <em>full_filepath=None</em>, <em>template_searchpath=None</em>, <em>user_defined_macros=None</em>, <em>user_defined_filters=None</em>, <em>default_args=None</em>, <em>concurrency=configuration.conf.getint('core'</em>, <em>'dag_concurrency')</em>, <em>max_active_runs=configuration.conf.getint('core'</em>, <em>'max_active_runs_per_dag')</em>, <em>dagrun_timeout=None</em>, <em>sla_miss_callback=None</em>, <em>default_view=None</em>, <em>orientation=configuration.conf.get('webserver'</em>, <em>'dag_orientation')</em>, <em>catchup=configuration.conf.getboolean('scheduler'</em>, <em>'catchup_by_default')</em>, <em>on_success_callback=None</em>, <em>on_failure_callback=None</em>, <em>doc_md=None</em>, <em>params=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.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 end 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>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</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> |
| </ul> |
| </dd> |
| </dl> |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.dag_id"> |
| <code class="descname">dag_id</code><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.dag_id"><span class="viewcode-link">[source]</span></a><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="descname">full_filepath</code><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.full_filepath"><span class="viewcode-link">[source]</span></a><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="descname">concurrency</code><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.concurrency"><span class="viewcode-link">[source]</span></a><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.description"> |
| <code class="descname">description</code><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.description"><span class="viewcode-link">[source]</span></a><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="descname">pickle_id</code><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.pickle_id"><span class="viewcode-link">[source]</span></a><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="descname">tasks</code><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.tasks"><span class="viewcode-link">[source]</span></a><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="descname">task_ids</code><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.task_ids"><span class="viewcode-link">[source]</span></a><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="descname">filepath</code><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.filepath"><span class="viewcode-link">[source]</span></a><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="descname">folder</code><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.folder"><span class="viewcode-link">[source]</span></a><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="descname">owner</code><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.owner"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.DAG.owner" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.models.DAG.concurrency_reached"> |
| <code class="descname">concurrency_reached</code><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.concurrency_reached"><span class="viewcode-link">[source]</span></a><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="descname">is_paused</code><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.is_paused"><span class="viewcode-link">[source]</span></a><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="descname">latest_execution_date</code><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.latest_execution_date"><span class="viewcode-link">[source]</span></a><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="descname">subdags</code><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.subdags"><span class="viewcode-link">[source]</span></a><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="descname">roots</code><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.roots"><span class="viewcode-link">[source]</span></a><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="descname">__repr__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.__repr__"><span class="viewcode-link">[source]</span></a><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="descname">__eq__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.__eq__"><span class="viewcode-link">[source]</span></a><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="descname">__ne__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.__ne__"><span class="viewcode-link">[source]</span></a><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="descname">__lt__</code><span class="sig-paren">(</span><em>self</em>, <em>other</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.__lt__"><span class="viewcode-link">[source]</span></a><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="descname">__hash__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.__hash__"><span class="viewcode-link">[source]</span></a><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="descname">__enter__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.__enter__"><span class="viewcode-link">[source]</span></a><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="descname">__exit__</code><span class="sig-paren">(</span><em>self</em>, <em>_type</em>, <em>_value</em>, <em>_tb</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.__exit__"><span class="viewcode-link">[source]</span></a><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="descname">get_default_view</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.get_default_view"><span class="viewcode-link">[source]</span></a><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="descname">date_range</code><span class="sig-paren">(</span><em>self</em>, <em>start_date</em>, <em>num=None</em>, <em>end_date=timezone.utcnow()</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.date_range"><span class="viewcode-link">[source]</span></a><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="descname">is_fixed_time_schedule</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.is_fixed_time_schedule"><span class="viewcode-link">[source]</span></a><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="descname">following_schedule</code><span class="sig-paren">(</span><em>self</em>, <em>dttm</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.following_schedule"><span class="viewcode-link">[source]</span></a><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="descname">previous_schedule</code><span class="sig-paren">(</span><em>self</em>, <em>dttm</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.previous_schedule"><span class="viewcode-link">[source]</span></a><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="descname">get_run_dates</code><span class="sig-paren">(</span><em>self</em>, <em>start_date</em>, <em>end_date=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.get_run_dates"><span class="viewcode-link">[source]</span></a><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="descname">normalize_schedule</code><span class="sig-paren">(</span><em>self</em>, <em>dttm</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.normalize_schedule"><span class="viewcode-link">[source]</span></a><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="descname">get_last_dagrun</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em>, <em>include_externally_triggered=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.get_last_dagrun"><span class="viewcode-link">[source]</span></a><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="descname">_get_concurrency_reached</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG._get_concurrency_reached"><span class="viewcode-link">[source]</span></a><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="descname">_get_is_paused</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG._get_is_paused"><span class="viewcode-link">[source]</span></a><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="descname">handle_callback</code><span class="sig-paren">(</span><em>self</em>, <em>dagrun</em>, <em>success=True</em>, <em>reason=None</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.handle_callback"><span class="viewcode-link">[source]</span></a><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="descname">get_active_runs</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.get_active_runs"><span class="viewcode-link">[source]</span></a><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">Parameters</dt> |
| <dd class="field-odd"><p><strong>session</strong> – </p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>List of execution dates</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.DAG.get_num_active_runs"> |
| <code class="descname">get_num_active_runs</code><span class="sig-paren">(</span><em>self</em>, <em>external_trigger=None</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.get_num_active_runs"><span class="viewcode-link">[source]</span></a><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="descname">get_dagrun</code><span class="sig-paren">(</span><em>self</em>, <em>execution_date</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.get_dagrun"><span class="viewcode-link">[source]</span></a><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_latest_execution_date"> |
| <code class="descname">_get_latest_execution_date</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG._get_latest_execution_date"><span class="viewcode-link">[source]</span></a><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="descname">resolve_template_files</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.resolve_template_files"><span class="viewcode-link">[source]</span></a><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="descname">get_template_env</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.get_template_env"><span class="viewcode-link">[source]</span></a><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="descname">set_dependency</code><span class="sig-paren">(</span><em>self</em>, <em>upstream_task_id</em>, <em>downstream_task_id</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.set_dependency"><span class="viewcode-link">[source]</span></a><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="descname">get_task_instances</code><span class="sig-paren">(</span><em>self</em>, <em>session</em>, <em>start_date=None</em>, <em>end_date=None</em>, <em>state=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.get_task_instances"><span class="viewcode-link">[source]</span></a><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="descname">topological_sort</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.topological_sort"><span class="viewcode-link">[source]</span></a><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="descname">set_dag_runs_state</code><span class="sig-paren">(</span><em>self</em>, <em>state=State.RUNNING</em>, <em>session=None</em>, <em>start_date=None</em>, <em>end_date=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.set_dag_runs_state"><span class="viewcode-link">[source]</span></a><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="descname">clear</code><span class="sig-paren">(</span><em>self</em>, <em>start_date=None</em>, <em>end_date=None</em>, <em>only_failed=False</em>, <em>only_running=False</em>, <em>confirm_prompt=False</em>, <em>include_subdags=True</em>, <em>include_parentdag=True</em>, <em>reset_dag_runs=True</em>, <em>dry_run=False</em>, <em>session=None</em>, <em>get_tis=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.clear"><span class="viewcode-link">[source]</span></a><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="classmethod"> |
| <dt id="airflow.models.DAG.clear_dags"> |
| <em class="property">classmethod </em><code class="descname">clear_dags</code><span class="sig-paren">(</span><em>cls</em>, <em>dags</em>, <em>start_date=None</em>, <em>end_date=None</em>, <em>only_failed=False</em>, <em>only_running=False</em>, <em>confirm_prompt=False</em>, <em>include_subdags=True</em>, <em>include_parentdag=False</em>, <em>reset_dag_runs=True</em>, <em>dry_run=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.clear_dags"><span class="viewcode-link">[source]</span></a><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="descname">__deepcopy__</code><span class="sig-paren">(</span><em>self</em>, <em>memo</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.__deepcopy__"><span class="viewcode-link">[source]</span></a><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="descname">sub_dag</code><span class="sig-paren">(</span><em>self</em>, <em>task_regex</em>, <em>include_downstream=False</em>, <em>include_upstream=True</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.sub_dag"><span class="viewcode-link">[source]</span></a><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="descname">has_task</code><span class="sig-paren">(</span><em>self</em>, <em>task_id</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.has_task"><span class="viewcode-link">[source]</span></a><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="descname">get_task</code><span class="sig-paren">(</span><em>self</em>, <em>task_id</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.get_task"><span class="viewcode-link">[source]</span></a><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="descname">pickle_info</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.pickle_info"><span class="viewcode-link">[source]</span></a><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="descname">pickle</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.pickle"><span class="viewcode-link">[source]</span></a><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="descname">tree_view</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.tree_view"><span class="viewcode-link">[source]</span></a><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="descname">add_task</code><span class="sig-paren">(</span><em>self</em>, <em>task</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.add_task"><span class="viewcode-link">[source]</span></a><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="descname">add_tasks</code><span class="sig-paren">(</span><em>self</em>, <em>tasks</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.add_tasks"><span class="viewcode-link">[source]</span></a><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="descname">run</code><span class="sig-paren">(</span><em>self</em>, <em>start_date=None</em>, <em>end_date=None</em>, <em>mark_success=False</em>, <em>local=False</em>, <em>executor=None</em>, <em>donot_pickle=configuration.conf.getboolean('core'</em>, <em>'donot_pickle')</em>, <em>ignore_task_deps=False</em>, <em>ignore_first_depends_on_past=False</em>, <em>pool=None</em>, <em>delay_on_limit_secs=1.0</em>, <em>verbose=False</em>, <em>conf=None</em>, <em>rerun_failed_tasks=False</em>, <em>run_backwards=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.run"><span class="viewcode-link">[source]</span></a><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="descname">cli</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.cli"><span class="viewcode-link">[source]</span></a><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="descname">create_dagrun</code><span class="sig-paren">(</span><em>self</em>, <em>run_id</em>, <em>state</em>, <em>execution_date=None</em>, <em>start_date=None</em>, <em>external_trigger=False</em>, <em>conf=None</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.create_dagrun"><span class="viewcode-link">[source]</span></a><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/latest/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="descname">sync_to_db</code><span class="sig-paren">(</span><em>self</em>, <em>owner=None</em>, <em>sync_time=None</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.sync_to_db"><span class="viewcode-link">[source]</span></a><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="staticmethod"> |
| <dt id="airflow.models.DAG.deactivate_unknown_dags"> |
| <em class="property">static </em><code class="descname">deactivate_unknown_dags</code><span class="sig-paren">(</span><em>active_dag_ids</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.deactivate_unknown_dags"><span class="viewcode-link">[source]</span></a><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="staticmethod"> |
| <dt id="airflow.models.DAG.deactivate_stale_dags"> |
| <em class="property">static </em><code class="descname">deactivate_stale_dags</code><span class="sig-paren">(</span><em>expiration_date</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.deactivate_stale_dags"><span class="viewcode-link">[source]</span></a><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="staticmethod"> |
| <dt id="airflow.models.DAG.get_num_task_instances"> |
| <em class="property">static </em><code class="descname">get_num_task_instances</code><span class="sig-paren">(</span><em>dag_id</em>, <em>task_ids</em>, <em>states=None</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.get_num_task_instances"><span class="viewcode-link">[source]</span></a><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="descname">test_cycle</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG.test_cycle"><span class="viewcode-link">[source]</span></a><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="descname">_test_cycle_helper</code><span class="sig-paren">(</span><em>self</em>, <em>visit_map</em>, <em>task_id</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DAG._test_cycle_helper"><span class="viewcode-link">[source]</span></a><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.Chart"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">Chart</code><a class="reference internal" href="../../../_modules/airflow/models.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="descname">__tablename__</code><em class="property"> = chart</em><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.__tablename__"><span class="viewcode-link">[source]</span></a><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="descname">id</code><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.id"><span class="viewcode-link">[source]</span></a><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="descname">label</code><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.label"><span class="viewcode-link">[source]</span></a><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="descname">conn_id</code><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.conn_id"><span class="viewcode-link">[source]</span></a><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="descname">user_id</code><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.user_id"><span class="viewcode-link">[source]</span></a><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="descname">chart_type</code><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.chart_type"><span class="viewcode-link">[source]</span></a><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="descname">sql_layout</code><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.sql_layout"><span class="viewcode-link">[source]</span></a><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="descname">sql</code><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.sql"><span class="viewcode-link">[source]</span></a><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="descname">y_log_scale</code><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.y_log_scale"><span class="viewcode-link">[source]</span></a><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="descname">show_datatable</code><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.show_datatable"><span class="viewcode-link">[source]</span></a><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="descname">show_sql</code><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.show_sql"><span class="viewcode-link">[source]</span></a><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="descname">height</code><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.height"><span class="viewcode-link">[source]</span></a><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="descname">default_params</code><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.default_params"><span class="viewcode-link">[source]</span></a><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="descname">owner</code><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.owner"><span class="viewcode-link">[source]</span></a><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="descname">x_is_date</code><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.x_is_date"><span class="viewcode-link">[source]</span></a><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="descname">iteration_no</code><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.iteration_no"><span class="viewcode-link">[source]</span></a><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="descname">last_modified</code><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.last_modified"><span class="viewcode-link">[source]</span></a><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="descname">__repr__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#Chart.__repr__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.Chart.__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="descclassname">airflow.models.</code><code class="descname">KnownEventType</code><a class="reference internal" href="../../../_modules/airflow/models.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="descname">__tablename__</code><em class="property"> = known_event_type</em><a class="reference internal" href="../../../_modules/airflow/models.html#KnownEventType.__tablename__"><span class="viewcode-link">[source]</span></a><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="descname">id</code><a class="reference internal" href="../../../_modules/airflow/models.html#KnownEventType.id"><span class="viewcode-link">[source]</span></a><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="descname">know_event_type</code><a class="reference internal" href="../../../_modules/airflow/models.html#KnownEventType.know_event_type"><span class="viewcode-link">[source]</span></a><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="descname">__repr__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#KnownEventType.__repr__"><span class="viewcode-link">[source]</span></a><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.KnownEvent"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">KnownEvent</code><a class="reference internal" href="../../../_modules/airflow/models.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="descname">__tablename__</code><em class="property"> = known_event</em><a class="reference internal" href="../../../_modules/airflow/models.html#KnownEvent.__tablename__"><span class="viewcode-link">[source]</span></a><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="descname">id</code><a class="reference internal" href="../../../_modules/airflow/models.html#KnownEvent.id"><span class="viewcode-link">[source]</span></a><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="descname">label</code><a class="reference internal" href="../../../_modules/airflow/models.html#KnownEvent.label"><span class="viewcode-link">[source]</span></a><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="descname">start_date</code><a class="reference internal" href="../../../_modules/airflow/models.html#KnownEvent.start_date"><span class="viewcode-link">[source]</span></a><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="descname">end_date</code><a class="reference internal" href="../../../_modules/airflow/models.html#KnownEvent.end_date"><span class="viewcode-link">[source]</span></a><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="descname">user_id</code><a class="reference internal" href="../../../_modules/airflow/models.html#KnownEvent.user_id"><span class="viewcode-link">[source]</span></a><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="descname">known_event_type_id</code><a class="reference internal" href="../../../_modules/airflow/models.html#KnownEvent.known_event_type_id"><span class="viewcode-link">[source]</span></a><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="descname">reported_by</code><a class="reference internal" href="../../../_modules/airflow/models.html#KnownEvent.reported_by"><span class="viewcode-link">[source]</span></a><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="descname">event_type</code><a class="reference internal" href="../../../_modules/airflow/models.html#KnownEvent.event_type"><span class="viewcode-link">[source]</span></a><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="descname">description</code><a class="reference internal" href="../../../_modules/airflow/models.html#KnownEvent.description"><span class="viewcode-link">[source]</span></a><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="descname">__repr__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#KnownEvent.__repr__"><span class="viewcode-link">[source]</span></a><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.Variable"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">Variable</code><a class="reference internal" href="../../../_modules/airflow/models.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="descname">__tablename__</code><em class="property"> = variable</em><a class="reference internal" href="../../../_modules/airflow/models.html#Variable.__tablename__"><span class="viewcode-link">[source]</span></a><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="descname">__NO_DEFAULT_SENTINEL</code><a class="reference internal" href="../../../_modules/airflow/models.html#Variable.__NO_DEFAULT_SENTINEL"><span class="viewcode-link">[source]</span></a><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="descname">id</code><a class="reference internal" href="../../../_modules/airflow/models.html#Variable.id"><span class="viewcode-link">[source]</span></a><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="descname">key</code><a class="reference internal" href="../../../_modules/airflow/models.html#Variable.key"><span class="viewcode-link">[source]</span></a><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="descname">_val</code><a class="reference internal" href="../../../_modules/airflow/models.html#Variable._val"><span class="viewcode-link">[source]</span></a><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="descname">is_encrypted</code><a class="reference internal" href="../../../_modules/airflow/models.html#Variable.is_encrypted"><span class="viewcode-link">[source]</span></a><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="descname">val</code><a class="reference internal" href="../../../_modules/airflow/models.html#Variable.val"><span class="viewcode-link">[source]</span></a><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="descname">__repr__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#Variable.__repr__"><span class="viewcode-link">[source]</span></a><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="descname">get_val</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#Variable.get_val"><span class="viewcode-link">[source]</span></a><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="descname">set_val</code><span class="sig-paren">(</span><em>self</em>, <em>value</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#Variable.set_val"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.Variable.set_val" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="classmethod"> |
| <dt id="airflow.models.Variable.setdefault"> |
| <em class="property">classmethod </em><code class="descname">setdefault</code><span class="sig-paren">(</span><em>cls</em>, <em>key</em>, <em>default</em>, <em>deserialize_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#Variable.setdefault"><span class="viewcode-link">[source]</span></a><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="classmethod"> |
| <dt id="airflow.models.Variable.get"> |
| <em class="property">classmethod </em><code class="descname">get</code><span class="sig-paren">(</span><em>cls</em>, <em>key</em>, <em>default_var=__NO_DEFAULT_SENTINEL</em>, <em>deserialize_json=False</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#Variable.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.Variable.get" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="classmethod"> |
| <dt id="airflow.models.Variable.set"> |
| <em class="property">classmethod </em><code class="descname">set</code><span class="sig-paren">(</span><em>cls</em>, <em>key</em>, <em>value</em>, <em>serialize_json=False</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#Variable.set"><span class="viewcode-link">[source]</span></a><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.rotate_fernet_key"> |
| <code class="descname">rotate_fernet_key</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#Variable.rotate_fernet_key"><span class="viewcode-link">[source]</span></a><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="descclassname">airflow.models.</code><code class="descname">XCom</code><a class="reference internal" href="../../../_modules/airflow/models.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="descname">__tablename__</code><em class="property"> = xcom</em><a class="reference internal" href="../../../_modules/airflow/models.html#XCom.__tablename__"><span class="viewcode-link">[source]</span></a><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="descname">id</code><a class="reference internal" href="../../../_modules/airflow/models.html#XCom.id"><span class="viewcode-link">[source]</span></a><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="descname">key</code><a class="reference internal" href="../../../_modules/airflow/models.html#XCom.key"><span class="viewcode-link">[source]</span></a><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="descname">value</code><a class="reference internal" href="../../../_modules/airflow/models.html#XCom.value"><span class="viewcode-link">[source]</span></a><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="descname">timestamp</code><a class="reference internal" href="../../../_modules/airflow/models.html#XCom.timestamp"><span class="viewcode-link">[source]</span></a><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="descname">execution_date</code><a class="reference internal" href="../../../_modules/airflow/models.html#XCom.execution_date"><span class="viewcode-link">[source]</span></a><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="descname">task_id</code><a class="reference internal" href="../../../_modules/airflow/models.html#XCom.task_id"><span class="viewcode-link">[source]</span></a><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="descname">dag_id</code><a class="reference internal" href="../../../_modules/airflow/models.html#XCom.dag_id"><span class="viewcode-link">[source]</span></a><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="descname">__table_args__</code><a class="reference internal" href="../../../_modules/airflow/models.html#XCom.__table_args__"><span class="viewcode-link">[source]</span></a><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="descname">init_on_load</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#XCom.init_on_load"><span class="viewcode-link">[source]</span></a><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="descname">__repr__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#XCom.__repr__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.XCom.__repr__" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="classmethod"> |
| <dt id="airflow.models.XCom.set"> |
| <em class="property">classmethod </em><code class="descname">set</code><span class="sig-paren">(</span><em>cls</em>, <em>key</em>, <em>value</em>, <em>execution_date</em>, <em>task_id</em>, <em>dag_id</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#XCom.set"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.XCom.set" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Store an XCom value. |
| 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>None</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="classmethod"> |
| <dt id="airflow.models.XCom.get_one"> |
| <em class="property">classmethod </em><code class="descname">get_one</code><span class="sig-paren">(</span><em>cls</em>, <em>execution_date</em>, <em>key=None</em>, <em>task_id=None</em>, <em>dag_id=None</em>, <em>include_prior_dates=False</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#XCom.get_one"><span class="viewcode-link">[source]</span></a><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="classmethod"> |
| <dt id="airflow.models.XCom.get_many"> |
| <em class="property">classmethod </em><code class="descname">get_many</code><span class="sig-paren">(</span><em>cls</em>, <em>execution_date</em>, <em>key=None</em>, <em>task_ids=None</em>, <em>dag_ids=None</em>, <em>include_prior_dates=False</em>, <em>limit=100</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#XCom.get_many"><span class="viewcode-link">[source]</span></a><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="classmethod"> |
| <dt id="airflow.models.XCom.delete"> |
| <em class="property">classmethod </em><code class="descname">delete</code><span class="sig-paren">(</span><em>cls</em>, <em>xcoms</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#XCom.delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.XCom.delete" 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="descclassname">airflow.models.</code><code class="descname">DagRun</code><a class="reference internal" href="../../../_modules/airflow/models.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="descname">__tablename__</code><em class="property"> = dag_run</em><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.__tablename__"><span class="viewcode-link">[source]</span></a><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="descname">ID_PREFIX</code><em class="property"> = scheduled__</em><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.ID_PREFIX"><span class="viewcode-link">[source]</span></a><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="descname">ID_FORMAT_PREFIX</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.ID_FORMAT_PREFIX"><span class="viewcode-link">[source]</span></a><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="descname">id</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.id"><span class="viewcode-link">[source]</span></a><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="descname">dag_id</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.dag_id"><span class="viewcode-link">[source]</span></a><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="descname">execution_date</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.execution_date"><span class="viewcode-link">[source]</span></a><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="descname">start_date</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.start_date"><span class="viewcode-link">[source]</span></a><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="descname">end_date</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.end_date"><span class="viewcode-link">[source]</span></a><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="descname">_state</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun._state"><span class="viewcode-link">[source]</span></a><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="descname">run_id</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.run_id"><span class="viewcode-link">[source]</span></a><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="descname">external_trigger</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.external_trigger"><span class="viewcode-link">[source]</span></a><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="descname">conf</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.conf"><span class="viewcode-link">[source]</span></a><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="descname">dag</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.dag"><span class="viewcode-link">[source]</span></a><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="descname">__table_args__</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.__table_args__"><span class="viewcode-link">[source]</span></a><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="descname">state</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.state"><span class="viewcode-link">[source]</span></a><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="descname">is_backfill</code><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.is_backfill"><span class="viewcode-link">[source]</span></a><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="descname">__repr__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.__repr__"><span class="viewcode-link">[source]</span></a><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="descname">get_state</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.get_state"><span class="viewcode-link">[source]</span></a><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="descname">set_state</code><span class="sig-paren">(</span><em>self</em>, <em>state</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.set_state"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.DagRun.set_state" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="classmethod"> |
| <dt id="airflow.models.DagRun.id_for_date"> |
| <em class="property">classmethod </em><code class="descname">id_for_date</code><span class="sig-paren">(</span><em>cls</em>, <em>date</em>, <em>prefix=ID_FORMAT_PREFIX</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.id_for_date"><span class="viewcode-link">[source]</span></a><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="descname">refresh_from_db</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.refresh_from_db"><span class="viewcode-link">[source]</span></a><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="staticmethod"> |
| <dt id="airflow.models.DagRun.find"> |
| <em class="property">static </em><code class="descname">find</code><span class="sig-paren">(</span><em>dag_id=None</em>, <em>run_id=None</em>, <em>execution_date=None</em>, <em>state=None</em>, <em>external_trigger=None</em>, <em>no_backfills=False</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.find"><span class="viewcode-link">[source]</span></a><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> (<em>airflow.utils.state.State</em>) – 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/latest/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="descname">get_task_instances</code><span class="sig-paren">(</span><em>self</em>, <em>state=None</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.get_task_instances"><span class="viewcode-link">[source]</span></a><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="descname">get_task_instance</code><span class="sig-paren">(</span><em>self</em>, <em>task_id</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.get_task_instance"><span class="viewcode-link">[source]</span></a><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="descname">get_dag</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.get_dag"><span class="viewcode-link">[source]</span></a><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="descname">get_previous_dagrun</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.get_previous_dagrun"><span class="viewcode-link">[source]</span></a><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="descname">get_previous_scheduled_dagrun</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.get_previous_scheduled_dagrun"><span class="viewcode-link">[source]</span></a><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="descname">update_state</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.update_state"><span class="viewcode-link">[source]</span></a><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.verify_integrity"> |
| <code class="descname">verify_integrity</code><span class="sig-paren">(</span><em>self</em>, <em>session=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.verify_integrity"><span class="viewcode-link">[source]</span></a><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="staticmethod"> |
| <dt id="airflow.models.DagRun.get_run"> |
| <em class="property">static </em><code class="descname">get_run</code><span class="sig-paren">(</span><em>session</em>, <em>dag_id</em>, <em>execution_date</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.get_run"><span class="viewcode-link">[source]</span></a><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">DagRun</a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="classmethod"> |
| <dt id="airflow.models.DagRun.get_latest_runs"> |
| <em class="property">classmethod </em><code class="descname">get_latest_runs</code><span class="sig-paren">(</span><em>cls</em>, <em>session</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#DagRun.get_latest_runs"><span class="viewcode-link">[source]</span></a><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.Pool"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">Pool</code><a class="reference internal" href="../../../_modules/airflow/models.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="descname">__tablename__</code><em class="property"> = slot_pool</em><a class="reference internal" href="../../../_modules/airflow/models.html#Pool.__tablename__"><span class="viewcode-link">[source]</span></a><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="descname">id</code><a class="reference internal" href="../../../_modules/airflow/models.html#Pool.id"><span class="viewcode-link">[source]</span></a><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="descname">pool</code><a class="reference internal" href="../../../_modules/airflow/models.html#Pool.pool"><span class="viewcode-link">[source]</span></a><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="descname">slots</code><a class="reference internal" href="../../../_modules/airflow/models.html#Pool.slots"><span class="viewcode-link">[source]</span></a><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="descname">description</code><a class="reference internal" href="../../../_modules/airflow/models.html#Pool.description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.Pool.description" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Pool.__repr__"> |
| <code class="descname">__repr__</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#Pool.__repr__"><span class="viewcode-link">[source]</span></a><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.to_json"> |
| <code class="descname">to_json</code><span class="sig-paren">(</span><em>self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#Pool.to_json"><span class="viewcode-link">[source]</span></a><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.used_slots"> |
| <code class="descname">used_slots</code><span class="sig-paren">(</span><em>self</em>, <em>session</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#Pool.used_slots"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.Pool.used_slots" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the number of slots used at the moment</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Pool.queued_slots"> |
| <code class="descname">queued_slots</code><span class="sig-paren">(</span><em>self</em>, <em>session</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#Pool.queued_slots"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.models.Pool.queued_slots" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Returns the number of slots used at the moment</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.models.Pool.open_slots"> |
| <code class="descname">open_slots</code><span class="sig-paren">(</span><em>self</em>, <em>session</em><span class="sig-paren">)</span><a class="reference internal" href="../../../_modules/airflow/models.html#Pool.open_slots"><span class="viewcode-link">[source]</span></a><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.Connection"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="descname">Connection</code><span class="sig-paren">(</span><em>conn_id=None</em>, <em>conn_type=None</em>, <em>host=None</em>, <em>login=None</em>, <em>password=None</em>, <em>schema=None</em>, <em>port=None</em>, <em>extra=None</em>, <em>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="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="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="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="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="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="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="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="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="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="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="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="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="descname">_types</code><em class="property"> = [['docker', 'Docker Registry'], ['fs', 'File (path)'], ['ftp', 'FTP'], ['google_cloud_platform', 'Google Cloud Platform'], ['hdfs', 'HDFS'], ['http', 'HTTP'], ['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']]</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="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="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="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="descname">parse_from_uri</code><span class="sig-paren">(</span><em>self</em>, <em>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="descname">get_password</code><span class="sig-paren">(</span><em>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="descname">set_password</code><span class="sig-paren">(</span><em>self</em>, <em>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="descname">get_extra</code><span class="sig-paren">(</span><em>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="descname">set_extra</code><span class="sig-paren">(</span><em>self</em>, <em>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="descname">rotate_fernet_key</code><span class="sig-paren">(</span><em>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="descname">get_hook</code><span class="sig-paren">(</span><em>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="descname">__repr__</code><span class="sig-paren">(</span><em>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="descname">debug_info</code><span class="sig-paren">(</span><em>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.SkipMixin"> |
| <em class="property">class </em><code class="descclassname">airflow.models.</code><code class="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="descname">skip</code><span class="sig-paren">(</span><em>self</em>, <em>dag_run</em>, <em>execution_date</em>, <em>tasks</em>, <em>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> |
| |
| </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>. |
| |
| </footer> |
| |
| </div> |
| </div> |
| |
| </section> |
| |
| </div> |
| |
| |
| |
| <script type="text/javascript"> |
| jQuery(function () { |
| SphinxRtdTheme.Navigation.enable(true); |
| }); |
| </script> |
| |
| |
| |
| |
| |
| |
| </body> |
| </html> |