You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2018/08/29 20:25:11 UTC
[43/48] incubator-airflow-site git commit: 1.10.0 with Updated Api
Reference
http://git-wip-us.apache.org/repos/asf/incubator-airflow-site/blob/7d4d7628/_modules/airflow/contrib/hooks/redis_hook.html
----------------------------------------------------------------------
diff --git a/_modules/airflow/contrib/hooks/redis_hook.html b/_modules/airflow/contrib/hooks/redis_hook.html
index 1d0c202..e559ff0 100644
--- a/_modules/airflow/contrib/hooks/redis_hook.html
+++ b/_modules/airflow/contrib/hooks/redis_hook.html
@@ -24,26 +24,17 @@
-
-
- <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
-
-
-
-
-
- <link rel="index" title="Index"
- href="../../../../genindex.html"/>
- <link rel="search" title="Search" href="../../../../search.html"/>
- <link rel="top" title="Airflow Documentation" href="../../../../index.html"/>
- <link rel="up" title="Module code" href="../../../index.html"/>
+ <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" />
<script src="../../../../_static/js/modernizr.min.js"></script>
</head>
-<body class="wy-body-for-nav" role="document">
+<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
@@ -116,7 +107,7 @@
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
- <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+ <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>
@@ -124,9 +115,10 @@
</nav>
-
<div class="wy-nav-content">
+
<div class="rst-content">
+
@@ -156,8 +148,6 @@
<li class="wy-breadcrumbs-aside">
-
-
</li>
</ul>
@@ -178,9 +168,9 @@
<span class="c1"># to you under the Apache License, Version 2.0 (the</span>
<span class="c1"># "License"); you may not use this file except in compliance</span>
<span class="c1"># with the License. You may obtain a copy of the License at</span>
-<span class="c1"># </span>
+<span class="c1">#</span>
<span class="c1"># http://www.apache.org/licenses/LICENSE-2.0</span>
-<span class="c1"># </span>
+<span class="c1">#</span>
<span class="c1"># Unless required by applicable law or agreed to in writing,</span>
<span class="c1"># software distributed under the License is distributed on an</span>
<span class="c1"># "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
@@ -265,9 +255,7 @@
</pre></div>
</div>
- <div class="articleComments">
-
- </div>
+
</div>
<footer>
@@ -279,7 +267,7 @@
</p>
</div>
- Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
+ 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>
@@ -298,6 +286,7 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../../',
VERSION:'',
+ LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
@@ -310,19 +299,13 @@
-
-
- <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
+ <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
-
<script type="text/javascript">
jQuery(function () {
- SphinxRtdTheme.StickyNav.enable();
+ SphinxRtdTheme.Navigation.enable(true);
});
- </script>
-
+ </script>
</body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-airflow-site/blob/7d4d7628/_modules/airflow/contrib/hooks/redshift_hook.html
----------------------------------------------------------------------
diff --git a/_modules/airflow/contrib/hooks/redshift_hook.html b/_modules/airflow/contrib/hooks/redshift_hook.html
index 314fd9e..e587dc2 100644
--- a/_modules/airflow/contrib/hooks/redshift_hook.html
+++ b/_modules/airflow/contrib/hooks/redshift_hook.html
@@ -24,26 +24,17 @@
-
-
- <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
-
-
-
-
-
- <link rel="index" title="Index"
- href="../../../../genindex.html"/>
- <link rel="search" title="Search" href="../../../../search.html"/>
- <link rel="top" title="Airflow Documentation" href="../../../../index.html"/>
- <link rel="up" title="Module code" href="../../../index.html"/>
+ <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" />
<script src="../../../../_static/js/modernizr.min.js"></script>
</head>
-<body class="wy-body-for-nav" role="document">
+<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
@@ -116,7 +107,7 @@
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
- <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+ <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>
@@ -124,9 +115,10 @@
</nav>
-
<div class="wy-nav-content">
+
<div class="rst-content">
+
@@ -156,8 +148,6 @@
<li class="wy-breadcrumbs-aside">
-
-
</li>
</ul>
@@ -178,9 +168,9 @@
<span class="c1"># to you under the Apache License, Version 2.0 (the</span>
<span class="c1"># "License"); you may not use this file except in compliance</span>
<span class="c1"># with the License. You may obtain a copy of the License at</span>
-<span class="c1"># </span>
+<span class="c1">#</span>
<span class="c1"># http://www.apache.org/licenses/LICENSE-2.0</span>
-<span class="c1"># </span>
+<span class="c1">#</span>
<span class="c1"># Unless required by applicable law or agreed to in writing,</span>
<span class="c1"># software distributed under the License is distributed on an</span>
<span class="c1"># "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
@@ -285,9 +275,7 @@
</pre></div>
</div>
- <div class="articleComments">
-
- </div>
+
</div>
<footer>
@@ -299,7 +287,7 @@
</p>
</div>
- Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
+ 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>
@@ -318,6 +306,7 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../../',
VERSION:'',
+ LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
@@ -330,19 +319,13 @@
-
-
- <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
+ <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
-
<script type="text/javascript">
jQuery(function () {
- SphinxRtdTheme.StickyNav.enable();
+ SphinxRtdTheme.Navigation.enable(true);
});
- </script>
-
+ </script>
</body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-airflow-site/blob/7d4d7628/_modules/airflow/contrib/hooks/segment_hook.html
----------------------------------------------------------------------
diff --git a/_modules/airflow/contrib/hooks/segment_hook.html b/_modules/airflow/contrib/hooks/segment_hook.html
new file mode 100644
index 0000000..ccb8fd0
--- /dev/null
+++ b/_modules/airflow/contrib/hooks/segment_hook.html
@@ -0,0 +1,310 @@
+
+
+<!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.contrib.hooks.segment_hook — Airflow Documentation</title>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <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" />
+
+
+ <script src="../../../../_static/js/modernizr.min.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 role="search">
+ <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
+ <input type="text" name="q" placeholder="Search docs" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+</div>
+
+
+ </div>
+
+ <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+
+
+
+
+
+
+ <ul>
+<li class="toctree-l1"><a class="reference internal" href="../../../../project.html">Project</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../license.html">License</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../start.html">Quick Start</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../tutorial.html">Tutorial</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../howto/index.html">How-to Guides</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../ui.html">UI / Screenshots</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../concepts.html">Concepts</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../profiling.html">Data Profiling</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../cli.html">Command Line Interface</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="../../../../lineage.html">Lineage</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="../../../../code.html">API Reference</a></li>
+</ul>
+
+
+
+ </div>
+ </div>
+ </nav>
+
+ <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+
+ <nav class="wy-nav-top" aria-label="top navigation">
+
+ <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+ <a href="../../../../index.html">Airflow</a>
+
+ </nav>
+
+
+ <div class="wy-nav-content">
+
+ <div class="rst-content">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+ <ul class="wy-breadcrumbs">
+
+ <li><a href="../../../../index.html">Docs</a> »</li>
+
+ <li><a href="../../../index.html">Module code</a> »</li>
+
+ <li>airflow.contrib.hooks.segment_hook</li>
+
+
+ <li class="wy-breadcrumbs-aside">
+
+ </li>
+
+ </ul>
+
+
+ <hr/>
+</div>
+ <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+ <div itemprop="articleBody">
+
+ <h1>Source code for airflow.contrib.hooks.segment_hook</h1><div class="highlight"><pre>
+<span></span><span class="c1"># -*- coding: utf-8 -*-</span>
+<span class="c1">#</span>
+<span class="c1"># Licensed to the Apache Software Foundation (ASF) under one</span>
+<span class="c1"># or more contributor license agreements. See the NOTICE file</span>
+<span class="c1"># distributed with this work for additional information</span>
+<span class="c1"># regarding copyright ownership. The ASF licenses this file</span>
+<span class="c1"># to you under the Apache License, Version 2.0 (the</span>
+<span class="c1"># "License"); you may not use this file except in compliance</span>
+<span class="c1"># with the License. You may obtain a copy of the License at</span>
+<span class="c1">#</span>
+<span class="c1"># http://www.apache.org/licenses/LICENSE-2.0</span>
+<span class="c1">#</span>
+<span class="c1"># Unless required by applicable law or agreed to in writing,</span>
+<span class="c1"># software distributed under the License is distributed on an</span>
+<span class="c1"># "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
+<span class="c1"># KIND, either express or implied. See the License for the</span>
+<span class="c1"># specific language governing permissions and limitations</span>
+<span class="c1"># under the License.</span>
+<span class="c1">#</span>
+<span class="sd">"""</span>
+<span class="sd">This module contains a Segment Hook</span>
+<span class="sd">which allows you to connect to your Segment account,</span>
+<span class="sd">retrieve data from it or write to that file.</span>
+
+<span class="sd">NOTE: this hook also relies on the Segment analytics package:</span>
+<span class="sd"> https://github.com/segmentio/analytics-python</span>
+<span class="sd">"""</span>
+<span class="kn">import</span> <span class="nn">analytics</span>
+<span class="kn">from</span> <span class="nn">airflow.hooks.base_hook</span> <span class="k">import</span> <span class="n">BaseHook</span>
+<span class="kn">from</span> <span class="nn">airflow.exceptions</span> <span class="k">import</span> <span class="n">AirflowException</span>
+
+<span class="kn">from</span> <span class="nn">airflow.utils.log.logging_mixin</span> <span class="k">import</span> <span class="n">LoggingMixin</span>
+
+
+<div class="viewcode-block" id="SegmentHook"><a class="viewcode-back" href="../../../../code.html#airflow.contrib.hooks.segment_hook.SegmentHook">[docs]</a><span class="k">class</span> <span class="nc">SegmentHook</span><span class="p">(</span><span class="n">BaseHook</span><span class="p">,</span> <span class="n">LoggingMixin</span><span class="p">):</span>
+ <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span>
+ <span class="bp">self</span><span class="p">,</span>
+ <span class="n">segment_conn_id</span><span class="o">=</span><span class="s1">'segment_default'</span><span class="p">,</span>
+ <span class="n">segment_debug_mode</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span>
+ <span class="o">*</span><span class="n">args</span><span class="p">,</span>
+ <span class="o">**</span><span class="n">kwargs</span>
+ <span class="p">):</span>
+ <span class="sd">"""</span>
+<span class="sd"> Create new connection to Segment</span>
+<span class="sd"> and allows you to pull data out of Segment or write to it.</span>
+
+<span class="sd"> You can then use that file with other</span>
+<span class="sd"> Airflow operators to move the data around or interact with segment.</span>
+
+<span class="sd"> :param segment_conn_id: the name of the connection that has the parameters</span>
+<span class="sd"> we need to connect to Segment.</span>
+<span class="sd"> The connection should be type `json` and include a</span>
+<span class="sd"> write_key security token in the `Extras` field.</span>
+<span class="sd"> :type segment_conn_id: str</span>
+<span class="sd"> :param segment_debug_mode: Determines whether Segment should run in debug mode.</span>
+<span class="sd"> Defaults to False</span>
+<span class="sd"> :type segment_debug_mode: boolean</span>
+<span class="sd"> .. note::</span>
+<span class="sd"> You must include a JSON structure in the `Extras` field.</span>
+<span class="sd"> We need a user's security token to connect to Segment.</span>
+<span class="sd"> So we define it in the `Extras` field as:</span>
+<span class="sd"> `{"write_key":"YOUR_SECURITY_TOKEN"}`</span>
+<span class="sd"> """</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">segment_conn_id</span> <span class="o">=</span> <span class="n">segment_conn_id</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">segment_debug_mode</span> <span class="o">=</span> <span class="n">segment_debug_mode</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">_args</span> <span class="o">=</span> <span class="n">args</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">_kwargs</span> <span class="o">=</span> <span class="n">kwargs</span>
+
+ <span class="c1"># get the connection parameters</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">connection</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_connection</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">segment_conn_id</span><span class="p">)</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">extras</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">connection</span><span class="o">.</span><span class="n">extra_dejson</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">write_key</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">extras</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'write_key'</span><span class="p">)</span>
+ <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">write_key</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
+ <span class="k">raise</span> <span class="n">AirflowException</span><span class="p">(</span><span class="s1">'No Segment write key provided'</span><span class="p">)</span>
+
+ <span class="k">def</span> <span class="nf">get_conn</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s1">'Setting write key for Segment analytics connection'</span><span class="p">)</span>
+ <span class="n">analytics</span><span class="o">.</span><span class="n">debug</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">segment_debug_mode</span>
+ <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">segment_debug_mode</span><span class="p">:</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s1">'Setting Segment analytics connection to debug mode'</span><span class="p">)</span>
+ <span class="n">analytics</span><span class="o">.</span><span class="n">on_error</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">on_error</span>
+ <span class="n">analytics</span><span class="o">.</span><span class="n">write_key</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">write_key</span>
+ <span class="k">return</span> <span class="n">analytics</span>
+
+<div class="viewcode-block" id="SegmentHook.on_error"><a class="viewcode-back" href="../../../../code.html#airflow.contrib.hooks.segment_hook.SegmentHook.on_error">[docs]</a> <span class="k">def</span> <span class="nf">on_error</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">error</span><span class="p">,</span> <span class="n">items</span><span class="p">):</span>
+ <span class="sd">"""</span>
+<span class="sd"> Handles error callbacks when using Segment with segment_debug_mode set to True</span>
+<span class="sd"> """</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s1">'Encountered Segment error: </span><span class="si">{segment_error}</span><span class="s1"> with '</span>
+ <span class="s1">'items: </span><span class="si">{with_items}</span><span class="s1">'</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">segment_error</span><span class="o">=</span><span class="n">error</span><span class="p">,</span>
+ <span class="n">with_items</span><span class="o">=</span><span class="n">items</span><span class="p">))</span>
+ <span class="k">raise</span> <span class="n">AirflowException</span><span class="p">(</span><span class="s1">'Segment error: </span><span class="si">{}</span><span class="s1">'</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">error</span><span class="p">))</span></div></div>
+</pre></div>
+
+ </div>
+
+ </div>
+ <footer>
+
+
+ <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">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT:'../../../../',
+ VERSION:'',
+ LANGUAGE:'None',
+ COLLAPSE_INDEX:false,
+ FILE_SUFFIX:'.html',
+ HAS_SOURCE: true,
+ SOURCELINK_SUFFIX: '.txt'
+ };
+ </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/js/theme.js"></script>
+
+ <script type="text/javascript">
+ jQuery(function () {
+ SphinxRtdTheme.Navigation.enable(true);
+ });
+ </script>
+
+</body>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-airflow-site/blob/7d4d7628/_modules/airflow/contrib/hooks/sftp_hook.html
----------------------------------------------------------------------
diff --git a/_modules/airflow/contrib/hooks/sftp_hook.html b/_modules/airflow/contrib/hooks/sftp_hook.html
index 6b048cb..efc5485 100644
--- a/_modules/airflow/contrib/hooks/sftp_hook.html
+++ b/_modules/airflow/contrib/hooks/sftp_hook.html
@@ -24,26 +24,17 @@
-
-
- <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
-
-
-
-
-
- <link rel="index" title="Index"
- href="../../../../genindex.html"/>
- <link rel="search" title="Search" href="../../../../search.html"/>
- <link rel="top" title="Airflow Documentation" href="../../../../index.html"/>
- <link rel="up" title="Module code" href="../../../index.html"/>
+ <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" />
<script src="../../../../_static/js/modernizr.min.js"></script>
</head>
-<body class="wy-body-for-nav" role="document">
+<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
@@ -116,7 +107,7 @@
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
- <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+ <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>
@@ -124,9 +115,10 @@
</nav>
-
<div class="wy-nav-content">
+
<div class="rst-content">
+
@@ -156,8 +148,6 @@
<li class="wy-breadcrumbs-aside">
-
-
</li>
</ul>
@@ -178,9 +168,9 @@
<span class="c1"># to you under the Apache License, Version 2.0 (the</span>
<span class="c1"># "License"); you may not use this file except in compliance</span>
<span class="c1"># with the License. You may obtain a copy of the License at</span>
-<span class="c1"># </span>
+<span class="c1">#</span>
<span class="c1"># http://www.apache.org/licenses/LICENSE-2.0</span>
-<span class="c1"># </span>
+<span class="c1">#</span>
<span class="c1"># Unless required by applicable law or agreed to in writing,</span>
<span class="c1"># software distributed under the License is distributed on an</span>
<span class="c1"># "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
@@ -341,9 +331,7 @@
</pre></div>
</div>
- <div class="articleComments">
-
- </div>
+
</div>
<footer>
@@ -355,7 +343,7 @@
</p>
</div>
- Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
+ 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>
@@ -374,6 +362,7 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../../',
VERSION:'',
+ LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
@@ -386,19 +375,13 @@
-
-
- <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
+ <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
-
<script type="text/javascript">
jQuery(function () {
- SphinxRtdTheme.StickyNav.enable();
+ SphinxRtdTheme.Navigation.enable(true);
});
- </script>
-
+ </script>
</body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-airflow-site/blob/7d4d7628/_modules/airflow/contrib/hooks/slack_webhook_hook.html
----------------------------------------------------------------------
diff --git a/_modules/airflow/contrib/hooks/slack_webhook_hook.html b/_modules/airflow/contrib/hooks/slack_webhook_hook.html
index e3e9dfc..8112c68 100644
--- a/_modules/airflow/contrib/hooks/slack_webhook_hook.html
+++ b/_modules/airflow/contrib/hooks/slack_webhook_hook.html
@@ -24,26 +24,17 @@
-
-
- <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
-
-
-
-
-
- <link rel="index" title="Index"
- href="../../../../genindex.html"/>
- <link rel="search" title="Search" href="../../../../search.html"/>
- <link rel="top" title="Airflow Documentation" href="../../../../index.html"/>
- <link rel="up" title="Module code" href="../../../index.html"/>
+ <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" />
<script src="../../../../_static/js/modernizr.min.js"></script>
</head>
-<body class="wy-body-for-nav" role="document">
+<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
@@ -116,7 +107,7 @@
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
- <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+ <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>
@@ -124,9 +115,10 @@
</nav>
-
<div class="wy-nav-content">
+
<div class="rst-content">
+
@@ -156,8 +148,6 @@
<li class="wy-breadcrumbs-aside">
-
-
</li>
</ul>
@@ -178,9 +168,9 @@
<span class="c1"># to you under the Apache License, Version 2.0 (the</span>
<span class="c1"># "License"); you may not use this file except in compliance</span>
<span class="c1"># with the License. You may obtain a copy of the License at</span>
-<span class="c1"># </span>
+<span class="c1">#</span>
<span class="c1"># http://www.apache.org/licenses/LICENSE-2.0</span>
-<span class="c1"># </span>
+<span class="c1">#</span>
<span class="c1"># Unless required by applicable law or agreed to in writing,</span>
<span class="c1"># software distributed under the License is distributed on an</span>
<span class="c1"># "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
@@ -301,9 +291,7 @@
</pre></div>
</div>
- <div class="articleComments">
-
- </div>
+
</div>
<footer>
@@ -315,7 +303,7 @@
</p>
</div>
- Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
+ 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>
@@ -334,6 +322,7 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../../',
VERSION:'',
+ LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
@@ -346,19 +335,13 @@
-
-
- <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
+ <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
-
<script type="text/javascript">
jQuery(function () {
- SphinxRtdTheme.StickyNav.enable();
+ SphinxRtdTheme.Navigation.enable(true);
});
- </script>
-
+ </script>
</body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-airflow-site/blob/7d4d7628/_modules/airflow/contrib/hooks/snowflake_hook.html
----------------------------------------------------------------------
diff --git a/_modules/airflow/contrib/hooks/snowflake_hook.html b/_modules/airflow/contrib/hooks/snowflake_hook.html
new file mode 100644
index 0000000..aa15463
--- /dev/null
+++ b/_modules/airflow/contrib/hooks/snowflake_hook.html
@@ -0,0 +1,316 @@
+
+
+<!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.contrib.hooks.snowflake_hook — Airflow Documentation</title>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <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" />
+
+
+ <script src="../../../../_static/js/modernizr.min.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 role="search">
+ <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get">
+ <input type="text" name="q" placeholder="Search docs" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+</div>
+
+
+ </div>
+
+ <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
+
+
+
+
+
+
+ <ul>
+<li class="toctree-l1"><a class="reference internal" href="../../../../project.html">Project</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../license.html">License</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../start.html">Quick Start</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../installation.html">Installation</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../tutorial.html">Tutorial</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../howto/index.html">How-to Guides</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../ui.html">UI / Screenshots</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../concepts.html">Concepts</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../profiling.html">Data Profiling</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../../cli.html">Command Line Interface</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="../../../../lineage.html">Lineage</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="../../../../code.html">API Reference</a></li>
+</ul>
+
+
+
+ </div>
+ </div>
+ </nav>
+
+ <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
+
+
+ <nav class="wy-nav-top" aria-label="top navigation">
+
+ <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
+ <a href="../../../../index.html">Airflow</a>
+
+ </nav>
+
+
+ <div class="wy-nav-content">
+
+ <div class="rst-content">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<div role="navigation" aria-label="breadcrumbs navigation">
+
+ <ul class="wy-breadcrumbs">
+
+ <li><a href="../../../../index.html">Docs</a> »</li>
+
+ <li><a href="../../../index.html">Module code</a> »</li>
+
+ <li>airflow.contrib.hooks.snowflake_hook</li>
+
+
+ <li class="wy-breadcrumbs-aside">
+
+ </li>
+
+ </ul>
+
+
+ <hr/>
+</div>
+ <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
+ <div itemprop="articleBody">
+
+ <h1>Source code for airflow.contrib.hooks.snowflake_hook</h1><div class="highlight"><pre>
+<span></span><span class="c1"># -*- coding: utf-8 -*-</span>
+<span class="c1">#</span>
+<span class="c1"># Licensed to the Apache Software Foundation (ASF) under one</span>
+<span class="c1"># or more contributor license agreements. See the NOTICE file</span>
+<span class="c1"># distributed with this work for additional information</span>
+<span class="c1"># regarding copyright ownership. The ASF licenses this file</span>
+<span class="c1"># to you under the Apache License, Version 2.0 (the</span>
+<span class="c1"># "License"); you may not use this file except in compliance</span>
+<span class="c1"># with the License. You may obtain a copy of the License at</span>
+<span class="c1">#</span>
+<span class="c1"># http://www.apache.org/licenses/LICENSE-2.0</span>
+<span class="c1">#</span>
+<span class="c1"># Unless required by applicable law or agreed to in writing,</span>
+<span class="c1"># software distributed under the License is distributed on an</span>
+<span class="c1"># "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
+<span class="c1"># KIND, either express or implied. See the License for the</span>
+<span class="c1"># specific language governing permissions and limitations</span>
+<span class="c1"># under the License.</span>
+
+<span class="kn">import</span> <span class="nn">snowflake.connector</span>
+
+<span class="kn">from</span> <span class="nn">airflow.hooks.dbapi_hook</span> <span class="k">import</span> <span class="n">DbApiHook</span>
+
+
+<div class="viewcode-block" id="SnowflakeHook"><a class="viewcode-back" href="../../../../code.html#airflow.contrib.hooks.snowflake_hook.SnowflakeHook">[docs]</a><span class="k">class</span> <span class="nc">SnowflakeHook</span><span class="p">(</span><span class="n">DbApiHook</span><span class="p">):</span>
+ <span class="sd">"""</span>
+<span class="sd"> Interact with Snowflake.</span>
+
+<span class="sd"> get_sqlalchemy_engine() depends on snowflake-sqlalchemy</span>
+
+<span class="sd"> """</span>
+
+ <span class="n">conn_name_attr</span> <span class="o">=</span> <span class="s1">'snowflake_conn_id'</span>
+ <span class="n">default_conn_name</span> <span class="o">=</span> <span class="s1">'snowflake_default'</span>
+ <span class="n">supports_autocommit</span> <span class="o">=</span> <span class="kc">True</span>
+
+ <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
+ <span class="nb">super</span><span class="p">(</span><span class="n">SnowflakeHook</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">account</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">"account"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">warehouse</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">"warehouse"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">database</span> <span class="o">=</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s2">"database"</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
+
+ <span class="k">def</span> <span class="nf">_get_conn_params</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+ <span class="sd">"""</span>
+<span class="sd"> one method to fetch connection params as a dict</span>
+<span class="sd"> used in get_uri() and get_connection()</span>
+<span class="sd"> """</span>
+ <span class="n">conn</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_connection</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">snowflake_conn_id</span><span class="p">)</span>
+ <span class="n">account</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="n">extra_dejson</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'account'</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
+ <span class="n">warehouse</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="n">extra_dejson</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'warehouse'</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
+ <span class="n">database</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="n">extra_dejson</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'database'</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
+
+ <span class="n">conn_config</span> <span class="o">=</span> <span class="p">{</span>
+ <span class="s2">"user"</span><span class="p">:</span> <span class="n">conn</span><span class="o">.</span><span class="n">login</span><span class="p">,</span>
+ <span class="s2">"password"</span><span class="p">:</span> <span class="n">conn</span><span class="o">.</span><span class="n">password</span> <span class="ow">or</span> <span class="s1">''</span><span class="p">,</span>
+ <span class="s2">"schema"</span><span class="p">:</span> <span class="n">conn</span><span class="o">.</span><span class="n">schema</span> <span class="ow">or</span> <span class="s1">''</span><span class="p">,</span>
+ <span class="s2">"database"</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">database</span> <span class="ow">or</span> <span class="n">database</span> <span class="ow">or</span> <span class="s1">''</span><span class="p">,</span>
+ <span class="s2">"account"</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">account</span> <span class="ow">or</span> <span class="n">account</span> <span class="ow">or</span> <span class="s1">''</span><span class="p">,</span>
+ <span class="s2">"warehouse"</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">warehouse</span> <span class="ow">or</span> <span class="n">warehouse</span> <span class="ow">or</span> <span class="s1">''</span>
+ <span class="p">}</span>
+ <span class="k">return</span> <span class="n">conn_config</span>
+
+<div class="viewcode-block" id="SnowflakeHook.get_uri"><a class="viewcode-back" href="../../../../code.html#airflow.contrib.hooks.snowflake_hook.SnowflakeHook.get_uri">[docs]</a> <span class="k">def</span> <span class="nf">get_uri</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+ <span class="sd">"""</span>
+<span class="sd"> override DbApiHook get_uri method for get_sqlalchemy_engine()</span>
+<span class="sd"> """</span>
+ <span class="n">conn_config</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_conn_params</span><span class="p">()</span>
+ <span class="n">uri</span> <span class="o">=</span> <span class="s1">'snowflake://</span><span class="si">{user}</span><span class="s1">:</span><span class="si">{password}</span><span class="s1">@</span><span class="si">{account}</span><span class="s1">/</span><span class="si">{database}</span><span class="s1">/'</span>
+ <span class="n">uri</span> <span class="o">+=</span> <span class="s1">'</span><span class="si">{schema}</span><span class="s1">?warehouse=</span><span class="si">{warehouse}</span><span class="s1">'</span>
+ <span class="k">return</span> <span class="n">uri</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+ <span class="o">**</span><span class="n">conn_config</span><span class="p">)</span></div>
+
+<div class="viewcode-block" id="SnowflakeHook.get_conn"><a class="viewcode-back" href="../../../../code.html#airflow.contrib.hooks.snowflake_hook.SnowflakeHook.get_conn">[docs]</a> <span class="k">def</span> <span class="nf">get_conn</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+ <span class="sd">"""</span>
+<span class="sd"> Returns a snowflake.connection object</span>
+<span class="sd"> """</span>
+ <span class="n">conn_config</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_conn_params</span><span class="p">()</span>
+ <span class="n">conn</span> <span class="o">=</span> <span class="n">snowflake</span><span class="o">.</span><span class="n">connector</span><span class="o">.</span><span class="n">connect</span><span class="p">(</span><span class="o">**</span><span class="n">conn_config</span><span class="p">)</span>
+ <span class="k">return</span> <span class="n">conn</span></div>
+
+ <span class="k">def</span> <span class="nf">_get_aws_credentials</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
+ <span class="sd">"""</span>
+<span class="sd"> returns aws_access_key_id, aws_secret_access_key</span>
+<span class="sd"> from extra</span>
+
+<span class="sd"> intended to be used by external import and export statements</span>
+<span class="sd"> """</span>
+ <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">snowflake_conn_id</span><span class="p">:</span>
+ <span class="n">connection_object</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">get_connection</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">snowflake_conn_id</span><span class="p">)</span>
+ <span class="k">if</span> <span class="s1">'aws_secret_access_key'</span> <span class="ow">in</span> <span class="n">connection_object</span><span class="o">.</span><span class="n">extra_dejson</span><span class="p">:</span>
+ <span class="n">aws_access_key_id</span> <span class="o">=</span> <span class="n">connection_object</span><span class="o">.</span><span class="n">extra_dejson</span><span class="o">.</span><span class="n">get</span><span class="p">(</span>
+ <span class="s1">'aws_access_key_id'</span><span class="p">)</span>
+ <span class="n">aws_secret_access_key</span> <span class="o">=</span> <span class="n">connection_object</span><span class="o">.</span><span class="n">extra_dejson</span><span class="o">.</span><span class="n">get</span><span class="p">(</span>
+ <span class="s1">'aws_secret_access_key'</span><span class="p">)</span>
+ <span class="k">return</span> <span class="n">aws_access_key_id</span><span class="p">,</span> <span class="n">aws_secret_access_key</span>
+
+<div class="viewcode-block" id="SnowflakeHook.set_autocommit"><a class="viewcode-back" href="../../../../code.html#airflow.contrib.hooks.snowflake_hook.SnowflakeHook.set_autocommit">[docs]</a> <span class="k">def</span> <span class="nf">set_autocommit</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">conn</span><span class="p">,</span> <span class="n">autocommit</span><span class="p">):</span>
+ <span class="n">conn</span><span class="o">.</span><span class="n">autocommit</span><span class="p">(</span><span class="n">autocommit</span><span class="p">)</span></div></div>
+</pre></div>
+
+ </div>
+
+ </div>
+ <footer>
+
+
+ <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">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT:'../../../../',
+ VERSION:'',
+ LANGUAGE:'None',
+ COLLAPSE_INDEX:false,
+ FILE_SUFFIX:'.html',
+ HAS_SOURCE: true,
+ SOURCELINK_SUFFIX: '.txt'
+ };
+ </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/js/theme.js"></script>
+
+ <script type="text/javascript">
+ jQuery(function () {
+ SphinxRtdTheme.Navigation.enable(true);
+ });
+ </script>
+
+</body>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-airflow-site/blob/7d4d7628/_modules/airflow/contrib/hooks/spark_jdbc_hook.html
----------------------------------------------------------------------
diff --git a/_modules/airflow/contrib/hooks/spark_jdbc_hook.html b/_modules/airflow/contrib/hooks/spark_jdbc_hook.html
index c22b1e5..f6fe261 100644
--- a/_modules/airflow/contrib/hooks/spark_jdbc_hook.html
+++ b/_modules/airflow/contrib/hooks/spark_jdbc_hook.html
@@ -24,26 +24,17 @@
-
-
- <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
-
-
-
-
-
- <link rel="index" title="Index"
- href="../../../../genindex.html"/>
- <link rel="search" title="Search" href="../../../../search.html"/>
- <link rel="top" title="Airflow Documentation" href="../../../../index.html"/>
- <link rel="up" title="Module code" href="../../../index.html"/>
+ <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" />
<script src="../../../../_static/js/modernizr.min.js"></script>
</head>
-<body class="wy-body-for-nav" role="document">
+<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
@@ -116,7 +107,7 @@
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
- <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+ <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>
@@ -124,9 +115,10 @@
</nav>
-
<div class="wy-nav-content">
+
<div class="rst-content">
+
@@ -156,8 +148,6 @@
<li class="wy-breadcrumbs-aside">
-
-
</li>
</ul>
@@ -178,9 +168,9 @@
<span class="c1"># to you under the Apache License, Version 2.0 (the</span>
<span class="c1"># "License"); you may not use this file except in compliance</span>
<span class="c1"># with the License. You may obtain a copy of the License at</span>
-<span class="c1"># </span>
+<span class="c1">#</span>
<span class="c1"># http://www.apache.org/licenses/LICENSE-2.0</span>
-<span class="c1"># </span>
+<span class="c1">#</span>
<span class="c1"># Unless required by applicable law or agreed to in writing,</span>
<span class="c1"># software distributed under the License is distributed on an</span>
<span class="c1"># "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
@@ -418,9 +408,7 @@
</pre></div>
</div>
- <div class="articleComments">
-
- </div>
+
</div>
<footer>
@@ -432,7 +420,7 @@
</p>
</div>
- Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
+ 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>
@@ -451,6 +439,7 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../../',
VERSION:'',
+ LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
@@ -463,19 +452,13 @@
-
-
- <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
+ <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
-
<script type="text/javascript">
jQuery(function () {
- SphinxRtdTheme.StickyNav.enable();
+ SphinxRtdTheme.Navigation.enable(true);
});
- </script>
-
+ </script>
</body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-airflow-site/blob/7d4d7628/_modules/airflow/contrib/hooks/spark_sql_hook.html
----------------------------------------------------------------------
diff --git a/_modules/airflow/contrib/hooks/spark_sql_hook.html b/_modules/airflow/contrib/hooks/spark_sql_hook.html
index 08d3147..ba78c7b 100644
--- a/_modules/airflow/contrib/hooks/spark_sql_hook.html
+++ b/_modules/airflow/contrib/hooks/spark_sql_hook.html
@@ -24,26 +24,17 @@
-
-
- <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
-
-
-
-
-
- <link rel="index" title="Index"
- href="../../../../genindex.html"/>
- <link rel="search" title="Search" href="../../../../search.html"/>
- <link rel="top" title="Airflow Documentation" href="../../../../index.html"/>
- <link rel="up" title="Module code" href="../../../index.html"/>
+ <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" />
<script src="../../../../_static/js/modernizr.min.js"></script>
</head>
-<body class="wy-body-for-nav" role="document">
+<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
@@ -116,7 +107,7 @@
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
- <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+ <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>
@@ -124,9 +115,10 @@
</nav>
-
<div class="wy-nav-content">
+
<div class="rst-content">
+
@@ -156,8 +148,6 @@
<li class="wy-breadcrumbs-aside">
-
-
</li>
</ul>
@@ -178,9 +168,9 @@
<span class="c1"># to you under the Apache License, Version 2.0 (the</span>
<span class="c1"># "License"); you may not use this file except in compliance</span>
<span class="c1"># with the License. You may obtain a copy of the License at</span>
-<span class="c1"># </span>
+<span class="c1">#</span>
<span class="c1"># http://www.apache.org/licenses/LICENSE-2.0</span>
-<span class="c1"># </span>
+<span class="c1">#</span>
<span class="c1"># Unless required by applicable law or agreed to in writing,</span>
<span class="c1"># software distributed under the License is distributed on an</span>
<span class="c1"># "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
@@ -192,7 +182,6 @@
<span class="kn">from</span> <span class="nn">airflow.hooks.base_hook</span> <span class="k">import</span> <span class="n">BaseHook</span>
<span class="kn">from</span> <span class="nn">airflow.exceptions</span> <span class="k">import</span> <span class="n">AirflowException</span>
-<span class="kn">from</span> <span class="nn">airflow.utils.log.logging_mixin</span> <span class="k">import</span> <span class="n">LoggingMixin</span>
<div class="viewcode-block" id="SparkSqlHook"><a class="viewcode-back" href="../../../../code.html#airflow.contrib.hooks.spark_sql_hook.SparkSqlHook">[docs]</a><span class="k">class</span> <span class="nc">SparkSqlHook</span><span class="p">(</span><span class="n">BaseHook</span><span class="p">):</span>
@@ -205,9 +194,11 @@
<span class="sd"> :type conf: str (format: PROP=VALUE)</span>
<span class="sd"> :param conn_id: connection_id string</span>
<span class="sd"> :type conn_id: str</span>
-<span class="sd"> :param total_executor_cores: (Standalone & Mesos only) Total cores for all executors (Default: all the available cores on the worker)</span>
+<span class="sd"> :param total_executor_cores: (Standalone & Mesos only) Total cores for all executors</span>
+<span class="sd"> (Default: all the available cores on the worker)</span>
<span class="sd"> :type total_executor_cores: int</span>
-<span class="sd"> :param executor_cores: (Standalone & YARN only) Number of cores per executor (Default: 2)</span>
+<span class="sd"> :param executor_cores: (Standalone & YARN only) Number of cores per</span>
+<span class="sd"> executor (Default: 2)</span>
<span class="sd"> :type executor_cores: int</span>
<span class="sd"> :param executor_memory: Memory per executor (e.g. 1000M, 2G) (Default: 1G)</span>
<span class="sd"> :type executor_memory: str</span>
@@ -333,9 +324,7 @@
</pre></div>
</div>
- <div class="articleComments">
-
- </div>
+
</div>
<footer>
@@ -347,7 +336,7 @@
</p>
</div>
- Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
+ 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>
@@ -366,6 +355,7 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../../',
VERSION:'',
+ LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
@@ -378,19 +368,13 @@
-
-
- <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
+ <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
-
<script type="text/javascript">
jQuery(function () {
- SphinxRtdTheme.StickyNav.enable();
+ SphinxRtdTheme.Navigation.enable(true);
});
- </script>
-
+ </script>
</body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-airflow-site/blob/7d4d7628/_modules/airflow/contrib/hooks/spark_submit_hook.html
----------------------------------------------------------------------
diff --git a/_modules/airflow/contrib/hooks/spark_submit_hook.html b/_modules/airflow/contrib/hooks/spark_submit_hook.html
index 6903f5f..9e47eef 100644
--- a/_modules/airflow/contrib/hooks/spark_submit_hook.html
+++ b/_modules/airflow/contrib/hooks/spark_submit_hook.html
@@ -24,26 +24,17 @@
-
-
- <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
-
-
-
-
-
- <link rel="index" title="Index"
- href="../../../../genindex.html"/>
- <link rel="search" title="Search" href="../../../../search.html"/>
- <link rel="top" title="Airflow Documentation" href="../../../../index.html"/>
- <link rel="up" title="Module code" href="../../../index.html"/>
+ <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" />
<script src="../../../../_static/js/modernizr.min.js"></script>
</head>
-<body class="wy-body-for-nav" role="document">
+<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
@@ -116,7 +107,7 @@
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
- <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+ <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>
@@ -124,9 +115,10 @@
</nav>
-
<div class="wy-nav-content">
+
<div class="rst-content">
+
@@ -156,8 +148,6 @@
<li class="wy-breadcrumbs-aside">
-
-
</li>
</ul>
@@ -197,7 +187,6 @@
<span class="kn">from</span> <span class="nn">airflow.exceptions</span> <span class="k">import</span> <span class="n">AirflowException</span>
<span class="kn">from</span> <span class="nn">airflow.utils.log.logging_mixin</span> <span class="k">import</span> <span class="n">LoggingMixin</span>
<span class="kn">from</span> <span class="nn">airflow.contrib.kubernetes</span> <span class="k">import</span> <span class="n">kube_client</span>
-<span class="kn">from</span> <span class="nn">kubernetes.client.rest</span> <span class="k">import</span> <span class="n">ApiException</span>
<div class="viewcode-block" id="SparkSubmitHook"><a class="viewcode-back" href="../../../../code.html#airflow.contrib.hooks.spark_submit_hook.SparkSubmitHook">[docs]</a><span class="k">class</span> <span class="nc">SparkSubmitHook</span><span class="p">(</span><span class="n">BaseHook</span><span class="p">,</span> <span class="n">LoggingMixin</span><span class="p">):</span>
@@ -307,6 +296,10 @@
<span class="bp">self</span><span class="o">.</span><span class="n">_connection</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_resolve_connection</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_is_yarn</span> <span class="o">=</span> <span class="s1">'yarn'</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_connection</span><span class="p">[</span><span class="s1">'master'</span><span class="p">]</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_is_kubernetes</span> <span class="o">=</span> <span class="s1">'k8s'</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_connection</span><span class="p">[</span><span class="s1">'master'</span><span class="p">]</span>
+ <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_is_kubernetes</span> <span class="ow">and</span> <span class="n">kube_client</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
+ <span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span>
+ <span class="s2">"</span><span class="si">{master}</span><span class="s2"> specified by kubernetes dependencies are not installed!"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">_connection</span><span class="p">[</span><span class="s1">'master'</span><span class="p">]))</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_should_track_driver_status</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_resolve_should_track_driver_status</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_driver_id</span> <span class="o">=</span> <span class="kc">None</span>
@@ -730,15 +723,13 @@
<span class="bp">self</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"Spark on K8s killed with response: </span><span class="si">%s</span><span class="s2">"</span><span class="p">,</span> <span class="n">api_response</span><span class="p">)</span>
- <span class="k">except</span> <span class="n">ApiException</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
+ <span class="k">except</span> <span class="n">kube_client</span><span class="o">.</span><span class="n">ApiException</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"Exception when attempting to kill Spark on K8s:"</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">exception</span><span class="p">(</span><span class="n">e</span><span class="p">)</span></div>
</pre></div>
</div>
- <div class="articleComments">
-
- </div>
+
</div>
<footer>
@@ -750,7 +741,7 @@
</p>
</div>
- Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
+ 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>
@@ -769,6 +760,7 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../../',
VERSION:'',
+ LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
@@ -781,19 +773,13 @@
-
-
- <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
+ <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
-
<script type="text/javascript">
jQuery(function () {
- SphinxRtdTheme.StickyNav.enable();
+ SphinxRtdTheme.Navigation.enable(true);
});
- </script>
-
+ </script>
</body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-airflow-site/blob/7d4d7628/_modules/airflow/contrib/hooks/sqoop_hook.html
----------------------------------------------------------------------
diff --git a/_modules/airflow/contrib/hooks/sqoop_hook.html b/_modules/airflow/contrib/hooks/sqoop_hook.html
index 4563030..9c13d5f 100644
--- a/_modules/airflow/contrib/hooks/sqoop_hook.html
+++ b/_modules/airflow/contrib/hooks/sqoop_hook.html
@@ -24,26 +24,17 @@
-
-
- <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
-
-
-
-
-
- <link rel="index" title="Index"
- href="../../../../genindex.html"/>
- <link rel="search" title="Search" href="../../../../search.html"/>
- <link rel="top" title="Airflow Documentation" href="../../../../index.html"/>
- <link rel="up" title="Module code" href="../../../index.html"/>
+ <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" />
<script src="../../../../_static/js/modernizr.min.js"></script>
</head>
-<body class="wy-body-for-nav" role="document">
+<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
@@ -116,7 +107,7 @@
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
- <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+ <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>
@@ -124,9 +115,10 @@
</nav>
-
<div class="wy-nav-content">
+
<div class="rst-content">
+
@@ -156,8 +148,6 @@
<li class="wy-breadcrumbs-aside">
-
-
</li>
</ul>
@@ -178,9 +168,9 @@
<span class="c1"># to you under the Apache License, Version 2.0 (the</span>
<span class="c1"># "License"); you may not use this file except in compliance</span>
<span class="c1"># with the License. You may obtain a copy of the License at</span>
-<span class="c1"># </span>
+<span class="c1">#</span>
<span class="c1"># http://www.apache.org/licenses/LICENSE-2.0</span>
-<span class="c1"># </span>
+<span class="c1">#</span>
<span class="c1"># Unless required by applicable law or agreed to in writing,</span>
<span class="c1"># software distributed under the License is distributed on an</span>
<span class="c1"># "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
@@ -242,7 +232,11 @@
<span class="bp">self</span><span class="o">.</span><span class="n">verbose</span> <span class="o">=</span> <span class="n">verbose</span>
<span class="bp">self</span><span class="o">.</span><span class="n">num_mappers</span> <span class="o">=</span> <span class="n">num_mappers</span>
<span class="bp">self</span><span class="o">.</span><span class="n">properties</span> <span class="o">=</span> <span class="n">properties</span> <span class="ow">or</span> <span class="p">{}</span>
- <span class="bp">self</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"Using connection to: </span><span class="si">{}</span><span class="s2">:</span><span class="si">{}</span><span class="s2">/</span><span class="si">{}</span><span class="s2">"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">conn</span><span class="o">.</span><span class="n">host</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">conn</span><span class="o">.</span><span class="n">port</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">conn</span><span class="o">.</span><span class="n">schema</span><span class="p">))</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span>
+ <span class="s2">"Using connection to: </span><span class="si">{}</span><span class="s2">:</span><span class="si">{}</span><span class="s2">/</span><span class="si">{}</span><span class="s2">"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">conn</span><span class="o">.</span><span class="n">host</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">conn</span><span class="o">.</span><span class="n">port</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">conn</span><span class="o">.</span><span class="n">schema</span>
+ <span class="p">)</span>
+ <span class="p">)</span>
<span class="k">def</span> <span class="nf">get_conn</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">conn</span>
@@ -266,10 +260,11 @@
<span class="sd"> """</span>
<span class="n">masked_cmd</span> <span class="o">=</span> <span class="s1">' '</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">cmd_mask_password</span><span class="p">(</span><span class="n">cmd</span><span class="p">))</span>
<span class="bp">self</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"Executing command: </span><span class="si">{}</span><span class="s2">"</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">masked_cmd</span><span class="p">))</span>
- <span class="bp">self</span><span class="o">.</span><span class="n">sp</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">Popen</span><span class="p">(</span><span class="n">cmd</span><span class="p">,</span>
- <span class="n">stdout</span><span class="o">=</span><span class="n">subprocess</span><span class="o">.</span><span class="n">PIPE</span><span class="p">,</span>
- <span class="n">stderr</span><span class="o">=</span><span class="n">subprocess</span><span class="o">.</span><span class="n">STDOUT</span><span class="p">,</span>
- <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
+ <span class="bp">self</span><span class="o">.</span><span class="n">sp</span> <span class="o">=</span> <span class="n">subprocess</span><span class="o">.</span><span class="n">Popen</span><span class="p">(</span>
+ <span class="n">cmd</span><span class="p">,</span>
+ <span class="n">stdout</span><span class="o">=</span><span class="n">subprocess</span><span class="o">.</span><span class="n">PIPE</span><span class="p">,</span>
+ <span class="n">stderr</span><span class="o">=</span><span class="n">subprocess</span><span class="o">.</span><span class="n">STDOUT</span><span class="p">,</span>
+ <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
<span class="k">for</span> <span class="n">line</span> <span class="ow">in</span> <span class="nb">iter</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">sp</span><span class="o">.</span><span class="n">stdout</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">line</span><span class="o">.</span><span class="n">strip</span><span class="p">())</span>
@@ -360,7 +355,8 @@
<span class="k">if</span> <span class="n">extra_import_options</span><span class="p">:</span>
<span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">extra_import_options</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="n">cmd</span> <span class="o">+=</span> <span class="p">[</span><span class="s1">'--</span><span class="si">{}</span><span class="s1">'</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">key</span><span class="p">)]</span>
- <span class="k">if</span> <span class="n">value</span><span class="p">:</span> <span class="n">cmd</span> <span class="o">+=</span> <span class="p">[</span><span class="n">value</span><span class="p">]</span>
+ <span class="k">if</span> <span class="n">value</span><span class="p">:</span>
+ <span class="n">cmd</span> <span class="o">+=</span> <span class="p">[</span><span class="n">value</span><span class="p">]</span>
<span class="k">return</span> <span class="n">cmd</span>
@@ -466,7 +462,8 @@
<span class="k">if</span> <span class="n">extra_export_options</span><span class="p">:</span>
<span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">extra_export_options</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="n">cmd</span> <span class="o">+=</span> <span class="p">[</span><span class="s1">'--</span><span class="si">{}</span><span class="s1">'</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">key</span><span class="p">)]</span>
- <span class="k">if</span> <span class="n">value</span><span class="p">:</span> <span class="n">cmd</span> <span class="o">+=</span> <span class="p">[</span><span class="n">value</span><span class="p">]</span>
+ <span class="k">if</span> <span class="n">value</span><span class="p">:</span>
+ <span class="n">cmd</span> <span class="o">+=</span> <span class="p">[</span><span class="n">value</span><span class="p">]</span>
<span class="c1"># The required option</span>
<span class="n">cmd</span> <span class="o">+=</span> <span class="p">[</span><span class="s2">"--table"</span><span class="p">,</span> <span class="n">table</span><span class="p">]</span>
@@ -517,9 +514,7 @@
</pre></div>
</div>
- <div class="articleComments">
-
- </div>
+
</div>
<footer>
@@ -531,7 +526,7 @@
</p>
</div>
- Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
+ 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>
@@ -550,6 +545,7 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../../',
VERSION:'',
+ LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
@@ -562,19 +558,13 @@
-
-
- <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
+ <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
-
<script type="text/javascript">
jQuery(function () {
- SphinxRtdTheme.StickyNav.enable();
+ SphinxRtdTheme.Navigation.enable(true);
});
- </script>
-
+ </script>
</body>
</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-airflow-site/blob/7d4d7628/_modules/airflow/contrib/hooks/ssh_hook.html
----------------------------------------------------------------------
diff --git a/_modules/airflow/contrib/hooks/ssh_hook.html b/_modules/airflow/contrib/hooks/ssh_hook.html
index 08f1831..453721f 100644
--- a/_modules/airflow/contrib/hooks/ssh_hook.html
+++ b/_modules/airflow/contrib/hooks/ssh_hook.html
@@ -24,26 +24,17 @@
-
-
- <link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
-
-
-
-
-
- <link rel="index" title="Index"
- href="../../../../genindex.html"/>
- <link rel="search" title="Search" href="../../../../search.html"/>
- <link rel="top" title="Airflow Documentation" href="../../../../index.html"/>
- <link rel="up" title="Module code" href="../../../index.html"/>
+ <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" />
<script src="../../../../_static/js/modernizr.min.js"></script>
</head>
-<body class="wy-body-for-nav" role="document">
+<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
@@ -116,7 +107,7 @@
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
- <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
+ <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>
@@ -124,9 +115,10 @@
</nav>
-
<div class="wy-nav-content">
+
<div class="rst-content">
+
@@ -156,8 +148,6 @@
<li class="wy-breadcrumbs-aside">
-
-
</li>
</ul>
@@ -171,9 +161,6 @@
<h1>Source code for airflow.contrib.hooks.ssh_hook</h1><div class="highlight"><pre>
<span></span><span class="c1"># -*- coding: utf-8 -*-</span>
<span class="c1">#</span>
-<span class="c1"># Copyright 2012-2015 Spotify AB</span>
-<span class="c1"># Ported to Airflow by Bolke de Bruin</span>
-<span class="c1">#</span>
<span class="c1"># Licensed to the Apache Software Foundation (ASF) under one</span>
<span class="c1"># or more contributor license agreements. See the NOTICE file</span>
<span class="c1"># distributed with this work for additional information</span>
@@ -181,9 +168,9 @@
<span class="c1"># to you under the Apache License, Version 2.0 (the</span>
<span class="c1"># "License"); you may not use this file except in compliance</span>
<span class="c1"># with the License. You may obtain a copy of the License at</span>
-<span class="c1"># </span>
+<span class="c1">#</span>
<span class="c1"># http://www.apache.org/licenses/LICENSE-2.0</span>
-<span class="c1"># </span>
+<span class="c1">#</span>
<span class="c1"># Unless required by applicable law or agreed to in writing,</span>
<span class="c1"># software distributed under the License is distributed on an</span>
<span class="c1"># "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span>
@@ -225,7 +212,8 @@
<span class="sd"> :type port: int</span>
<span class="sd"> :param timeout: timeout for the attempt to connect to the remote_host.</span>
<span class="sd"> :type timeout: int</span>
-<span class="sd"> :param keepalive_interval: send a keepalive packet to remote host every keepalive_interval seconds</span>
+<span class="sd"> :param keepalive_interval: send a keepalive packet to remote host every</span>
+<span class="sd"> keepalive_interval seconds</span>
<span class="sd"> :type keepalive_interval: int</span>
<span class="sd"> """</span>
@@ -407,9 +395,7 @@
</pre></div>
</div>
- <div class="articleComments">
-
- </div>
+
</div>
<footer>
@@ -421,7 +407,7 @@
</p>
</div>
- Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
+ 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>
@@ -440,6 +426,7 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../../../',
VERSION:'',
+ LANGUAGE:'None',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true,
@@ -452,19 +439,13 @@
-
-
- <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
+ <script type="text/javascript" src="../../../../_static/js/theme.js"></script>
-
-
<script type="text/javascript">
jQuery(function () {
- SphinxRtdTheme.StickyNav.enable();
+ SphinxRtdTheme.Navigation.enable(true);
});
- </script>
-
+ </script>
</body>
</html>
\ No newline at end of file