Formula Rules | Teradata Vantage - Formula Rules - Teradata Vantage

Database Unbounded Array Framework Time Series Functions

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-04-04
dita:mapPath
ncd1634149624743.ditamap
dita:ditavalPath
ruu1634160136230.ditaval
dita:id
ncd1634149624743
Several UAF functions take a formula as input. A formula is a string (VARCHAR(64000)) that follows these rules:
  • The formula is enclosed in single or double quotation marks.
  • The formula starts with "Y =".

    Y is the response variable (also called the result parameter, dependent variable, or forecasting variable). It must be named Y or y. It corresponds to the first field referenced in SERIES_SPEC(PAYLOAD(FIELDS())).

  • After "Y =" the formula has a SQL arithmetic expression composed of coefficients, explanatory variables, numeric constants, numeric variables, arithmetic operators, arithmetic functions, trigonometric functions, and parentheses.
  • Each coefficient follows these rules:
    • It appears immediately before a multiplication operator (*), which appears immediately before an explanatory variable.
    • It is either a numeric constant or a numeric variable.
      If it is a numeric variable:
      • It has a Teradata UNICODE object name that contains no escape character or quotation mark.
      • Its name is case-insensitive.
      • The function estimates its value.
    • It appears in the formula only once.
  • Each explanatory variable follows these rules:
    • Its position in the formula is significant: The nth explanatory variable corresponds to the nth field referenced in SERIES_SPEC(PAYLOAD(FIELDS())).
    • It has a Teradata-supported name label.
    • It can appear in the formula multiple times.

For supported arithmetic operators, arithmetic functions, trigonometric functions, and general information about SQL arithmetic expression structure, see Teradata® Database SQL Functions, Operators, Expressions, and Predicates, B035-1145.

Example: Numeric Variable Coefficients

Y = d + a*X1 + b*X2 + c*(exp(X3) * cos(X2))

d is a numeric variable.

a, b, and c are numeric variable coefficients. The function estimates their values.

X1, X2, and X3 are explanatory variables.

Example: Numeric Constant Coefficients

Y = 89 + 6*X1 + 2.99*X1**2 + exp(X2)

89 is a numeric constant.

2, 6 and 2.99 are numeric constant coefficients.

X1 and X2 are explanatory variables.