TD_​RESAMPLE

Another classical approach to transforming a time series from an irregular to regular, and/or altering the sampling interval associated with the time series, is to apply a resampling function to the series. Resampling functions generally take as an input: a time series, which can be regular or irregular to begin with; a starting point, aka, 'time-zero'; and a desired target sampling interval. There are usually multiple choices available to the data scientist as to how the interpolation associated with the sample interval change is going to occur.

Options

INTERPOLATE
enum( NONE, LINEAR, LAG, LEAD, WEIGHTED, SPLINE ) : enumerated value selecting one of the valid supported interpolation strategies.
SEQUENCE.DURATION
Specifies the sampling interval associated with the result series.
SEQUENCE.START_VALUE
Specifies the first sampling index to interpolate.
SPLINE_PARAMS.METHOD
Specifies which kind of spline to be produced. The available types are NATURAL, CLAMPED, and NOT_A_KNOT. This parameter is optional - the default value is NOT_A_KNOT.
SPLINE_PARAMS.yp1
Only valid when METHOD(CLAMPED) has been specified. Specifies the value of the first derivative for the left boundary condition. This parameter is optional - the default value is 0.
SPLINE_PARAMS.ypn
Only valid when METHOD(CLAMPED) has been specified. Specifies the value of the first derivative for the right boundary condition. This parameter is optional - the default value is 0.
Output Schema
Output Schema, if Volatile is true then use user login as the schema.
Output Table
Output Table
VAL Location
VAL Location
Volatile
Specifies whether the table should be a VOLATILE table. If true, then the table is automatically deleted, otherwise it is users responsibility to remove or clean it up for space.
TIMECODE.DURATION
Specifies the sampling interval associated with the result series.
TIMECODE.START_VALUE
Specifies the first sampling index to interpolate.
WEIGHT
Only valid when INTERPOLATE(WEIGHTED) has been selected. The interpolated value is calculated as: Y_t = Y_{t_LEFT} * (1 - WEIGHT) + (Y-{t_RIGHT} * WEIGHT)

Input Ports

Icon
Connection to a Teradata Database Instance
Icon
The Teradata rendition of this function takes a logical series, containing any form of regular or irregular series - time series, spatial series, arbitrary numerical series - and applies an interpolation algorithm to transform it into a discrete series with the target start point and target sampling interval. The input series and the result series both contain real numbers - CONTENT(REAL) or CONTENT(MULTIVAR_REAL)- as their series elements. In producing the output, the data scientist has a choice of preserving or replacing the series indexing mechanism, via the OUTPUT_FMT(INDEX_STYLE()) declaration. The default INDEX_STYLE declaration indexes the result series as: OUTPUT_FMT(INDEX_STYLE(FLOW_THROUGH)).

Output Ports

Icon
output of TD_RESAMPLE

Nodes

Extensions

Links