Run Sqoop with python 3 using subprocess
<p>I am trying to run Sqoop command with python</p>

<pre><code>subprocess.call(["sqoop","import","--connect", "jdbc:oracle:thin:@hostname:1521/ARSMTREP","--username", "username" ,"--password", "password","--table","ARADMIN."+line,"--as-textfile","--target-dir","/data/"+line])
</code></pre>

<p>able to execute this code but when I am trying to execute with "--fields-terminated-by"+" "+"'~'" it's giving tool import error</p>

<pre><code>process=subprocess.call(["sqoop","import","--connect", "jdbc:oracle:thin:@hostname:1521/ARSMTREP","--username", "hadoop_user" ,"--password", "password","--table","ARADMIN."+line,"--fields-terminated-by"+" "+"'~'","--as-textfile","--target-dir","/data/"+line])
</code></pre>

<blockquote>
  <p>Error parsing arguments for import</p>
</blockquote>

<p>Try:</p>

<p><code>process=subprocess.call(["sqoop","import","--connect", "jdbc:oracle:thin:@hostname:1521/ARSMTREP","--username", "hadoop_user" ,"--password", "password","--table","ARADMIN."+line,"--fields-terminated-by","'~'","--as-textfile","--target-dir","/data/"+line])</code></p>

python python-3.x sqoop apache-sqoop