/ Published in: XML
This example demonstrates usage of Scriptella ETL Tool to load CSV data into a database table.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!DOCTYPE etl SYSTEM "http://scriptella.javaforge.com/dtd/etl.dtd"> <etl> <connection id="in" driver="csv" url="data.csv" classpath="opencsv.jar"/> <connection id="out" driver="oracle" url="jdbc:oracle:thin:@localhost:1521:ORCL" classpath="ojdbc14.jar" user="scott" password="tiger"/> <!-- Copy all CSV rows to a database table --> <query connection-id="in"> <!-- Empty query means select all columns --> <script connection-id="out"> INSERT INTO Table_Name VALUES (?id,?priority, ?summary, ?status) </script> </query> </etl>
URL: http://snippets.dzone.com/posts/show/3508