I am trying to export data using BTEQ and import it using FastLoad. We are using Teradata version 14.00.07.12 using a windows 7 client. I read that BTEQs default export mode is FastLoad, yet I've made multiple attempts to load the data exported from BTEQ using FastLoad w/o success . Every time I attempt a load, I get a message like "Bad file or data definition. The length of: definedvar in row 1 was greate than defined. Defined: 17, Received: 18519". My define statement looks ok, and teh exported file consists of 5 records, the first 2 bytes give the length, followed by the data column, a lf/cr, then the next column length, which looks like it's probably correct.
I could not upload the actual file, but here is a look at it in a Hex editor. To keep it simple, there is only 5 rows, one column, 17 characters long.
Is the column defined as CHAR(17), in which case you need to specify that in the DEFINE as well?
FastLoad format starts with a record length and if the field was VARCHAR then there would be a field length after that, followed by the data value.
Wow, good catch Fred! It was char 17 in the DB, but I read in one of my sources for FastLoad scripts that "FastLoad DEFINE statement allows only VARCHAR format". Either that is incorrect, or I misunderstood what was meant. I changed the define to char and it worked! Thanks, Fred, I was really spinning my wheels on this one, and thanks for the info on FastLoad format.
To clarify the restriction:
DEFINE must describe the input fields (not necessarily the same as the target table columns). And if the file format is specified as VARTEXT (delimited text), then the I/O module parses the input record and passes the fields to FastLoad as VARCHARs.