TPT03036: Length must be a positive integer value

Tools & Utilities
Enthusiast

TPT03036: Length must be a positive integer value

There is a following error message from a tbuild execution:

Teradata Parallel Transporter Version 14.10.00.10

TPT_INFRA: Semantic error at or near line 12 of Generated Schema based on SELECT stmt:

TPT_INFRA: TPT03036: Length must be a positive integer value.

  Specification is rejected.

TPT_INFRA: Semantic error at or near line 12 of Generated Schema based on SELECT stmt:

TPT_INFRA: TPT03024: Rule: Variable Character Data Type

Compilation failed due to errors. Execution Plan was not generated.

Job script compilation failed.


DEFINE JOB job
(
apply to operator ($file_writer ATTR (QuotedData='Y'
,OpenQuoteMark = '"=""'
,CloseQuoteMark = '"""'
,TextDelimiter = ';'
))
SELECT * FROM OPERATOR($EXPORT);
);

as a SelectStmt I have a statement that works in Query Assistant but fails with the above error in TPT. I can not share it as is and do not know what would be helpful for debugging otherwise.

A different SelectStmt goes through just fine.

What could the the root cause?

3 REPLIES
Enthusiast

Re: TPT03036: Length must be a positive integer value

And the problem seems to be in the SELECT part as SELECT * goes through fine as well.

Enthusiast

Re: TPT03036: Length must be a positive integer value

As it often happens I got an eureka! moment just after posting :-). The culprit was an explicit empty string as in

SELECT '' AS emptyfield FROM ... 

So just two single quotes as a field value. It this an expected behaviour for TPT to fail on this?

Teradata Employee

Re: TPT03036: Length must be a positive integer value

Well, without seeing the entire script and SELECT statement I can only guess what the syntax would look like.

Single-quotes need to be escaped if they appear in a job variable or attribute value that is already enclosed in single quotes.

So, you are probably encountering a syntax error that is leading to that particular error to be generated.

-- SteveF