Trying to publish a model to Teradata might generate the message "ERROR: Base table or view not found Object 'MODEL_TABLE' does not exist"


Trying to publish a model using the PUBLISHMODEL statement with the SCOREACCEL procedure might result in errors in the SAS®  Cloud Analytic Services (CAS) server log similar to the following:

ERROR: Base table or view not found Object 'SAS_MODEL_TABLE' does not exist.
ERROR: Write to model table "schema"."model_table" failed.
ERROR: Failed to publish model 'model01''. Exiting with ERROR (rc=0x90ffd812).
ERROR: The action stopped due to errors.
ERROR: The action was not successful. [ABORT]

The issue occurs when the following is true:

The model is qualified with the database that is specified with the SCHEMA= option when created. However, later references for the model table are not qualified, so the table is being looked for in the default database that is specified with the DATABASE= option.

Instead of using the CASLIB= option, specify the connection information by using the USERNAME=, PASSWORD=, SERVER=, and DATABASE= options. The DATABASE= option should point to the database where the model table is located or is created and not the default database for the user.