17.05 - Time Series Expansion Support - Teradata Database

Teradata Vantage™ - Temporal Table Support

prodname
Advanced SQL Engine
Teradata Database
vrm_release
17.00
17.05
created_date
June 2020
category
Programming Reference
featnum
B035-1182-170K

Time series expansion is indicated using the EXPAND ON clause for SELECT statements, and provides the ability to create a regular time series of rows based on period values in the input rows. The intent is to expand a period column and produce value equivalent rows, one for each granule in a given period of interest.

For example, suppose an application uses PERIOD(DATE) values to record inventory data of slowly moving items. A SELECT statement can use the EXPAND ON clause to expand the period values by one-week intervals to get the moving average by week of the inventory cost for a specified period of interest.

To expand the system-generated VALIDTIME column that is automatically appended to the result set of a SEQUENCED VALIDTIME query, the EXPAND ON clause can include the VALIDTIME column name in the expand expression.