SCRIPT (Teradata Database) - Teradata Warehouse Miner

Teradata® Warehouse Miner™ User Guide - Volume 2ADS Generation

Teradata Warehouse Miner
Release Number
November 2018
English (United States)
Last Update
Product Category

The SCRIPT Table Operator, available initially in the Teradata 15.00 release, can be used to execute a user-installed script or any LINUX command on Teradata Database nodes. A system-supplied stored procedure must be executed to install the script file on all Teradata nodes. This stored procedure should be executed in an Execute Program/Script Run Unit using the BTEQ (Basic Teradata Query) utility. It cannot be executed through an ODBC application, such as this one. A simple example of calling the stored procedure using BTEQ and then executing the SCRIPT Table Operator is depicted below, after an outline of the SCRIPT Table Operator parameters.

Refer to the Teradata SQL Functions, Operators, Expressions, and Predicates document, B035-1145, for details about the SCRIPT Table Operator and Script Installation Procedures. Note that these topics are not included in versions prior to Teradata 15.00.
  • ON Clause — Only one is allowed, with standard options HASH BY, PARTITION BY, PARTITION BY ANY, ORDER BY and LOCAL ORDER BY. DIMENSION is not supported by the SCRIPT Table Operator.
    Note that the ON Clause is specified using the node just underneath the SCRIPT Table Operator in the SQL expression tree on the Tables tab, not on the Properties panel.
  • Name/Value Pairs
    • SCRIPT_COMMAND — This is the required invocation of the Script program.
    • RETURNS — An asterisk indicating all result columns, or a list of column names paired with data types. (Optional)
    • DELIMITER — The character to separate column values in the input and output strings. (Optional—default is ‘tab’)
    • QUOTECHAR — Forces all input and output to the script to be quoted using the specified character. (Optional)