1.1 - 8.10 - IDWT Example - Teradata Vantage

Teradata Vantage™ - Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
1.1
8.10
Release Date
October 2019
Content Type
Programming Reference
Publication ID
B700-4003-079K
Language
English (United States)

This example reconstructs the DWT Example input.

Input

Input tables are DWT Example output:

  • InputTable: dwt_coef_table
  • MetaTable: dwt_meta_table

SQL Call

DROP TABLE climate_reconstruct;

SELECT * FROM IDWT (
  ON dwt_coef_table AS InputTable
  ON dwt_meta_table AS MetaTable
  OUT TABLE OutputTable (climate_reconstruct)
  USING
  TargetColumns ('temp_f', 'pressure_mbar', 'dewpoint_f')
  SortColumn ('waveletid')
  PartitionColumns ('city')
) AS dt;

Output

 messages                    
 --------------------------- 
 IDwt finished successfully!
SELECT * FROM climate_reconstruct ORDER BY city, indexid;

Except for its name, climate_reconstruct, the output table is the same as the DWT Example input table, ville_climatedata. The original values for the temperature, pressure, and the dew point are reconstructed.

 city        indexid temp_f             pressure_mbar      dewpoint_f         
 ----------- ------- ------------------ ------------------ ------------------ 
 asheville         1  34.90000000000003 1020.5000000000007 28.900000000000016
 asheville         2  34.40000000000003  1020.200000000001 28.700000000000006
 asheville         3  33.90000000000002 1020.0000000000008 28.400000000000013
 asheville         4  33.40000000000002  1020.200000000001  28.30000000000001
 asheville         5  33.10000000000004 1020.2000000000007 28.000000000000018
 asheville         6  32.70000000000004 1020.0000000000006  27.90000000000002
 asheville         7 32.500000000000014 1020.3000000000004 27.700000000000017
 asheville         8 32.300000000000004 1020.8000000000003  27.60000000000001
 asheville         9 32.100000000000016 1021.3000000000006 27.400000000000016
 asheville        10 33.800000000000004 1021.7000000000008 28.200000000000024
 asheville        11  36.40000000000003 1022.1000000000008  28.90000000000002
 asheville        12 39.400000000000034 1022.0000000000007 29.300000000000026
 asheville        13  42.10000000000004 1021.1000000000006 29.200000000000017
 asheville        14 44.200000000000045 1020.0000000000005 29.100000000000023
 asheville        15  45.60000000000004 1019.3000000000005 28.900000000000013
 asheville        16  46.20000000000004 1019.0000000000006  28.50000000000001
 asheville        17  45.80000000000002 1019.2000000000007 28.500000000000014
 asheville        18 44.100000000000016 1019.6000000000008 28.600000000000023
 asheville        19 41.200000000000024 1020.1000000000007 28.500000000000025
 asheville        20  39.60000000000003 1020.6000000000006 28.800000000000026
 asheville        21  38.20000000000004 1020.9000000000003  29.00000000000002
 asheville        22  37.20000000000003 1021.1000000000004  29.00000000000002
 asheville        23 36.300000000000026 1021.0000000000007 29.000000000000018
 asheville        24 35.500000000000014 1020.9000000000008  29.00000000000002
 brownsville       1  35.10000000000003 1020.5000000000005  28.90000000000002
 brownsville       2  34.60000000000004 1020.2000000000005  28.80000000000002
 brownsville       3  34.10000000000002 1020.0000000000007 28.500000000000018
 brownsville       4 33.700000000000024 1020.1000000000005 28.400000000000013
 brownsville       5  33.30000000000002 1020.2000000000007 28.200000000000017
 brownsville       6  32.90000000000003 1020.0000000000007  28.10000000000002
 brownsville       7  32.70000000000003 1020.3000000000006  27.90000000000002
 brownsville       8  32.50000000000002 1020.8000000000005 27.800000000000022
 brownsville       9  32.30000000000001 1021.2000000000007 27.700000000000017
 brownsville      10 34.000000000000014 1021.6000000000007 28.500000000000014
 brownsville      11  36.70000000000002 1022.0000000000008 29.200000000000017
 brownsville      12  39.70000000000003 1021.9000000000008 29.600000000000016
 brownsville      13  42.50000000000003 1021.0000000000007  29.70000000000001
 brownsville      14 44.500000000000036 1019.9000000000007 29.500000000000007
 brownsville      15  45.90000000000004 1019.2000000000007 29.200000000000017
 brownsville      16  46.50000000000004 1019.0000000000002 28.900000000000013
 brownsville      17  46.00000000000004 1019.2000000000008 28.900000000000013
 brownsville      18  44.30000000000003 1019.6000000000006 28.900000000000006
 brownsville      19 41.500000000000036 1020.0000000000007 28.800000000000015
 brownsville      20  39.80000000000003 1020.5000000000003  29.20000000000001
 brownsville      21  38.50000000000004 1020.8000000000004  29.30000000000002
 brownsville      22 37.400000000000034 1020.9000000000005  29.30000000000002
 brownsville      23  36.50000000000003 1020.9000000000004 29.300000000000022
 brownsville      24  35.70000000000003 1020.8000000000004 29.200000000000006
 greenville        1  34.90000000000002 1020.6000000000006  28.80000000000002
 greenville        2  34.40000000000002 1020.2000000000008  28.70000000000001
 greenville        3  33.90000000000001 1020.1000000000005 28.400000000000013
 greenville        4  33.50000000000002 1020.2000000000003  28.30000000000001
 greenville        5  33.10000000000002 1020.2000000000003 28.000000000000018
 greenville        6 32.700000000000024 1020.0000000000002  27.90000000000002
 greenville        7 32.500000000000014 1020.4000000000004 27.700000000000017
 greenville        8  32.30000000000001 1020.8000000000006 27.600000000000016
 greenville        9 32.100000000000016 1021.3000000000004 27.500000000000018
 greenville       10 33.800000000000026 1021.7000000000004 28.300000000000015
 greenville       11  36.60000000000003 1022.0000000000006 29.100000000000016
 greenville       12  39.60000000000003 1021.9000000000008 29.500000000000014
 greenville       13  42.40000000000003 1021.1000000000006  29.50000000000002
 greenville       14  44.50000000000003 1020.0000000000007  29.40000000000002
 greenville       15  46.00000000000003 1019.3000000000006 29.100000000000023
 greenville       16  46.50000000000002 1019.0000000000006  28.80000000000002
 greenville       17  46.10000000000002 1019.2000000000007  28.80000000000002
 greenville       18  44.40000000000002 1019.6000000000008 28.700000000000017
 greenville       19  41.50000000000002 1020.1000000000007 28.700000000000017
 greenville       20  39.80000000000003 1020.6000000000004 29.100000000000023
 greenville       21  38.50000000000003 1020.9000000000007 29.200000000000017
 greenville       22  37.40000000000002 1021.0000000000008 29.200000000000017
 greenville       23  36.50000000000002 1020.9000000000007  29.20000000000001
 greenville       24  35.80000000000001 1020.9000000000004  29.10000000000001
 knoxville         1  34.80000000000002 1020.4000000000004 28.700000000000017
 knoxville         2  34.20000000000003 1020.0000000000007  28.40000000000002
 knoxville         3  33.70000000000003 1019.9000000000005  28.10000000000002
 knoxville         4  33.20000000000003 1020.0000000000008 27.900000000000016
 knoxville         5  32.80000000000001 1020.0000000000005  27.70000000000002
 knoxville         6  32.40000000000001 1019.9000000000003  27.50000000000002
 knoxville         7 32.200000000000024 1020.2000000000005 27.400000000000013
 knoxville         8  32.00000000000003 1020.6000000000005  27.30000000000001
 knoxville         9  31.80000000000002 1021.1000000000004 27.200000000000024
 knoxville        10  33.50000000000002 1021.5000000000003 28.000000000000032
 knoxville        11 36.300000000000026 1021.9000000000005 28.700000000000017
 knoxville        12 39.300000000000026 1021.8000000000005 29.000000000000007
 knoxville        13  42.10000000000002 1021.0000000000005  29.10000000000002
 knoxville        14  44.10000000000002 1019.9000000000002  28.90000000000002
 knoxville        15  45.50000000000002 1019.2000000000006 28.600000000000023
 knoxville        16  46.00000000000003 1018.9000000000005 28.300000000000022
 knoxville        17  45.60000000000002  1019.200000000001 28.300000000000026
 knoxville        18  43.90000000000002 1019.6000000000008 28.400000000000023
 knoxville        19 41.100000000000016 1020.0000000000009 28.300000000000022
 knoxville        20  39.40000000000002 1020.5000000000006 28.700000000000024
 knoxville        21  38.20000000000003 1020.8000000000004  28.80000000000002
 knoxville        22  37.10000000000004 1020.9000000000005 28.800000000000015
 knoxville        23  36.30000000000002 1020.9000000000003  28.80000000000002
 knoxville        24  35.50000000000002 1020.8000000000004  28.70000000000001
 nasheville        1  35.00000000000002 1020.4000000000007  29.00000000000002
 nasheville        2 34.500000000000014 1020.1000000000007 28.700000000000017
 nasheville        3 34.000000000000014 1019.9000000000008 28.500000000000018
 nasheville        4 33.600000000000016 1020.0000000000007  28.30000000000001
 nasheville        5  33.10000000000001 1020.1000000000003 28.100000000000016
 nasheville        6               32.8 1019.9000000000001  28.00000000000002
 nasheville        7 32.500000000000014 1020.2000000000005 27.800000000000022
 nasheville        8  32.40000000000001 1020.6000000000006 27.700000000000028
 nasheville        9  32.20000000000002 1021.1000000000004 27.600000000000023
 nasheville       10  33.80000000000002 1021.5000000000006  28.40000000000002
 nasheville       11  36.60000000000003 1021.9000000000005 29.000000000000014
 nasheville       12  39.60000000000004 1021.8000000000005 29.400000000000002
 nasheville       13 42.300000000000026 1021.0000000000008 29.400000000000016
 nasheville       14  44.30000000000003 1019.8000000000006  29.20000000000002
 nasheville       15  45.60000000000003 1019.2000000000005  28.90000000000002
 nasheville       16  46.20000000000003 1018.9000000000003  28.70000000000002
 nasheville       17  45.70000000000004 1019.1000000000004 28.600000000000016
 nasheville       18  44.10000000000003 1019.5000000000007 28.700000000000017
 nasheville       19  41.30000000000002 1019.9000000000005  28.60000000000002
 nasheville       20  39.50000000000002 1020.4000000000007 28.900000000000016
 nasheville       21  38.30000000000002  1020.700000000001 29.000000000000014
 nasheville       22  37.20000000000003 1020.9000000000011 29.000000000000014
 nasheville       23  36.40000000000002 1020.8000000000006 29.000000000000014
 nasheville       24  35.60000000000002 1020.7000000000006  28.90000000000002

Download a zip file of all examples and a SQL script file that creates their input tables from the attachment in the left sidebar.