BULK INSERT in Teradata

UDA
Enthusiast

BULK INSERT in Teradata

Hi guys!

Is there a command that performs a similar function as BULK INSERT(SQL statement) in Teradata?

Thanks for help,
Anderson
6 REPLIES
Senior Apprentice

Re: BULK INSERT in Teradata

Hi Anderson,
there's no built in equivalent for MS BULK INSERT, but you might use a BTEQ-Job (or a FastLoad/MultiLoad) to load data.

What's the number of rows and the layout of the input file (CSV or binary)?

Dieter
Enthusiast

Re: BULK INSERT in Teradata

Hi Dieter!

The number of rows are, at about, 200.000.

The layout of the input file is the same of this below BULK INSERT command:

BULK INSERT TBLCDR FROM '\\computer2\somefile.xxx' WITH (FIELDTERMINATOR = ',',ROWTERMINATOR = '\', MAXERRORS = 1,ORDER(FIELD1 ASC, FIELD2 ASC, FIELD3 ASC));

The type of input file is not known. It is equivalent to a *.csv file.

Thanks for help,
Anderson
Enthusiast

Re: BULK INSERT in Teradata

If you want to do Bulk Insert to Teradata from VB.Net, C# or some other CLR language, I've created a Managed C++ wrapper for the Teradata Parallel Transport API (equivalent to FAST LOAD).
http://tptapiwrapper.codeplex.com/
Fan

Re: BULK INSERT in Teradata

Any chance of getting some documentation on the above api? I've downloaded it from codeplex, but without any readme, etc., i'm not able to get it working.

Thanks,

Mark
Enthusiast

Re: BULK INSERT in Teradata

bteq
.set sessions 5
.logon

.import vartext ',' file = \\computer2\somefile.xxx;
.repeat * pack 100
using (f1 integer, f2 varchar(20),f3 varchar(10))
insert into table (field1,field2,fied3)
values(f1,f2,f3);
Enthusiast

Re: BULK INSERT in Teradata

syntax may not be taht accurate, but check teradata bteq manual, it should suffice what you need.