|
|
Archives of the TeradataForum
Message Posted: Tue, 05 Mar 2002 @ 13:59:43 GMT
Subj: | | Creating a UNIX fastload |
|
From: | | Gary M. Peterson |
Hi, everyone,
I've used Honeywell Bull fastloads for years, but now that we're switching to a PC based system, I'm having trouble creating sucessfull
fastloads.
On my first attempts to use UNIX based fastload: I created the fastload datafile from a UNIX based ORACLE database. This was used in
fastloading to a 4800S UNIX Teradata. The script containing the fastload commands runs fine through the CREATE TABLE, DEFINE TABLE
portions, then fails because of unexpected data format during the INSERT. I created a simple test situation for staters. E.G. The script
whcih I run as fastload
LOGON mmm,nnn;
DATABASE TEST;
DROP TABLE MINE_TBL;
DROP TABLE ERMINEC1;
DROP TABLE ERMINEC2;
set RECORD unformatted;
CREATE TABLE MINE_TBL
(
MINE_ID CHAR(7) NOT NULL,
CURR_OWNR CHAR(7),
CASE_NAME CHAR(25),
MINE_IND CHAR(1)
)
UNIQUE PRIMARY INDEX (MINE_ID)
;
BEGIN LOADING MINE_TBL ERRORFILES ERMINEC1,ERMINEC2 ;
DEFINE
MINE_ID (CHAR(7)),
CURR_OWNR (CHAR(7)),
CASE_NAME (CHAR(25)),
MINE_IND (CHAR(1))
FILE =vcondata;
SHOW;
INSERT INTO MINE_TBL(MINE_ID,CURR_OWNR,CASE_NAME,MINE_IND)
VALUES (:MINE_ID,
:CURR_OWNR,
:CASE_NAME,
:MINE_IND
);
LOGOFF;
END LOADING;
LOGOFF;
Following is vcondata (one line for staters):
Depending on the way I change the set record statement and the way I format the data (with quotes, delimiters, varchar vs. char, etc, the
error statement varies, but it has one thing in common. It doesn't read the data record correctly as defined by the define statement.
Any suggestions on how to get rolling?
Gary Peterson
MSHA IRC
| |