Hi,
I am looking to use scriptella to import multiple csv files into an
Oracle database, but am not sure about the file handling side. I have
the CSV to Oracle part working, but how do i pass the file name for
processing by scriptella from the command line - is it possible to do?
I am looking to run a scheduled job to pick up all the files in a
directory (*.csv) and use scriptella to load them into the database.
Can anyone point me in the right direction with this? I also need to
reference the file name passed from the command line to use in the
insert command as it needs to be stored in the database. I have this
set-up as a basic test...
<!DOCTYPE etl SYSTEM "
http://scriptella.javaforge.com/dtd/etl.dtd">
<etl>
<connection id="in" driver="csv" url="data.csv"/>
<connection id="out" url="jdbc:oracle:thin:user/
pa...@1.2.3.4:1521:DBNAME" classpath="ojdbc6.jar"/>
<query connection-id="in">
<!--Empty query means select all-->
<script connection-id="out">
INSERT INTO CSV_LOAD_TEST VALUES
( csv_load_test_seq.nextval, ?priority, ?summary, ?status,data.csv,?
id)
</script>
</query>
</etl>
Any help appreciated,
Thanks,
jp