title: How to use the DB2 LOAD utility using the python ibm_db driver
body: <p>LOAD is a DB2 utility that I would like to use to insert data into a table from a CSV file. How can I do this in Python using the <code>ibm_db</code> driver? I don't see anything in the docs <a href="https://github.com/ibmdb/python-ibmdb/wiki/APIs" rel="nofollow noreferrer">here</a></p>
  
  <p>CMD: <code>LOAD FROM xyz OF del INSERT INTO FOOBAR</code> </p>
  
  <p>Running this as standard SQL fails as expected:
  <code>
  Transaction couldn't be completed: [IBM][CLI Driver][DB2/LINUXX8664] SQL0104N  An unexpected token "LOAD FROM xyz OF del" was found following "BEGIN-OF-STATEMENT".  Expected tokens may include:  "&lt;space&gt;".  SQLSTATE=42601 SQLCODE=-104
  </code></p>
  
  <p>Using the db2 CLP directly (i.e. <code>os.system('db2 -f /path/to/script.file')</code>) is not an option as DB2 sits on a different machine that I don't have SSH access to.</p>
  
  <p><code>EDIT:</code><br>
  Using the <code>ADMIN_CMD</code> utility also doesn't work because the file being loaded cannot be put on the database server due to firewall. For now, I've switched to using <code>INSERT</code></p>