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.
Header
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.
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.
Model | How Data Is Stored | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Database table |
|
||||||||||||
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. |