Insert into oracle table from CSV using python
<p>I am reading a csv file with 5 columns and push to oracle table</p>

<p><a href="http://i.stack.imgur.com/kkoNu.jpg" rel="nofollow">CSV file Structure</a></p>

<p>I know there are lots of resources on this .. But even then I am unable to find a solution for my problem </p>

<p>Code to read the CSV to python : </p>

<pre><code> import csv
 reader = csv.reader(open("sample.csv","r"))
 lines=[]
 for line in reader:
      lines.append(line)
  print lines 
</code></pre>

<p>Output :</p>

<blockquote>
  <p>[['Firstname', 'LastName', 'email', 'Course_name', 'status'],
  ['Kristina', 'Bohn', 'abc@123.com', 'Guide to
  Capnography in the Management of the Critically Ill Patient (CE)',
  'Registered'], ['Peggy', 'Lutz', 'gef@123.com',
  'Guide to Monitoring EtCO2 During Opioid Delivery (CE)', 'In
  Progress']]</p>
</blockquote>

<p>Code to push the list to Oracle table :</p>

<pre><code>import cx_Oracle
con = cx_Oracle.connect('username/password@tamans*****vd/Servicename')
ver=con.version.split(".")
print(ver)
cur=con.cursor()
cur.execute("INSERT INTO TEST_CSODUPLOAD ('FIRSTNAME','LASTNAME','EMAIL','COURSE_NAME','STATUS') VALUES(:1,:2,:3,:4,:5)",lines)
con.commit ()
cur.close()
</code></pre>

<p>I am getting the error :</p>

<p><strong>DatabaseError: ORA-01484: arrays can only be bound to PL/SQL statements</strong></p>

<p>Please help me solve the issue Thanks in advance </p>