The Concept of Mapping Data#

SQL Loader must be told where and in what format the data to be loaded is and how to map the data to Oracle format. Definitions in the control file will include:
  • specifications for loading logical records into tables
  • field condition specifications
  • column and field specifications
  • data field position specifications
  • data type specifications
  • bind array size specifications
  • specifications for setting columns to null or zero
  • specifications for loading all-blank fields
  • specifications for trimming blanks and tabs
  • specifications to preserve white space
  • specifications for applying SQL operators to fields

By default, SQL Loader removes trailing spaces from CHAR data before passing it to the database. All columns within the interface tables are defined as a varying length field with a maximum length. The data for these columns is left justified as well, but the length remains the same as what was entered into the comma-delimited data file.

The name of the field within the control file tells SQL*Loader what column to insert the data into. Because the data fields have all been specified by name in the control file, SQL*Loader knows to insert the data into each column of the target database table.

It will be useful to keep the following points in mind:

  • The name of the data field corresponds to the name of the table column into which the data is loaded.
  • The data type of the field tells SQL*Loader how to read the data in the data file. It is not the same as the column data type.
  • Data is converted from the data type specified in the control file to the data type of the column in the database.


Notes #

Click to create a new notes page