TeradataParallelTransport API Table Schema Mismatch Error

Tools

TeradataParallelTransport API Table Schema Mismatch Error

we have been using all the operations of teradata utility using TPT API for which we are interfacing telapi.dll

when loading a teradata table using a buffer, we are experencing a error that row length exceeds the maximum defined by the table schema with status 21031.

please give us an solution to solve this issue.

Thanks in advance

4 REPLIES

Re: TeradataParallelTransport API Table Schema Mismatch Error

I forget to add one thing in previous comment.We are using putbuffer function to load data into terradata database.The same data is loaded usung putrow function in row by row basis.But when we are using putbuffer function to load ,row length exceeds the maximum defined by table schema error occurs..

Teradata Employee

Re: TeradataParallelTransport API Table Schema Mismatch Error

Well, we definitely need more information than this.

Are you saying that when you use putrow() instead of putbuffer(), you do not get this problem?

Are you sure you are building the buffer properly?

And I hope you are not using putrow() and putbuffer() interchangeably. You use one or the other. Not both.

-- SteveF

Re: TeradataParallelTransport API Table Schema Mismatch Error

Ya sure We use putbuffer function only.Not both functions at a time.

We have exported data from the teradata table to formatted file using fast export utility .

Using that file,We load the buffer using fread function as follows

fread(buffer,1,64,file).We load the buffer by 64 bytes block.

then we calculate the length of buffer as follows

TD_LENGTH bytes=*((unsigned short *)buffer)

then we use this length in putbuffer function as follows

putbuffer(buffer,bytes,1)

Am not sure whether it is a correct method to build a buffer.

Kindly give us a solution.

Teradata Employee

Re: TeradataParallelTransport API Table Schema Mismatch Error

There is a specific method for creating the buffer. You cannot just place rows contiguously into a buffer.

Please consult the TPTAPI documentation for creating the buffer.

-- SteveF