TD_CONVOLVE2 Function Example | Teradata Vantage - TD_CONVOLVE2 Examples - 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

TD_CONVOLVE2 Input

CONVOLVE2_REALS_LEFT
ID ROW_SEQ ROW_I_Time COL_SEQ COL_I_TIME A B C D
1 0 2022-08-08 08:00:00.000000 0 2022-08-08 08:00:00.000000 1.1 10.1 20.1 30.1
1 0 2022-08-08 08:00:00.000000 1 2022-08-08 08:02:00.000000 1.2 10.2 20.2 30.2
1 1 2022-08-08 08:02:00.000000 0 2022-08-08 08:00:00.000000 1.3 10.3 20.3 30.3
1 1 2022-08-08 08:02:00.000000 1 2022-08-08 08:02:00.000000 1.4 10.4 20.4 30.4
CONVOLVE2_REALS_RIGHT
ID ROW_SEQ ROW_I_Time COL_SEQ COL_I_TIME A B C D
1 0 2022-08-08 08:00:00.000000 0 2022-08-08 08:00:00.000000 1.1 10.1 20.1 30.1
1 0 2022-08-08 08:00:00.000000 1 2022-08-08 08:02:00.000000 1.2 10.2 20.2 30.2
1 1 2022-08-08 08:02:00.000000 0 2022-08-08 08:00:00.000000 1.3 10.3 20.3 30.3
1 1 2022-08-08 08:02:00.000000 1 2022-08-08 08:02:00.000000 1.4 10.4 20.4 30.4

Example: TD_CONVOLVE2 Call

EXECUTE FUNCTION INTO VOLATILE ART(ConvRes1)
TD_CONVOLVE2(
   MATRIX_SPEC(TABLE_NAME(CONVOLVE2_REALS_LEFT), MATRIX_ID(ID),
      ROW_AXIS(SEQUENCE(ROW_SEQ)),COLUMN_AXIS(SEQUENCE(COL_SEQ)),
      PAYLOAD( FIELDS(A), CONTENT(REAL))),
   MATRIX_SPEC(TABLE_NAME(CONVOLVE2_REALS_RIGHT), MATRIX_ID(ID),
      ROW_AXIS(SEQUENCE(ROW_SEQ)), COLUMN_AXIS(SEQUENCE(COL_SEQ)),
      PAYLOAD( FIELDS(A), CONTENT(REAL))),
   INPUT_FMT(INPUT_MODE(MATCH))
);

TD_CONVOLVE2 Output

SELECT * FROM ConvRes1;
ID ROW_I COLUMN_I REAL_OUT_REAL_REAL_A IMAG_OUT_IMAG_IMAG_A
---------------------------------------------------------------
1  0     0        1.2100000000000009   0.0
1  0     1        2.6400000000000006   0.0
1  0     2        1.4399999999999995   0.0
1  1     0        2.8600000000000008   0.0
1  1     1        6.199999999999999    0.0
1  1     2        3.3599999999999994   0.0
1  2     0        1.6900000000000002   0.0
1  2     1        3.6400000000000000   0.0
1  2     2        1.959999999999999    0.0