title: How to Use Oracle Wallet with Sqoop Developer API
body: <p>When using Sqoop from the command line, I can use Oracle Wallet as described in <a href="https://blogs.apache.org/sqoop/entry/using_oracle_wallets_with_sqoop" rel="nofollow noreferrer">the ASF Blog</a> like:</p>
  
  <pre class="lang-sh prettyprint-override"><code>export HADOOP_OPTS= "-Doracle.net.tns_admin=$PWD/wallet -Doracle.net.wallet_location=$PWD/wallet"
  
  sqoop import -D mapred.map.child.java.opts= '-Doracle.net.tns_admin=. -Doracle.net.wallet_location=.' 
  
  -files $HOME/wallet/cwallet.sso,\
  $HOME/wallet/ewallet.p12,\
  $HOME/wallet/sqlnet.ora,\
  $HOME/wallet/tnsnames.ora \
  
  -connect ‘jdbc:oracle:thin:@w_orcl’ \
  
  &lt;&lt;rest of sqoop options&gt;&gt;
  </code></pre>
  
  <p>But how can I use the Oracle Wallet when using Sqoop's dev API, when doing something like...</p>
  
  <pre class="lang-scala prettyprint-override"><code>import com.cloudera.sqoop.SqoopOptions()
  import org.apache.sqoop.tool.ImportTool()
  
  val options = new SqoopOptions()
  
  // set the sqoop options here
  
  val importTool = new ImportTool()
  importTool.run(options)
  </code></pre>
  
  <p>...inside a Spark job that is meant to programmaticly automate multiple Sqoop jobs and SparkSQL queries?</p>