SQL Generation - Teradata Warehouse Miner

Teradata Warehouse Miner User Guide - Volume 2ADS Generation

Product
Teradata Warehouse Miner
Release Number
5.4.4
Published
July 2017
Language
English (United States)
Last Update
2018-05-03
dita:mapPath
fcf1492702067123.ditamap
dita:ditavalPath
ft:empty
dita:id
B035-2301
Product Category
Software
In order to derive the variables defined in a Variable Creation function, SQL is generated in one of a number of forms depending on the result option selected. Note that for each of these forms, there is an option to “Create SQL Only” without executing the SQL.
  • “Select”
  • “Explain Select”
  • “Drop Table” and “Create Table As”
  • “Drop View” and “Create View”
When the SELECT option is chosen for output, if another analysis refers to this Variable Creation analysis for its input, the SQL takes the form of a “Drop Table” and “Create Volatile Table As”.
It is necessary to generate a DROP command prior to a CREATE in case the definition of the table or view has changed since a previous execution.

For each variable, a select list item is generated for the variable expression. If requested as expert options, WHERE, QUALIFY, HAVING, GROUP BY, ORDER BY, SAMPLE, TOP, WITH (RECURSIVE) and EXPAND ON clauses may be generated. In the FROM clause, data is selected from the anchor table, and left outer joined to any other tables referred to in the variable, dimension or expert clause definitions, including Table Functions and Table Operators. Aliases are generated for each table or view accessed and all column names are automatically qualified using these aliases.