IDWT2D Example - Teradata Vantage

Machine Learning Engine Analytic Function Reference

Product
Teradata Vantage
Release Number
8.10
1.1
Published
October 2019
Language
English (United States)
Last Update
2019-12-31
dita:mapPath
ima1540829771750.ditamap
dita:ditavalPath
jsj1481748799576.ditaval
dita:id
B700-4003
lifecycle
previous
Product Category
Teradata Vantageā„¢

This example reconstructs the DWT2D Example input table.

Input

Input tables are DWT2D Example output:

  • InputTable: dwt_coef_table
  • MetaTable: dwt_meta_table

SQL Call

SELECT * FROM IDWT2D (
  ON dwt2d_coeftable AS InputTable
  ON dwt2d_metatable AS MetaTable
  OUT TABLE OutputTable (climate2d_reconstruct)
  USING
  TargetColumns ('temp_f', 'pressure_mbar', 'dewpoint_f')
  SortColumn ('waveletid')
  PartitionColumns ('state')
) AS dt;

Output

 messages                      
 ----------------------------- 
 IDwt2D finished successfully!
SELECT * FROM climate2d_reconstruct order by state, indexy, indexx;
 state indexy indexx temp_f             pressure_mbar      dewpoint_f         
 ----- ------ ------ ------------------ ------------------ ------------------ 
 ca        32   -117  34.90000000000003 1020.5000000000011  28.90000000000002
 ca        32   -116 34.400000000000034 1020.2000000000014 28.700000000000024
 ca        33   -118  33.90000000000003 1020.0000000000014 28.400000000000023
 ca        33   -117  33.40000000000002 1020.2000000000011  28.30000000000002
 ca        34   -121  33.10000000000004  1020.200000000001  28.00000000000002
 ca        34   -120  32.70000000000005 1020.0000000000016  27.90000000000002
 ca        34   -119 32.500000000000036 1020.3000000000013  27.70000000000003
 ca        34   -118  32.30000000000003 1020.8000000000013 27.600000000000037
 ca        35   -120  32.10000000000005 1021.3000000000012 27.400000000000034
 ca        35   -119  33.80000000000004 1021.7000000000013  28.20000000000003
 ca        35   -118 36.400000000000034 1022.1000000000015  28.90000000000005
 ca        35   -117 39.400000000000034 1022.0000000000009 29.300000000000026
 ca        36   -122 34.900000000000034 1020.5000000000009  28.90000000000002
 ca        36   -121 34.400000000000034 1020.2000000000012  28.70000000000002
 ca        36   -120 33.900000000000034  1020.000000000001 28.400000000000013
 ca        36   -119 33.400000000000034  1020.200000000001 28.300000000000033
 ca        36   -118  33.10000000000003 1020.2000000000012 28.000000000000032
 ca        37   -123  32.70000000000004 1020.0000000000013 27.900000000000023
 ca        37   -122  32.50000000000006 1020.3000000000013  27.70000000000003
 ca        37   -121 32.300000000000026  1020.800000000001 27.600000000000026
 ca        38   -124  32.10000000000003 1021.3000000000009 27.400000000000023
 ca        38   -123  33.80000000000004  1021.700000000001 28.200000000000024
 ca        38   -122  34.90000000000004 1020.6000000000013  28.80000000000004
 ca        38   -121 34.400000000000034 1020.2000000000012  28.70000000000002
 ca        38   -120  33.90000000000003 1020.1000000000009 28.400000000000013
 ca        39   -124  33.50000000000004 1020.2000000000008 28.300000000000026
 ca        39   -122  33.10000000000004 1020.2000000000014  28.00000000000003
 ca        39   -121  32.70000000000004  1020.000000000001 27.900000000000016
 ca        40   -125 32.500000000000036 1020.4000000000008  27.70000000000003
 ca        40   -122  32.30000000000004 1020.8000000000013 27.600000000000033
 ca        41   -125 32.100000000000044 1021.3000000000011 27.500000000000032
 ca        41   -124  33.80000000000005 1021.7000000000012 28.300000000000033
 ca        41   -123  34.60000000000005 1020.2000000000012 28.800000000000033
 ca        41   -122  33.80000000000004 1021.7000000000015  28.30000000000004
 ca        41   -121  36.60000000000004 1022.0000000000009 29.100000000000033
 tx        26    -99 39.600000000000044  1021.900000000001  29.50000000000003
 tx        26    -98 42.400000000000055 1021.1000000000013  29.50000000000002
 tx        27    -99  44.50000000000005 1020.0000000000009  29.40000000000002
 tx        27    -98 46.000000000000064 1019.3000000000011  29.10000000000003
 tx        28   -100  46.50000000000005 1019.0000000000009  28.80000000000003
 tx        28    -99  46.10000000000005 1019.2000000000014 28.800000000000033
 tx        28    -98  44.40000000000005 1019.6000000000015  28.70000000000004
 tx        29   -105  41.50000000000005  1020.100000000001  28.70000000000003
 tx        29   -104  39.80000000000005  1020.600000000001  29.10000000000003
 tx        29   -102 38.500000000000036 1020.9000000000012  29.20000000000002
 tx        29   -101 37.400000000000034  1021.000000000001  29.20000000000003
 tx        29    -99  36.50000000000005 1020.9000000000011  29.20000000000004
 tx        29    -98 35.800000000000054 1020.9000000000011  29.10000000000005
 tx        29    -97 35.100000000000044 1020.5000000000011 28.900000000000034
 tx        29    -96  34.60000000000004 1020.2000000000013 28.800000000000026
 tx        29    -95 34.100000000000044 1020.0000000000011  28.50000000000003
 tx        30   -105  33.70000000000003 1020.1000000000008 28.400000000000027
 tx        30   -104 33.300000000000026  1020.200000000001 28.200000000000024
 tx        30   -103  32.90000000000004  1020.000000000001 28.100000000000037
 tx        30   -102 32.700000000000045 1020.3000000000012 27.900000000000034
 tx        30   -101 32.500000000000036 1020.8000000000012 27.800000000000033
 tx        30   -100 32.300000000000026 1021.2000000000014 27.700000000000035
 tx        30    -99 34.000000000000036 1021.6000000000013 28.500000000000043
 tx        30    -98 36.700000000000045 1022.0000000000014 29.200000000000042
 tx        30    -97 39.700000000000045 1021.9000000000015 29.600000000000033
 tx        30    -96  42.50000000000004 1021.0000000000016 29.700000000000024
 tx        31   -103  44.50000000000005 1019.9000000000011 29.500000000000032
 tx        31   -102  45.90000000000007 1019.2000000000018 29.200000000000042
 tx        31   -100 46.500000000000036 1019.0000000000016 28.900000000000034
 tx        31    -99  46.00000000000005 1019.2000000000016 28.900000000000038
 tx        31    -98  44.30000000000005 1019.6000000000015 28.900000000000038
 tx        31    -97  41.50000000000004  1020.000000000002 28.800000000000036
 tx        31    -96  39.80000000000004 1020.5000000000023 29.200000000000035
 tx        31    -95  38.50000000000004 1020.8000000000013 29.300000000000033
 tx        32   -103 37.400000000000034 1020.9000000000012 29.300000000000033
 tx        32   -102  36.50000000000005 1020.9000000000017 29.300000000000047
 tx        32   -101  35.70000000000005 1020.8000000000014 29.200000000000035
 tx        32   -100  35.00000000000005 1020.4000000000015  29.00000000000003
 tx        32    -99  34.50000000000004 1020.1000000000015  28.70000000000003
 tx        32    -98  34.00000000000004 1019.9000000000011 28.500000000000036
 tx        32    -97 33.600000000000044 1020.0000000000015 28.300000000000033
 tx        32    -96 33.100000000000044 1020.1000000000017 28.100000000000033
 tx        32    -95  32.80000000000004 1019.9000000000012 28.000000000000036
 tx        33   -103 32.500000000000036 1020.2000000000012  27.80000000000003
 tx        33   -102 32.400000000000034 1020.6000000000015 27.700000000000042
 tx        33   -101 32.200000000000045 1021.1000000000013 27.600000000000037
 tx        33   -100 33.800000000000054 1021.5000000000013 28.400000000000038
 tx        33    -99  36.60000000000005 1021.9000000000012 29.000000000000032
 tx        33    -98  39.60000000000005 1021.8000000000012 29.400000000000027
 tx        33    -97  42.30000000000004 1021.0000000000011 29.400000000000027
 tx        33    -95  44.30000000000005 1019.8000000000012 29.200000000000035
 tx        34   -103 45.600000000000044 1019.2000000000012 28.900000000000027
 tx        34   -102  46.20000000000006 1018.9000000000011 28.700000000000028
 tx        34   -101  45.70000000000006  1019.100000000001  28.60000000000003
 tx        34   -100  44.10000000000005 1019.5000000000009 28.700000000000024
 tx        35   -104 41.300000000000026 1019.9000000000008  28.60000000000003
 tx        35   -102  39.50000000000004  1020.400000000001  28.90000000000003
 tx        35   -101  38.30000000000003 1020.7000000000007 29.000000000000025
 tx        36   -102 37.200000000000045 1020.9000000000012  29.00000000000003
 tx        36   -101  36.40000000000003 1020.8000000000009  29.00000000000003
 wa        45   -122 29.900000000000038 1020.2000000000012 24.800000000000026
 wa        45   -121  29.70000000000003 1020.7000000000013 24.700000000000024
 wa        46   -125 29.700000000000045  1020.200000000001 24.600000000000026
 wa        46   -124 29.500000000000046 1020.7000000000008 24.500000000000032
 wa        46   -123 29.800000000000036 1020.0000000000011 24.600000000000026
 wa        46   -122  29.60000000000003  1020.500000000001 24.600000000000023
 wa        46   -121 29.700000000000035 1019.9000000000012 24.400000000000023
 wa        46   -120 29.500000000000036 1020.4000000000012  24.40000000000002
 wa        46   -118 29.900000000000027 1019.5000000000007  24.30000000000001
 wa        47   -125 29.600000000000037 1019.9000000000008  24.20000000000002
 wa        47   -124 29.400000000000027 1020.4000000000009 24.200000000000028
 wa        47   -123 29.700000000000035  1019.500000000001  24.20000000000002
 wa        47   -122 29.400000000000038 1020.0000000000011  24.10000000000003
 wa        47   -121 29.300000000000033 1020.5000000000011 24.000000000000018
 wa        47   -120 29.700000000000024 1019.3000000000011 24.100000000000016
 wa        47   -118 29.400000000000027  1019.600000000001  23.90000000000002
 wa        48   -123  29.20000000000004  1020.100000000001 23.700000000000017
 wa        48   -122 29.000000000000053 1020.6000000000012 23.700000000000024
 wa        48   -121 29.800000000000033 1019.4000000000009  24.10000000000002
 wa        48   -119 29.500000000000036 1019.7000000000014 23.900000000000016
 wa        48   -118 29.200000000000035 1020.2000000000016 23.800000000000026

VerboseFlag is 'true' by default; therefore, rows in which all coefficient values have an absolute value less than 1e-12 do not appear in climate2d_reconstruct.

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