Examples | SYSUIF.INSTALL_FILE | SCRIPT Table Operator | Vantage - 17.10 - Example: Use SYSUIF.INSTALL_FILE to Install Files and then Run the SCRIPT Table Operator - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Operators and User-Defined Functions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Administration
Programming Reference
Publication ID
B035-1210-171K
Language
English (United States)

The following example installs a script and other files, and then executes the SCRIPT table operator.

DATABASE mydb;
SET SESSION SEARCHUIFDBPATH = mydb;
CALL SYSUIF.INSTALL_FILE('my_analytics',
                         'cz!my_analytics.sh!/tmp/my_analytics.sh');
CALL SYSUIF.INSTALL_FILE('my_model',
            'cz!my_model.model!/tmp/my_model.sh');
CALL SYSUIF.INSTALL_FILE('my_data',
                         'cz!my_data.dat!/tmp/my_data.dat');
SELECT * FROM SCRIPT( ON data_table
		SCRIPT_COMMAND('./mydb/my_analytics.sh –mymodel ./mydb/my_model.model –myadditionaldata ./mydb/my_data.dat')
		RETURNS('*','score varchar(10)');