Bulk loader programming

The Database export node includes options for bulk loading on the Advanced Options dialog box. Bulk loader programs can be used to load data from a text file into a database.

The option Use bulk loading - via external loader configures IBM® SPSS® Modeler to do three things:

  • Create any required database tables.
  • Export the data to a text file.
  • Invoke a bulk loader program to load the data from this file into the database table.

Typically the bulk loader program is not the database load utility itself (for example, Oracle's sqlldr utility) but a small script or program which forms the correct arguments, creates any database-specific auxiliary files (such as a control file) and then invokes the database load utility. The information in the following sections will help you edit an existing bulk loader.

Alternatively you can write your own program for bulk loading. See the topic Developing bulk loader programs for more information. Note that this is not covered under a standard Technical Support agreement, and you should contact an IBM Services representative for assistance.

Scripts for bulk loading

IBM SPSS Modeler ships with a number of bulk loader programs for different databases that are implemented using Python scripts. When you run a stream containing a Database export node with the Via external loader option selected, IBM SPSS Modeler creates the database table (if required) via ODBC, exports the data to a temporary file on the host running IBM SPSS Modeler Server, then invokes the bulk load script. This script in turn executes utilities provided by the DBMS vendor to upload data from the temporary files to the database.

Notes:
  • The IBM SPSS Modeler installation does not include a Python runtime interpreter, so a separate installation of Python is required. See the topic Database export advanced options for more information.
  • Scripts are provided (in the \scripts folder of the IBM SPSS Modeler installation directory) for the databases listed in the following table.
  • Currently, the Bulk loader scripts provided by IBM SPSS Modeler don't support LDAP.
Table 1. Bulk loader scripts provided
Database Script name Further information
IBM Db2 db2_loader.py See the topic Bulk loading data to IBM Db2 databases for more information.
IBM Netezza netezza_loader.py See the topic Bulk loading data to IBM Netezza databases for more information.
Oracle oracle_loader.py See the topic Bulk loading data to Oracle databases for more information.
SQL Server mssql_loader.py See the topic Bulk loading data to SQL Server databases for more information.
Teradata teradata_loader.py See the topic Bulk loading data to Teradata databases for more information.