Executing LINUX Commands - Analytics Database - Teradata Vantage

SQL Operators and User-Defined Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-04-05
dita:mapPath
xub1628111590556.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
drp1544241916620
lifecycle
latest
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 the Python interpreter with the SCRIPT table operator, you can use the Teradata In-nodes Python interpreter that is provided through the teradata-python rpm on the Analytics Database nodes.

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('/opt/teradata/languages/Python/bin/python3 ./mydatabase/mapper.py')
);