GENSERIES_SPEC Element Example | Teradata Vantage - GENSERIES_SPEC Example - Teradata Vantage

Database Unbounded Array Framework Time Series Functions

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
ncd1634149624743.ditamap
dita:ditavalPath
ruu1634160136230.ditaval
dita:id
ncd1634149624743

Example: Using GENSERIES_SPEC with TD_GENSERIES4FORMULA

EXECUTE FUNCTION INTO VOLATILE ART(mytab)
TD_GENSERIES4FORMULA(
    GENSERIES_SPEC(
       INSTANCE_NAMES('{"BuoyID": 3 }'),
       DT(INTEGER),
       GEN_PAYLOAD(0,1,5)
    ),
    FUNC_PARAMS(FORMULA('Y = 3.0 + 8.0*X1')), 
    OUTPUT_FMT(INDEX_STYLE(NUMERICAL_SEQUENCE))
);

TD_GENSERIES4FORMULA Output

Buoy_ID ROW_I Magnitude
3 0 3.0
3 1 11.0
3 2 43.0