Loading a file containing a LOB
Loading large objects always requires special considerations. Here, we will create a multi-technology IKM (that is, an IKM that connects to a remote source data server) that loads CLOB
s and BLOB
s using an external table definition.
Getting ready
For this recipe, we will need to create three files on disk:
CLOB.TXT
: use notepad and writeThis is a CLOB
in this file. Save it on disk in yourc:\temp
directory.BLOB.DOC
: use a word processor program and create this file. Writethis is a BLOB
in the file and save it in yourc:\temp
directory.Use notepad and create the file
DATA.TXT
with the following record:"Sample record with CLOB and BLOB", "CLOB.TXT", "BLOB.DOC"
Save this file in your
c:\temp
directory.Create a table to load the LOBs in your database:
Create table LOB_SAMPLE( Description VARCHAR2(100), CLOB_Data CLOB, BLOB_Data BLOB );
You will have to reverse engineer the file
DATA.TXT
in a file model. Define the file with no header, use the comma as the field separator...