I have written a SQuirreL plugin to generate Oracle SQL*Loader control files for selected tables. As suggested by Robert Manning, I have transformed it into the attached patch for the Oracle plugin.
This patch modifies just two existing files:
-OraclePlugin.java: it adds a new popup menu.
-oracle.properties: literals for the name and tooltip of that menu
The rest of the code is under the net.sourceforge.squirrel_sql.plugins.oracle.sqlloader package.
To get an idea about what the plugin does, this is the old readme file contents:
This plugin allows to generate an Oracle SQL*Loader control file for tables
selected in the SQuirreL Object Tree. This action is launched via the pop-up
menu item "Generate SQL*Loader control file".
Each generated file is named after the table's name with the extension ".ctl".
The user can specify some generation settings like field separator, load
mode (append or replace), target directory, etc.
The generated control file contains:
-"LOAD DATA". The plugin does not support "CONTINUE LOAD" (it would not be
hard to implement, though).
-Table to load the data into ("INTO TABLE ...").
-Load mode ("APPEND" or "REPLACE")
-Field separator ("FIELDS TERMINATED BY ...") and string delimitator
("OPTIONALLY ENCLOSED BY ...").
Notice that the generated control file does not contain the data file name
("INFILE") nor the data. The generated files are specially well suited for
loading CSV files using the command line (e.g.: sqlldr myuser@myschema
JRE 1.6 or newer