“Hello World” Example (Teradata Database) - Teradata Warehouse Miner

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

Product
Teradata Warehouse Miner
Release Number
5.4.6
Published
November 2018
Language
English (United States)
Last Update
2018-12-07
dita:mapPath
gxn1538171534877.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2301
Product Category
Software

The following example outlines how to use Run Units to run a program file (in this case, bteq) to generate SQL and table output:

  1. Create a simple python script that will return hello world! when it is executed on LINUX.
  2. Save this script in a file called helloworld.py in the local directory C:\Temp\Script Operator.
    #!/usr/bin/python
    print 'hello world!'
  3. Drag an Execute Program/Script Run Unit onto the Run Units tab of the Variable Creation input screen.
    “Hello World” Example: Run Units tab with Execute Program/Script Run Unit

  4. Enter the Program File (bteq.exe) and script on the Properties dialog, and then click OK or Save and Run.
    “Hello World” Example: Properties dialog with bteq.exe and script entered

  5. Drag a SCRIPT Table Operator SQL element onto the Tables tab.
    “Hello World” Example: Tables tab with SCRIPT Table Operator

  6. After setting the Input Source to Function Table, select the text column onto the Variables tab.
    “Hello World” Example: Variables tab with text column selected

  7. Run the Variable Creation analysis, generating the following SQL.
    “Hello World” Example: Generated SQL

    The following table appears, with one column containing “hello world!” and one row for each Teradata node.

    “Hello World” Example: Table Result