Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
SQL Loader
With two bulk – loading method in BODS i.e. API and File, this document talks about the File Method
(i.e. using SQL Loader)
If you select the File method, Data Services writes an intermediate staging file, control file, and log files
to the local disk and invokes the Oracle SQL*Loader. This method requires more processing time than
the API method.
With the File method, direct-path is faster than conventional load, but the File method is slower than
using an API because of the need to generate a staging file, logs, and invoke Oracle's SQL*Loader.
Following are the steps that needs to be performed to run the BODS DF’s using File method
Mode: Specify the mode for loading data in the target table
Rows per commit: Specifies the transaction size in number of rows or bulk loading. If Rows per
commit is set to 1000, a commit is sent to the underlying database every 1000 rows. If you do not enter
a value, the default (1000) is used.
Maximum rejects: Enter the maximum number of error records allowed before the job is terminated.
If you do not enter a value, the default (10) is used.
SQL *Loader version: The version used to load data into the table. The version of the Oracle
SQL*Loader and the database (specified in the datastore for the target) must match.
Text delimiter: Enter the character used to delimit char or varchar columns. The default character is a
double quotation mark (“). Make sure the character you enter is not used in any of the data columns.
Field delimiter: Enter the character used to separate columns. The default character is a comma (,).
Make sure the character you enter is not used in any of the data columns. You can specify a non-
printable character by entering the ASCII equivalent, in our example we using /127
Maximum Bind Array: Enter the maximum bind array. The bind array needs to be large enough
to contain a single row. For good performance, make this large enough to hold 100 rows. If you
do not enter a value, the default Oracle Bulk Loader value is used. In the example we are using
2560000.
Use the control file: Select this check box to load data from a specific bulk loading control file and
data file. Rather than loading data from the source shown in the data flow, Data Services directs Oracle
to load data from the data file associated with the named control file.
Generate files only: Select this check box to have Data Services generate a data and control file.
Rather than loading data into the target shown in the data flow, Data Services generates a control file
and a data file that you can later load using Oracle bulk loading.
Direct Path: Select this check box to specify a direct-path load. To use direct-path load, the
version of SQL*Loader available to the Job Server executing the job must be the same as the
target database version. For example, you cannot perform a SQL*Loader Version 7.1.2 direct
path load to load into a Oracle Version 7.1.3 database. For more information, see the Oracle
server documentation.
Clean up bulk loader directory after load: Select this check box to have Data Services delete all
bulk loader-related files (control file, datafile, log file) after the load is complete. If an error
occurs during the bulk load, Data Services creates a .bad file and does not delete any files. Errors
occur when: Log file was not created or Log file contains “ORA-” or “SQL*Loader-”
Trailing nullcols: Select this check box to indicate that columns not represented in the data being
loaded should be treated as null columns. Use when a data record is not complete but the existing data
needs to be loaded. If this option is not selected, the system generates an error.
Step 3:
Step 4:
After successful execution of Job without any bad records, 3 files will get generated in directory for
each DF’s as shown in following screenshot-
STG_INV_GL_ACCT_HIER12245_1512067171_1_0.ctl
STG_INV_GL_ACCT_HIER12245_1512067171_1_0.dat
STG_INV_GL_ACCT_HIER12245_1512067171_1_0
After successful execution of Job with a bad records, one extra file (.bad) gets generated along with
above mentioned 3 files(.ctl, .dat and .log)
- .bad file contains all rejected records.
Following are the details of the tests that were done using the File Method
Test 1
Test 3
Test 4
Test 6
Test 7
Test 9
SQL Server target table do not have File (SQL Loader) Bulk Load option