Overview of Variable Transformation | Vantage Analytics Library - Variable Transformation - Vantage Analytics Library

Vantage Analytics Library User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
Lake
VMware
Product
Vantage Analytics Library
Release Number
2.2.0
Published
March 2023
Language
English (United States)
Last Update
2024-01-02
dita:mapPath
ibw1595473364329.ditamap
dita:ditavalPath
iup1603985291876.ditaval
dita:id
zyl1473786378775
Product Category
Teradata Vantage

Variable Transformation is useful for preparing input data for an analytic algorithm. For example, a K-Means clustering algorithm typically produces better results when input values are first converted to their Z-Score values to neutralize differences in their magnitude.

With the Variable Transformation function, you can specify any combination of transformations for any number of columns in a single input table or view. You can also specify that input columns be retained unchanged or retained with different names or types. The function outputs your choice of a SELECT, CREATE TABLE, CREATE VOLATILE TABLE, or CREATE VIEW statement containing retained and transformed columns.

The function automatically retains the primary index column of the input table. You do not have to specify the primary index column. However, if the primary key columns is not the primary index column, you must provide the primary key columns to the output table to uniquely identify each output row by retaining them or another means.

You can tell the function to do a null transformation prior to the requested transformation. The function produces the null transformation, a volatile table that the generated SQL automatically references. You must specify the primary key columns of the input table if the columns are not the primary index column or if the primary index column cannot be determined.

You might want to specify more transformations than a single Variable Transformation function call can perform due either to complexity or the number of output columns. If so, split the transformations into multiple function calls and join them back together. To join the transformations together, use the same keycolumns in two transformation invocations, then use the reorganization function JOIN to perform an INNER join.

If there is more than one occurrence of a transformation name, a counter is added at the end of each name after the first to establish uniqueness. If this fails, such as from a conflict with a user-defined alias, it is up to the user to assign or change an appropriate alias.

Special characters

When using any of the Vantage Analytics Library special characters
  • Left or right braces { }
  • Left or right parenthesis ( )
  • Comma ,
  • Forward slash /

to specify existing values or create transformed values within an argument to any variable transformation function, you must escape the characters by surrounding the argument with two consecutive single quotes as in the following examples:

''N/A''

''N-A''

''{NA}''

''(N/A)''