1.1 - 8.10 - AMLGenerator Output - Teradata Vantage

Teradata Vantage™ - Machine Learning Engine Analytic Function Reference

Teradata Vantage
Release Number
October 2019
Content Type
Programming Reference
Publication ID
English (United States)

The function creates an AML file, installed on ML Engine, which conforms to a specific XSD (XML schema definition) format, and displays the statistics of created AML file on the screen.

To download the AML file from Teradata, use the command call pm.download_afile ( aml_model_file ), where aml_model_file is specified in the AMLPrefix clause.


The header consists of ModelType, AMLGenerator build version, and Teradata Copyright information.

Request Columns

Request columns specify the names and data types of columns expected in the scoring request and are appended in the block columns with entity = "request". These are extracted from syntax elements RequestColNames and RequestColTypes. The data type is converted from Advanced SQL Engine SQL type to Scoring data type.

Request Parameters

The parameters specified by the user in the clauses RequestArgName and RequestArgVal are appended in the block params. These parameters are not validated by AMLGenerator (parameter parsing takes place inside Scorer) and are appended as specified by the user.

Model Columns

Model columns are appended in the block columns with entity = "model". They specify the names and data types of columns in Model data. Each block contains ModelTag information, if provided. Each block also contains InstalledFile information, if provided.

The behavior of Model Columns depends on whether the model is database table or installed file:
Model Model Columns and Types AML File Model Column Header
Database table Retrieved from Advanced SQL Engine and converted to Scoring data types. Database table name is appended in the AML file model column header.
Installed file Model columns are empty. Installed file name is appended in the AML file model column header.

Model Data

Model data contains the data for the model that the Model syntax element specifies and the checksum of the stored data, for data integrity.

How data is stored depends on whether the data is in a database table or an installed file:
Model How Data Is Stored
Database table
  • Time and timestamp SQLdata types are converted to acceptable scoring format.
  • Binary data is stored using Base64 encoding.
  • Special characters are transformed as follows:
    Character Transformation
    Backslash (\) \\
    Comma (,) \,
    Ampersand (&) "&"
    Less than (<) "&lt;"
    Greater than (>) "&gt;"
Installed file Data is captured in binary format (bytes) and stored using Base64 encoding in AML file. Because of binary encoded format, special character handling is unnecessary.
Scorer expects only AML files output by the AMLGenerator function. Third-party generation or manipulation of an AML file can cause scorer failure or incorrect scoring results.