All Forums Tools
DiEgoR 33 posts Joined 08/06
30 May 2016
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?

input output putput
DiEgoR 33 posts Joined 08/06
30 May 2016

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

input output putput

DiEgoR 33 posts Joined 08/06
30 May 2016

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?

input output putput

feinholz 1234 posts Joined 05/08
31 May 2016

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

You must sign in to leave a comment.