http://git-wip-us.apache.org/repos/asf/incubator-airflow-site/blob/11437c14/_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
new file mode 100644
index 0000000..4563030
--- /dev/null
+++ b/_modules/airflow/contrib/hooks/sqoop_hook.html
@@ -0,0 +1,580 @@
+
+
+<!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.sqoop_hook &mdash; Airflow Documentation</title>
+  
+
+  
+  
+  
+  
+
+  
+
+  
+  
+    
+
+  
+
+  
+  
+    <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"/> 
+
+  
+  <script src="../../../../_static/js/modernizr.min.js"></script>
+
+</head>
+
+<body class="wy-body-for-nav" role="document">
+
+   
+  <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 &amp; 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" role="navigation" 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> &raquo;</li>
+        
+          <li><a href="../../../index.html">Module code</a> &raquo;</li>
+        
+      <li>airflow.contrib.hooks.sqoop_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.sqoop_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"># &quot;License&quot;); 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"># &quot;AS IS&quot; 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">&quot;&quot;&quot;</span>
+<span class="sd">This module contains a sqoop 1.x hook</span>
+<span class="sd">&quot;&quot;&quot;</span>
+<span class="kn">import</span> <span class="nn">subprocess</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.hooks.base_hook</span> 
<span class="k">import</span> <span class="n">BaseHook</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">copy</span> <span 
class="k">import</span> <span class="n">deepcopy</span>
+
+
+<div class="viewcode-block" id="SqoopHook"><a class="viewcode-back" 
href="../../../../code.html#airflow.contrib.hooks.sqoop_hook.SqoopHook">[docs]</a><span
 class="k">class</span> <span class="nc">SqoopHook</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="sd">&quot;&quot;&quot;</span>
+<span class="sd">    This hook is a wrapper around the sqoop 1 binary. To be 
able to use the hook</span>
+<span class="sd">    it is required that &quot;sqoop&quot; is in the 
PATH.</span>
+
+<span class="sd">    Additional arguments that can be passed via the 
&#39;extra&#39; JSON field of the</span>
+<span class="sd">    sqoop connection:</span>
+<span class="sd">    * job_tracker: Job tracker local|jobtracker:port.</span>
+<span class="sd">    * namenode: Namenode.</span>
+<span class="sd">    * lib_jars: Comma separated jar files to include in the 
classpath.</span>
+<span class="sd">    * files: Comma separated files to be copied to the map 
reduce cluster.</span>
+<span class="sd">    * archives: Comma separated archives to be unarchived on 
the compute</span>
+<span class="sd">        machines.</span>
+<span class="sd">    * password_file: Path to file containing the 
password.</span>
+
+<span class="sd">    :param conn_id: Reference to the sqoop connection.</span>
+<span class="sd">    :type conn_id: str</span>
+<span class="sd">    :param verbose: Set sqoop to verbose.</span>
+<span class="sd">    :type verbose: bool</span>
+<span class="sd">    :param num_mappers: Number of map tasks to import in 
parallel.</span>
+<span class="sd">    :type num_mappers: int</span>
+<span class="sd">    :param properties: Properties to set via the -D 
argument</span>
+<span class="sd">    :type properties: dict</span>
+<span class="sd">    &quot;&quot;&quot;</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">conn_id</span><span class="o">=</span><span 
class="s1">&#39;sqoop_default&#39;</span><span class="p">,</span> <span 
class="n">verbose</span><span class="o">=</span><span 
class="kc">False</span><span class="p">,</span>
+                 <span class="n">num_mappers</span><span 
class="o">=</span><span class="kc">None</span><span class="p">,</span> <span 
class="n">hcatalog_database</span><span class="o">=</span><span 
class="kc">None</span><span class="p">,</span>
+                 <span class="n">hcatalog_table</span><span 
class="o">=</span><span class="kc">None</span><span class="p">,</span> <span 
class="n">properties</span><span class="o">=</span><span 
class="kc">None</span><span class="p">):</span>
+        <span class="c1"># No mutable types in the default parameters</span>
+        <span class="bp">self</span><span class="o">.</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="n">conn_id</span><span class="p">)</span>
+        <span class="n">connection_parameters</span> <span class="o">=</span> 
<span class="bp">self</span><span class="o">.</span><span 
class="n">conn</span><span class="o">.</span><span class="n">extra_dejson</span>
+        <span class="bp">self</span><span class="o">.</span><span 
class="n">job_tracker</span> <span class="o">=</span> <span 
class="n">connection_parameters</span><span class="o">.</span><span 
class="n">get</span><span class="p">(</span><span 
class="s1">&#39;job_tracker&#39;</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">namenode</span> <span class="o">=</span> <span 
class="n">connection_parameters</span><span class="o">.</span><span 
class="n">get</span><span class="p">(</span><span 
class="s1">&#39;namenode&#39;</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">libjars</span> <span class="o">=</span> <span 
class="n">connection_parameters</span><span class="o">.</span><span 
class="n">get</span><span class="p">(</span><span 
class="s1">&#39;libjars&#39;</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">files</span> <span class="o">=</span> <span 
class="n">connection_parameters</span><span class="o">.</span><span 
class="n">get</span><span class="p">(</span><span 
class="s1">&#39;files&#39;</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">archives</span> <span class="o">=</span> <span 
class="n">connection_parameters</span><span class="o">.</span><span 
class="n">get</span><span class="p">(</span><span 
class="s1">&#39;archives&#39;</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">password_file</span> <span class="o">=</span> <span 
class="n">connection_parameters</span><span class="o">.</span><span 
class="n">get</span><span class="p">(</span><span 
class="s1">&#39;password_file&#39;</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">hcatalog_database</span> <span class="o">=</span> <span 
class="n">hcatalog_database</span>
+        <span class="bp">self</span><span class="o">.</span><span 
class="n">hcatalog_table</span> <span class="o">=</span> <span 
class="n">hcatalog_table</span>
+        <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">&quot;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">&quot;</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="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>
+
+    <span class="k">def</span> <span class="nf">cmd_mask_password</span><span 
class="p">(</span><span class="bp">self</span><span class="p">,</span> <span 
class="n">cmd_orig</span><span class="p">):</span>
+        <span class="n">cmd</span> <span class="o">=</span> <span 
class="n">deepcopy</span><span class="p">(</span><span 
class="n">cmd_orig</span><span class="p">)</span>
+        <span class="k">try</span><span class="p">:</span>
+            <span class="n">password_index</span> <span class="o">=</span> 
<span class="n">cmd</span><span class="o">.</span><span 
class="n">index</span><span class="p">(</span><span 
class="s1">&#39;--password&#39;</span><span class="p">)</span>
+            <span class="n">cmd</span><span class="p">[</span><span 
class="n">password_index</span> <span class="o">+</span> <span 
class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span 
class="s1">&#39;MASKED&#39;</span>
+        <span class="k">except</span> <span class="ne">ValueError</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">debug</span><span 
class="p">(</span><span class="s2">&quot;No password in sqoop 
cmd&quot;</span><span class="p">)</span>
+        <span class="k">return</span> <span class="n">cmd</span>
+
+<div class="viewcode-block" id="SqoopHook.Popen"><a class="viewcode-back" 
href="../../../../code.html#airflow.contrib.hooks.sqoop_hook.SqoopHook.Popen">[docs]</a>
    <span class="k">def</span> <span class="nf">Popen</span><span 
class="p">(</span><span class="bp">self</span><span class="p">,</span> <span 
class="n">cmd</span><span class="p">,</span> <span class="o">**</span><span 
class="n">kwargs</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">        Remote Popen</span>
+
+<span class="sd">        :param cmd: command to remotely execute</span>
+<span class="sd">        :param kwargs: extra arguments to Popen (see 
subprocess.Popen)</span>
+<span class="sd">        :return: handle to subprocess</span>
+<span class="sd">        &quot;&quot;&quot;</span>
+        <span class="n">masked_cmd</span> <span class="o">=</span> <span 
class="s1">&#39; &#39;</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">&quot;Executing command: </span><span 
class="si">{}</span><span class="s2">&quot;</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="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>
+
+        <span class="bp">self</span><span class="o">.</span><span 
class="n">sp</span><span class="o">.</span><span class="n">wait</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">&quot;Command exited with return code 
</span><span class="si">%s</span><span class="s2">&quot;</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">returncode</span><span class="p">)</span>
+
+        <span class="k">if</span> <span class="bp">self</span><span 
class="o">.</span><span class="n">sp</span><span class="o">.</span><span 
class="n">returncode</span><span class="p">:</span>
+            <span class="k">raise</span> <span 
class="n">AirflowException</span><span class="p">(</span><span 
class="s2">&quot;Sqoop command failed: </span><span class="si">{}</span><span 
class="s2">&quot;</span><span class="o">.</span><span 
class="n">format</span><span class="p">(</span><span 
class="n">masked_cmd</span><span class="p">))</span></div>
+
+    <span class="k">def</span> <span class="nf">_prepare_command</span><span 
class="p">(</span><span class="bp">self</span><span class="p">,</span> <span 
class="n">export</span><span class="o">=</span><span 
class="kc">False</span><span class="p">):</span>
+        <span class="n">sqoop_cmd_type</span> <span class="o">=</span> <span 
class="s2">&quot;export&quot;</span> <span class="k">if</span> <span 
class="n">export</span> <span class="k">else</span> <span 
class="s2">&quot;import&quot;</span>
+        <span class="n">connection_cmd</span> <span class="o">=</span> <span 
class="p">[</span><span class="s2">&quot;sqoop&quot;</span><span 
class="p">,</span> <span class="n">sqoop_cmd_type</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="bp">self</span><span class="o">.</span><span 
class="n">properties</span><span class="o">.</span><span 
class="n">items</span><span class="p">():</span>
+            <span class="n">connection_cmd</span> <span class="o">+=</span> 
<span class="p">[</span><span class="s2">&quot;-D&quot;</span><span 
class="p">,</span> <span class="s2">&quot;</span><span 
class="si">{}</span><span class="s2">=</span><span class="si">{}</span><span 
class="s2">&quot;</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="n">value</span><span class="p">)]</span>
+
+        <span class="k">if</span> <span class="bp">self</span><span 
class="o">.</span><span class="n">namenode</span><span class="p">:</span>
+            <span class="n">connection_cmd</span> <span class="o">+=</span> 
<span class="p">[</span><span class="s2">&quot;-fs&quot;</span><span 
class="p">,</span> <span class="bp">self</span><span class="o">.</span><span 
class="n">namenode</span><span class="p">]</span>
+        <span class="k">if</span> <span class="bp">self</span><span 
class="o">.</span><span class="n">job_tracker</span><span class="p">:</span>
+            <span class="n">connection_cmd</span> <span class="o">+=</span> 
<span class="p">[</span><span class="s2">&quot;-jt&quot;</span><span 
class="p">,</span> <span class="bp">self</span><span class="o">.</span><span 
class="n">job_tracker</span><span class="p">]</span>
+        <span class="k">if</span> <span class="bp">self</span><span 
class="o">.</span><span class="n">libjars</span><span class="p">:</span>
+            <span class="n">connection_cmd</span> <span class="o">+=</span> 
<span class="p">[</span><span class="s2">&quot;-libjars&quot;</span><span 
class="p">,</span> <span class="bp">self</span><span class="o">.</span><span 
class="n">libjars</span><span class="p">]</span>
+        <span class="k">if</span> <span class="bp">self</span><span 
class="o">.</span><span class="n">files</span><span class="p">:</span>
+            <span class="n">connection_cmd</span> <span class="o">+=</span> 
<span class="p">[</span><span class="s2">&quot;-files&quot;</span><span 
class="p">,</span> <span class="bp">self</span><span class="o">.</span><span 
class="n">files</span><span class="p">]</span>
+        <span class="k">if</span> <span class="bp">self</span><span 
class="o">.</span><span class="n">archives</span><span class="p">:</span>
+            <span class="n">connection_cmd</span> <span class="o">+=</span> 
<span class="p">[</span><span class="s2">&quot;-archives&quot;</span><span 
class="p">,</span> <span class="bp">self</span><span class="o">.</span><span 
class="n">archives</span><span class="p">]</span>
+        <span class="k">if</span> <span class="bp">self</span><span 
class="o">.</span><span class="n">conn</span><span class="o">.</span><span 
class="n">login</span><span class="p">:</span>
+            <span class="n">connection_cmd</span> <span class="o">+=</span> 
<span class="p">[</span><span class="s2">&quot;--username&quot;</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">login</span><span 
class="p">]</span>
+        <span class="k">if</span> <span class="bp">self</span><span 
class="o">.</span><span class="n">conn</span><span class="o">.</span><span 
class="n">password</span><span class="p">:</span>
+            <span class="n">connection_cmd</span> <span class="o">+=</span> 
<span class="p">[</span><span class="s2">&quot;--password&quot;</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">password</span><span class="p">]</span>
+        <span class="k">if</span> <span class="bp">self</span><span 
class="o">.</span><span class="n">password_file</span><span class="p">:</span>
+            <span class="n">connection_cmd</span> <span class="o">+=</span> 
<span class="p">[</span><span 
class="s2">&quot;--password-file&quot;</span><span class="p">,</span> <span 
class="bp">self</span><span class="o">.</span><span 
class="n">password_file</span><span class="p">]</span>
+        <span class="k">if</span> <span class="bp">self</span><span 
class="o">.</span><span class="n">verbose</span><span class="p">:</span>
+            <span class="n">connection_cmd</span> <span class="o">+=</span> 
<span class="p">[</span><span class="s2">&quot;--verbose&quot;</span><span 
class="p">]</span>
+        <span class="k">if</span> <span class="bp">self</span><span 
class="o">.</span><span class="n">num_mappers</span><span class="p">:</span>
+            <span class="n">connection_cmd</span> <span class="o">+=</span> 
<span class="p">[</span><span class="s2">&quot;--num-mappers&quot;</span><span 
class="p">,</span> <span class="nb">str</span><span class="p">(</span><span 
class="bp">self</span><span class="o">.</span><span 
class="n">num_mappers</span><span class="p">)]</span>
+        <span class="k">if</span> <span class="bp">self</span><span 
class="o">.</span><span class="n">hcatalog_database</span><span 
class="p">:</span>
+            <span class="n">connection_cmd</span> <span class="o">+=</span> 
<span class="p">[</span><span 
class="s2">&quot;--hcatalog-database&quot;</span><span class="p">,</span> <span 
class="bp">self</span><span class="o">.</span><span 
class="n">hcatalog_database</span><span class="p">]</span>
+        <span class="k">if</span> <span class="bp">self</span><span 
class="o">.</span><span class="n">hcatalog_table</span><span class="p">:</span>
+            <span class="n">connection_cmd</span> <span class="o">+=</span> 
<span class="p">[</span><span 
class="s2">&quot;--hcatalog-table&quot;</span><span class="p">,</span> <span 
class="bp">self</span><span class="o">.</span><span 
class="n">hcatalog_table</span><span class="p">]</span>
+
+        <span class="n">connection_cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--connect&quot;</span><span 
class="p">,</span> <span class="s2">&quot;</span><span 
class="si">{}</span><span class="s2">:</span><span class="si">{}</span><span 
class="s2">/</span><span class="si">{}</span><span 
class="s2">&quot;</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="k">return</span> <span class="n">connection_cmd</span>
+
+    <span class="nd">@staticmethod</span>
+    <span class="k">def</span> <span 
class="nf">_get_export_format_argument</span><span class="p">(</span><span 
class="n">file_type</span><span class="o">=</span><span 
class="s1">&#39;text&#39;</span><span class="p">):</span>
+        <span class="k">if</span> <span class="n">file_type</span> <span 
class="o">==</span> <span class="s2">&quot;avro&quot;</span><span 
class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span 
class="s2">&quot;--as-avrodatafile&quot;</span><span class="p">]</span>
+        <span class="k">elif</span> <span class="n">file_type</span> <span 
class="o">==</span> <span class="s2">&quot;sequence&quot;</span><span 
class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span 
class="s2">&quot;--as-sequencefile&quot;</span><span class="p">]</span>
+        <span class="k">elif</span> <span class="n">file_type</span> <span 
class="o">==</span> <span class="s2">&quot;parquet&quot;</span><span 
class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span 
class="s2">&quot;--as-parquetfile&quot;</span><span class="p">]</span>
+        <span class="k">elif</span> <span class="n">file_type</span> <span 
class="o">==</span> <span class="s2">&quot;text&quot;</span><span 
class="p">:</span>
+            <span class="k">return</span> <span class="p">[</span><span 
class="s2">&quot;--as-textfile&quot;</span><span class="p">]</span>
+        <span class="k">else</span><span class="p">:</span>
+            <span class="k">raise</span> <span 
class="n">AirflowException</span><span class="p">(</span><span 
class="s2">&quot;Argument file_type should be &#39;avro&#39;, &quot;</span>
+                                   <span class="s2">&quot;&#39;sequence&#39;, 
&#39;parquet&#39; or &#39;text&#39;.&quot;</span><span class="p">)</span>
+
+    <span class="k">def</span> <span class="nf">_import_cmd</span><span 
class="p">(</span><span class="bp">self</span><span class="p">,</span> <span 
class="n">target_dir</span><span class="p">,</span> <span 
class="n">append</span><span class="p">,</span> <span 
class="n">file_type</span><span class="p">,</span> <span 
class="n">split_by</span><span class="p">,</span> <span 
class="n">direct</span><span class="p">,</span>
+                    <span class="n">driver</span><span class="p">,</span> 
<span class="n">extra_import_options</span><span class="p">):</span>
+
+        <span class="n">cmd</span> <span class="o">=</span> <span 
class="bp">self</span><span class="o">.</span><span 
class="n">_prepare_command</span><span class="p">(</span><span 
class="n">export</span><span class="o">=</span><span 
class="kc">False</span><span class="p">)</span>
+
+        <span class="k">if</span> <span class="n">target_dir</span><span 
class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--target-dir&quot;</span><span 
class="p">,</span> <span class="n">target_dir</span><span class="p">]</span>
+
+        <span class="k">if</span> <span class="n">append</span><span 
class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--append&quot;</span><span 
class="p">]</span>
+
+        <span class="n">cmd</span> <span class="o">+=</span> <span 
class="bp">self</span><span class="o">.</span><span 
class="n">_get_export_format_argument</span><span class="p">(</span><span 
class="n">file_type</span><span class="p">)</span>
+
+        <span class="k">if</span> <span class="n">split_by</span><span 
class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--split-by&quot;</span><span 
class="p">,</span> <span class="n">split_by</span><span class="p">]</span>
+
+        <span class="k">if</span> <span class="n">direct</span><span 
class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--direct&quot;</span><span 
class="p">]</span>
+
+        <span class="k">if</span> <span class="n">driver</span><span 
class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--driver&quot;</span><span 
class="p">,</span> <span class="n">driver</span><span class="p">]</span>
+
+        <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">&#39;--</span><span 
class="si">{}</span><span class="s1">&#39;</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">return</span> <span class="n">cmd</span>
+
+<div class="viewcode-block" id="SqoopHook.import_table"><a 
class="viewcode-back" 
href="../../../../code.html#airflow.contrib.hooks.sqoop_hook.SqoopHook.import_table">[docs]</a>
    <span class="k">def</span> <span class="nf">import_table</span><span 
class="p">(</span><span class="bp">self</span><span class="p">,</span> <span 
class="n">table</span><span class="p">,</span> <span 
class="n">target_dir</span><span class="o">=</span><span 
class="kc">None</span><span class="p">,</span> <span 
class="n">append</span><span class="o">=</span><span 
class="kc">False</span><span class="p">,</span> <span 
class="n">file_type</span><span class="o">=</span><span 
class="s2">&quot;text&quot;</span><span class="p">,</span>
+                     <span class="n">columns</span><span 
class="o">=</span><span class="kc">None</span><span class="p">,</span> <span 
class="n">split_by</span><span class="o">=</span><span 
class="kc">None</span><span class="p">,</span> <span 
class="n">where</span><span class="o">=</span><span class="kc">None</span><span 
class="p">,</span> <span class="n">direct</span><span class="o">=</span><span 
class="kc">False</span><span class="p">,</span>
+                     <span class="n">driver</span><span 
class="o">=</span><span class="kc">None</span><span class="p">,</span> <span 
class="n">extra_import_options</span><span class="o">=</span><span 
class="kc">None</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">        Imports table from remote location to target dir. 
Arguments are</span>
+<span class="sd">        copies of direct sqoop command line arguments</span>
+<span class="sd">        :param table: Table to read</span>
+<span class="sd">        :param target_dir: HDFS destination dir</span>
+<span class="sd">        :param append: Append data to an existing dataset in 
HDFS</span>
+<span class="sd">        :param file_type: &quot;avro&quot;, 
&quot;sequence&quot;, &quot;text&quot; or &quot;parquet&quot;.</span>
+<span class="sd">            Imports data to into the specified format. 
Defaults to text.</span>
+<span class="sd">        :param columns: &lt;col,col,col…&gt; Columns to 
import from table</span>
+<span class="sd">        :param split_by: Column of the table used to split 
work units</span>
+<span class="sd">        :param where: WHERE clause to use during import</span>
+<span class="sd">        :param direct: Use direct connector if exists for the 
database</span>
+<span class="sd">        :param driver: Manually specify JDBC driver class to 
use</span>
+<span class="sd">        :param extra_import_options: Extra import options to 
pass as dict.</span>
+<span class="sd">            If a key doesn&#39;t have a value, just pass an 
empty string to it.</span>
+<span class="sd">            Don&#39;t include prefix of -- for sqoop 
options.</span>
+<span class="sd">        &quot;&quot;&quot;</span>
+        <span class="n">cmd</span> <span class="o">=</span> <span 
class="bp">self</span><span class="o">.</span><span 
class="n">_import_cmd</span><span class="p">(</span><span 
class="n">target_dir</span><span class="p">,</span> <span 
class="n">append</span><span class="p">,</span> <span 
class="n">file_type</span><span class="p">,</span> <span 
class="n">split_by</span><span class="p">,</span> <span 
class="n">direct</span><span class="p">,</span>
+                               <span class="n">driver</span><span 
class="p">,</span> <span class="n">extra_import_options</span><span 
class="p">)</span>
+
+        <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--table&quot;</span><span 
class="p">,</span> <span class="n">table</span><span class="p">]</span>
+
+        <span class="k">if</span> <span class="n">columns</span><span 
class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--columns&quot;</span><span 
class="p">,</span> <span class="n">columns</span><span class="p">]</span>
+        <span class="k">if</span> <span class="n">where</span><span 
class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--where&quot;</span><span 
class="p">,</span> <span class="n">where</span><span class="p">]</span>
+
+        <span class="bp">self</span><span class="o">.</span><span 
class="n">Popen</span><span class="p">(</span><span class="n">cmd</span><span 
class="p">)</span></div>
+
+<div class="viewcode-block" id="SqoopHook.import_query"><a 
class="viewcode-back" 
href="../../../../code.html#airflow.contrib.hooks.sqoop_hook.SqoopHook.import_query">[docs]</a>
    <span class="k">def</span> <span class="nf">import_query</span><span 
class="p">(</span><span class="bp">self</span><span class="p">,</span> <span 
class="n">query</span><span class="p">,</span> <span 
class="n">target_dir</span><span class="p">,</span> <span 
class="n">append</span><span class="o">=</span><span 
class="kc">False</span><span class="p">,</span> <span 
class="n">file_type</span><span class="o">=</span><span 
class="s2">&quot;text&quot;</span><span class="p">,</span>
+                     <span class="n">split_by</span><span 
class="o">=</span><span class="kc">None</span><span class="p">,</span> <span 
class="n">direct</span><span class="o">=</span><span 
class="kc">None</span><span class="p">,</span> <span 
class="n">driver</span><span class="o">=</span><span 
class="kc">None</span><span class="p">,</span> <span 
class="n">extra_import_options</span><span class="o">=</span><span 
class="kc">None</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">        Imports a specific query from the rdbms to hdfs</span>
+<span class="sd">        :param query: Free format query to run</span>
+<span class="sd">        :param target_dir: HDFS destination dir</span>
+<span class="sd">        :param append: Append data to an existing dataset in 
HDFS</span>
+<span class="sd">        :param file_type: &quot;avro&quot;, 
&quot;sequence&quot;, &quot;text&quot; or &quot;parquet&quot;</span>
+<span class="sd">            Imports data to hdfs into the specified format. 
Defaults to text.</span>
+<span class="sd">        :param split_by: Column of the table used to split 
work units</span>
+<span class="sd">        :param direct: Use direct import fast path</span>
+<span class="sd">        :param driver: Manually specify JDBC driver class to 
use</span>
+<span class="sd">        :param extra_import_options: Extra import options to 
pass as dict.</span>
+<span class="sd">            If a key doesn&#39;t have a value, just pass an 
empty string to it.</span>
+<span class="sd">            Don&#39;t include prefix of -- for sqoop 
options.</span>
+<span class="sd">        &quot;&quot;&quot;</span>
+        <span class="n">cmd</span> <span class="o">=</span> <span 
class="bp">self</span><span class="o">.</span><span 
class="n">_import_cmd</span><span class="p">(</span><span 
class="n">target_dir</span><span class="p">,</span> <span 
class="n">append</span><span class="p">,</span> <span 
class="n">file_type</span><span class="p">,</span> <span 
class="n">split_by</span><span class="p">,</span> <span 
class="n">direct</span><span class="p">,</span>
+                               <span class="n">driver</span><span 
class="p">,</span> <span class="n">extra_import_options</span><span 
class="p">)</span>
+        <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--query&quot;</span><span 
class="p">,</span> <span class="n">query</span><span class="p">]</span>
+
+        <span class="bp">self</span><span class="o">.</span><span 
class="n">Popen</span><span class="p">(</span><span class="n">cmd</span><span 
class="p">)</span></div>
+
+    <span class="k">def</span> <span class="nf">_export_cmd</span><span 
class="p">(</span><span class="bp">self</span><span class="p">,</span> <span 
class="n">table</span><span class="p">,</span> <span 
class="n">export_dir</span><span class="p">,</span> <span 
class="n">input_null_string</span><span class="p">,</span>
+                    <span class="n">input_null_non_string</span><span 
class="p">,</span> <span class="n">staging_table</span><span class="p">,</span> 
<span class="n">clear_staging_table</span><span class="p">,</span>
+                    <span class="n">enclosed_by</span><span class="p">,</span> 
<span class="n">escaped_by</span><span class="p">,</span> <span 
class="n">input_fields_terminated_by</span><span class="p">,</span>
+                    <span class="n">input_lines_terminated_by</span><span 
class="p">,</span> <span class="n">input_optionally_enclosed_by</span><span 
class="p">,</span>
+                    <span class="n">batch</span><span class="p">,</span> <span 
class="n">relaxed_isolation</span><span class="p">,</span> <span 
class="n">extra_export_options</span><span class="p">):</span>
+
+        <span class="n">cmd</span> <span class="o">=</span> <span 
class="bp">self</span><span class="o">.</span><span 
class="n">_prepare_command</span><span class="p">(</span><span 
class="n">export</span><span class="o">=</span><span 
class="kc">True</span><span class="p">)</span>
+
+        <span class="k">if</span> <span 
class="n">input_null_string</span><span class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--input-null-string&quot;</span><span 
class="p">,</span> <span class="n">input_null_string</span><span 
class="p">]</span>
+
+        <span class="k">if</span> <span 
class="n">input_null_non_string</span><span class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span 
class="s2">&quot;--input-null-non-string&quot;</span><span class="p">,</span> 
<span class="n">input_null_non_string</span><span class="p">]</span>
+
+        <span class="k">if</span> <span class="n">staging_table</span><span 
class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--staging-table&quot;</span><span 
class="p">,</span> <span class="n">staging_table</span><span class="p">]</span>
+
+        <span class="k">if</span> <span 
class="n">clear_staging_table</span><span class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span 
class="s2">&quot;--clear-staging-table&quot;</span><span class="p">]</span>
+
+        <span class="k">if</span> <span class="n">enclosed_by</span><span 
class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--enclosed-by&quot;</span><span 
class="p">,</span> <span class="n">enclosed_by</span><span class="p">]</span>
+
+        <span class="k">if</span> <span class="n">escaped_by</span><span 
class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--escaped-by&quot;</span><span 
class="p">,</span> <span class="n">escaped_by</span><span class="p">]</span>
+
+        <span class="k">if</span> <span 
class="n">input_fields_terminated_by</span><span class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span 
class="s2">&quot;--input-fields-terminated-by&quot;</span><span 
class="p">,</span> <span class="n">input_fields_terminated_by</span><span 
class="p">]</span>
+
+        <span class="k">if</span> <span 
class="n">input_lines_terminated_by</span><span class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span 
class="s2">&quot;--input-lines-terminated-by&quot;</span><span 
class="p">,</span> <span class="n">input_lines_terminated_by</span><span 
class="p">]</span>
+
+        <span class="k">if</span> <span 
class="n">input_optionally_enclosed_by</span><span class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span 
class="s2">&quot;--input-optionally-enclosed-by&quot;</span><span 
class="p">,</span>
+                    <span class="n">input_optionally_enclosed_by</span><span 
class="p">]</span>
+
+        <span class="k">if</span> <span class="n">batch</span><span 
class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--batch&quot;</span><span 
class="p">]</span>
+
+        <span class="k">if</span> <span 
class="n">relaxed_isolation</span><span class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--relaxed-isolation&quot;</span><span 
class="p">]</span>
+
+        <span class="k">if</span> <span class="n">export_dir</span><span 
class="p">:</span>
+            <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--export-dir&quot;</span><span 
class="p">,</span> <span class="n">export_dir</span><span class="p">]</span>
+
+        <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">&#39;--</span><span 
class="si">{}</span><span class="s1">&#39;</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="c1"># The required option</span>
+        <span class="n">cmd</span> <span class="o">+=</span> <span 
class="p">[</span><span class="s2">&quot;--table&quot;</span><span 
class="p">,</span> <span class="n">table</span><span class="p">]</span>
+
+        <span class="k">return</span> <span class="n">cmd</span>
+
+<div class="viewcode-block" id="SqoopHook.export_table"><a 
class="viewcode-back" 
href="../../../../code.html#airflow.contrib.hooks.sqoop_hook.SqoopHook.export_table">[docs]</a>
    <span class="k">def</span> <span class="nf">export_table</span><span 
class="p">(</span><span class="bp">self</span><span class="p">,</span> <span 
class="n">table</span><span class="p">,</span> <span 
class="n">export_dir</span><span class="p">,</span> <span 
class="n">input_null_string</span><span class="p">,</span>
+                     <span class="n">input_null_non_string</span><span 
class="p">,</span> <span class="n">staging_table</span><span class="p">,</span>
+                     <span class="n">clear_staging_table</span><span 
class="p">,</span> <span class="n">enclosed_by</span><span class="p">,</span>
+                     <span class="n">escaped_by</span><span class="p">,</span> 
<span class="n">input_fields_terminated_by</span><span class="p">,</span>
+                     <span class="n">input_lines_terminated_by</span><span 
class="p">,</span>
+                     <span class="n">input_optionally_enclosed_by</span><span 
class="p">,</span> <span class="n">batch</span><span class="p">,</span>
+                     <span class="n">relaxed_isolation</span><span 
class="p">,</span> <span class="n">extra_export_options</span><span 
class="o">=</span><span class="kc">None</span><span class="p">):</span>
+        <span class="sd">&quot;&quot;&quot;</span>
+<span class="sd">        Exports Hive table to remote location. Arguments are 
copies of direct</span>
+<span class="sd">        sqoop command line Arguments</span>
+<span class="sd">        :param table: Table remote destination</span>
+<span class="sd">        :param export_dir: Hive table to export</span>
+<span class="sd">        :param input_null_string: The string to be 
interpreted as null for</span>
+<span class="sd">            string columns</span>
+<span class="sd">        :param input_null_non_string: The string to be 
interpreted as null</span>
+<span class="sd">            for non-string columns</span>
+<span class="sd">        :param staging_table: The table in which data will be 
staged before</span>
+<span class="sd">            being inserted into the destination table</span>
+<span class="sd">        :param clear_staging_table: Indicate that any data 
present in the</span>
+<span class="sd">            staging table can be deleted</span>
+<span class="sd">        :param enclosed_by: Sets a required field enclosing 
character</span>
+<span class="sd">        :param escaped_by: Sets the escape character</span>
+<span class="sd">        :param input_fields_terminated_by: Sets the field 
separator character</span>
+<span class="sd">        :param input_lines_terminated_by: Sets the 
end-of-line character</span>
+<span class="sd">        :param input_optionally_enclosed_by: Sets a field 
enclosing character</span>
+<span class="sd">        :param batch: Use batch mode for underlying statement 
execution</span>
+<span class="sd">        :param relaxed_isolation: Transaction isolation to 
read uncommitted</span>
+<span class="sd">            for the mappers</span>
+<span class="sd">        :param extra_export_options: Extra export options to 
pass as dict.</span>
+<span class="sd">            If a key doesn&#39;t have a value, just pass an 
empty string to it.</span>
+<span class="sd">            Don&#39;t include prefix of -- for sqoop 
options.</span>
+<span class="sd">        &quot;&quot;&quot;</span>
+        <span class="n">cmd</span> <span class="o">=</span> <span 
class="bp">self</span><span class="o">.</span><span 
class="n">_export_cmd</span><span class="p">(</span><span 
class="n">table</span><span class="p">,</span> <span 
class="n">export_dir</span><span class="p">,</span> <span 
class="n">input_null_string</span><span class="p">,</span>
+                               <span 
class="n">input_null_non_string</span><span class="p">,</span> <span 
class="n">staging_table</span><span class="p">,</span>
+                               <span class="n">clear_staging_table</span><span 
class="p">,</span> <span class="n">enclosed_by</span><span class="p">,</span> 
<span class="n">escaped_by</span><span class="p">,</span>
+                               <span 
class="n">input_fields_terminated_by</span><span class="p">,</span>
+                               <span 
class="n">input_lines_terminated_by</span><span class="p">,</span>
+                               <span 
class="n">input_optionally_enclosed_by</span><span class="p">,</span> <span 
class="n">batch</span><span class="p">,</span>
+                               <span class="n">relaxed_isolation</span><span 
class="p">,</span> <span class="n">extra_export_options</span><span 
class="p">)</span>
+
+        <span class="bp">self</span><span class="o">.</span><span 
class="n">Popen</span><span class="p">(</span><span class="n">cmd</span><span 
class="p">)</span></div></div>
+</pre></div>
+
+           </div>
+           <div class="articleComments">
+            
+           </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/snide/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:'',
+            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.StickyNav.enable();
+      });
+  </script>
+   
+
+</body>
+</html>
\ No newline at end of file

Reply via email to