Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#25 SQL*Loader control file generation

closed
nobody
None
5
2009-07-01
2009-04-20
Anonymous
No

Hello everyone,
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 ...").
-Field list.

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
control=mytable.ctl data=mydata.csv).

Requirements

JRE 1.6 or newer

Discussion

  •  
    Attachments
  • Gerd Wagner
    Gerd Wagner
    2009-07-01

    Has been applied.

     
  • Gerd Wagner
    Gerd Wagner
    2009-07-01

    • status: open --> closed