DataRobotPredict Example: OverwriteCachedModel - Teradata Vantage

Teradata Vantageā„¢ - Bring Your Own Model User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Teradata Vantage
Release Number
5.0
Published
October 2023
Language
English (United States)
Last Update
2024-04-06
dita:mapPath
fee1607120608274.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
fee1607120608274
select * from td_mldb.DataRobotPredict(
 on iris_example_test
 on (select * from datarobot_models where model_id='dr_iris_rf') DIMENSION
 using
  Accumulate('id')
  ModelOutputFields('1', '2', '3')
  OverwriteCachedModel('false') -- Default behavior, can be omitted. Looks for the model in the cache and uses it, if present (instead of 'false' it can also be used: 'f'|'no'|'n'|'0').
) as td order by id;
 
 *** Query completed. 30 rows found. 5 columns returned.
 *** Total elapsed time was 1 second.
    id  prediction            1                          2                          3
------  --------------------  -------------------------  -------------------------  -------------------------
     5  '1'                   1.0                        0.0                        0.0
    10  '1'                   1.0                        0.0                        0.0
    15  '1'                   1.0                        0.0                        0.0
    20  '1'                   1.0                        0.0                        0.0
    25  '1'                   0.9993333333333333         6.666666666666666E-4       0.0
    30  '1'                   1.0                        0.0                        0.0
    35  '1'                   1.0                        0.0                        0.0
    40  '1'                   1.0                        0.0                        0.0
    45  '1'                   0.9993333333333333         6.666666666666666E-4       0.0
    50  '1'                   0.9996                     4.0E-4                     0.0

...
select * from td_mldb.DataRobotPredict(
 on iris_example_test
 on (select * from datarobot_models where model_id='dr_iris_rf') DIMENSION
 using
  Accumulate('id')
  ModelOutputFields('1', '2', '3')
  OverwriteCachedModel('*') -- Overwrites model in the cache. Looks for the model in the model table and overwrites the cached model (instead of '*' it also can be used: '<cached_model_name>'|'true'|'t'|'yes'|'y'|'1').
) as td order by id;
 
 *** Query completed. 30 rows found. 5 columns returned.
 *** Total elapsed time was 12 seconds.
    id  prediction            1                          2                          3
------  --------------------  -------------------------  -------------------------  -------------------------
     5  '1'                   1.0                        0.0                        0.0
    10  '1'                   1.0                        0.0                        0.0
    15  '1'                   1.0                        0.0                        0.0
    20  '1'                   1.0                        0.0                        0.0
    25  '1'                   0.9993333333333333         6.666666666666666E-4       0.0
    30  '1'                   1.0                        0.0                        0.0
    35  '1'                   1.0                        0.0                        0.0
    40  '1'                   1.0                        0.0                        0.0
    45  '1'                   0.9993333333333333         6.666666666666666E-4       0.0
    50  '1'                   0.9996                     4.0E-4                     0.0
  
...