Posted By

ejboy on 02/23/07


database xml csv jdbc etl scriptella

Versions (?)

Who likes this?

3 people have marked this snippet as a favorite


Load CSV data into a database

 / Published in: XML


This example demonstrates usage of Scriptella ETL Tool to load CSV data into a database table.

  1. <!DOCTYPE etl SYSTEM "">
  2. <etl>
  3. <connection id="in" driver="csv" url="data.csv" classpath="opencsv.jar"/>
  4. <connection id="out" driver="oracle" url="jdbc:oracle:thin:@localhost:1521:ORCL"
  5. classpath="ojdbc14.jar" user="scott" password="tiger"/>
  6. <!-- Copy all CSV rows to a database table -->
  7. <query connection-id="in">
  8. <!-- Empty query means select all columns -->
  9. <script connection-id="out">
  10. INSERT INTO Table_Name VALUES (?id,?priority, ?summary, ?status)
  11. </script>
  12. </query>
  13. </etl>

Report this snippet  

You need to login to post a comment.