15.10 - Job Script Common Errors - Parallel Transporter

Teradata Parallel Transporter User Guide

prodname
Parallel Transporter
vrm_release
15.10
category
User Guide
featnum
B035-2445-035K

Job Script Common Errors

Job script compilation errors are generally syntactic or semantic errors.

Syntactic errors include the following:

  • Use of a keyword not known to Teradata PT.
  • Absence of a keyword, identifier, or other script item, such as a punctuation mark expected in a particular part of the script.
  • Out of order or missing DEFINE statement; or a DEFINE statement typographical error.
  • Error Case 3: Extra Comma

    Extra comma errors include such things as erroneously coding a comma ( , ) after the last column definition in a DEFINE SCHEMA statement, or after the last attribute declaration in an ATTRIBUTES list.

    The following script example:

    DEFINE SCHEMA DAILY_SALES
    (
      Store_Number     INTEGER,
          :             :
      Sales_Date          ANSIDATE,
      Gross_Amount     DECIMAL(10,2),
    );

    results in the following console error:

    line 37: syntax error at ")" missing { REGULAR_IDENTIFIER_ EXTENDED_IDENTIFIER
    EXTENDED_IDENTIFIER_NO_N_ } in Rule: Regular Identifier.
    TPT_INFRA: TPT03022: Error: Syntax error occurred in parse rule Column Definition
    Compilation failed due to errors. Execution Plan was not generated.
    Job script compilation failed.
    Job terminated with status 8.

    Note: The reported line number in syntactic error messages is usually accurate, but occasionally the problem may actually appear on the previous line.

    Cause: The extraneous comma after DECIMAL(10,2) is not recognized as being a syntax error until the parser encounters the closing ')' on line 37.

    Corrective Action: Correct the error and resubmit the job.

    Error Case 4: Omitted Semicolon

    For the script example shown in Error Case 3: Extra Comma, suppose the DEFINES SCHEMA statement was missing the final semicolon (;). An error similar to the following would result:

    line 38: syntax error at "DEFINE" missing SEMICOL_ in Rule: Job Definition Body
    Compilation failed due to errors. Execution Plan was not generated.
    Job script compilation failed.
    Job terminated with status 8.

    Corrective Action: Correct the error and resubmit the job.

    Error Case 5: Omitted Keyword

    Omitting a required keyword, for example leaving out 'TO' in the APPLY ... TO OPERATOR portion of an APPLY statement, results in the following console message:

    line 106: syntax error at "OPERATOR"  missing TO_ in Rule: Restricted APPLY Statement
    Compilation failed due to errors. Execution Plan was not generated.
    Job script compilation failed.
    Job terminated with status 8.

    Corrective Action: Review the script line indicated in the error message against required syntax, then correct the error, and resubmit the job.

    Error Case 6: Semantic Error

    Semantic errors occur in script syntax that is correct, but not meaningful in some important way, including such common errors as:

  • using the name of a CHAR column in an arithmetic expression
  • using the name of a consumer operator where the Teradata PT script requires the name of a producer operator
  • mismatch between the schemas for the producer and the consumer operator in a job step
  • For example, if a script references the name of a TYPE LOAD operator where the script requires the name of a producer operator, as shown in the following:

    SELECT FROM OPERATOR( LOAD_OPERATOR [2] )

    then the console would return the following error:

    TPT_INFRA: TPT03168: Error: Semantic error at or near job script line 138:
    Operator 'LOAD_OPERATOR' is not of type 'Producer'.
    Operator is rejected as data source for SELECT operation.
    Compilation failed due to errors. Execution Plan was not generated.
    Job script compilation failed.
    Job terminated with status 8.

    Corrective Action: Modify the job script to correct the semantic error and resubmit the job.