Home » excel » How to import data into teradata tables from an excel file using BTEQ import?

How to import data into teradata tables from an excel file using BTEQ import?

Posted by: admin May 14, 2020 Leave a comment


Im trying to import data into tables from a file using BTEQ import.

im facing weird errors while doing this


if im using text file as input data file with ‘,’ as delimiter as filed seperator im getting the error as below:

*** Failure 2673 The source parcel length does not match data that was defined.


if im using EXCEL file as input data file im getting the error as below:

* Growing Buffer to 53200
Error: Import data size does not agree with byte length.
The cause may be:
2) incorrect incoming data
3) import file has reached end-of-file.
*** Warning: Out of data.

please help me out by giving the syntax for BTEQ import using txt file as input data file and also the syntax if we use EXCEL file as the input data file

Also is there any specific format for the input data file for correct reading of data from it.
if so please give me the info about that.

Thanks in advance:)


sorry for not posting the script in first.
Im new to teradata and yet to explore other tools.
I was asked to write the script for BTEQ import

.import VARTEXT ‘,’ FILE = D:\cc\PDATA.TXT

( COL1

I executed the above script and it is successful using a txt(seperating the fileds with comma) file and giving the datatype as varchar.

sample input txt file:

I also tried to do the same using tab(\t) as the field seperator but it giving the same old error.
Q) Does this work only for comma seperated txt files?

Please could u tell me where can i find the BTEQ manual…

Thanks a lot

How to&Answers:

Can you post your BTEQ script? May I also ask why you are using BTEQ instead of FastLoad or MultiLoad?

The text file error is possibly due to the data types declared in the using clause. I believe they need to be declared as VARCHAR when reading delimited input (eg. declare as VARCHAR(10) for INTEGER fields).

As for Excel, I can’t find anything in the BTEQ manual that says that BTEQ can handle .xls files.

For your tab delimited files, are you doing this (that’s a tab character below)?

.import vartext '   '

Or this?

.import vartext '\t'

The former works, the latter doesn’t.

The BTEQ manual that I have is on my work machine. One of the first Google results for “BTEQ manual” should yield one online.