Executing LINUX Commands - Advanced SQL Engine - Teradata Database

SQL Operators and User-Defined Functions

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2023-04-27
dita:mapPath
qqu1556127655717.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1210
lifecycle
previous
Product Category
Teradata Vantage™

The text included in the SCRIPT_COMMAND clause runs in its own shell inside a temporary working directory.

For each database named in the SEARCHUIFDBPATH, a link is added to the working directory that has the same name as that database. You must set SEARCHUIFDBPATH in order to access the user-installed files.

To access files with the SCRIPT table operator, add a relative path using './', the database name, and '/' the file name.

The following is an example of SCRIPT accessing the 'mapper.py' file in the database called 'mydatabase':

SELECT * FROM SCRIPT
( ON source
SCRIPT_COMMAND('python ./mydatabase/mapper.py')
);