Bulk loading data to Oracle databases

The following points may help you to configure for bulk loading from IBM® SPSS® Modeler to an Oracle database using the External Loader option in the DB Export Advanced Options dialog box.

Ensure that the Oracle sqlldr utility is installed

The script oracle_loader.py invokes the Oracle utility sqlldr. Note that sqlldr is not automatically included in Oracle Client. Ensure that sqlldr is installed on the server on which oracle_loader.py is to be executed.

Specify the database SID or service name

If you are exporting data to a non-local Oracle server or your local Oracle server has multiple databases, you will need to specify the following in the Extra loader options field in the DB Export Advanced Options dialog box to pass in the SID or service name:

-database <SID>

Editing the configuration section in oracle_loader.py

On UNIX (and optionally, on Windows) systems, edit the configuration section at the start of the oracle_loader.py script. Here, values for ORACLE_SID, NLS_LANG, TNS_ADMIN and ORACLE_HOME environment variables can be specified if appropriate, as well as the full path of the sqlldr utility.

Date, Time and Timestamp format data

In the stream properties, you should normally set the date format to YYYY-MM-DD and the time format to HH:MM:SS.

If you need to use different date and time formats from the above, consult your Oracle documentation and edit the oracle_loader.py script file.

Non-ASCII character data encoding

If you are bulk loading data that is not in ASCII format, you should ensure that the environment variable NLS_LANG is correctly set up on your system. This is read by the Oracle loader utility sqlldr. For example, the correct value for NLS_LANG for Shift-JIS on Windows is Japanese_Japan.JA16SJIS. For more details on NLS_LANG, check your Oracle documentation.

Blank strings

Blank strings are exported to the database as NULL values.