1.1 - 8.10 - Pack_MLE Example: Nondefault Values - 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)

Input

SQL Call

Delimiter and IncludeColumnName have nondefault values.

SELECT row_id, cast(packed_data as varchar(100)), sn 
FROM Pack_MLE(
ON ville_temperature
USING
Delimiter('|')
OutputColumn('packed_data')
IncludeColumnName('false')
TargetColumns('city', 'state', 'period', 'temp_F')
) as dt ORDER BY sn;

Output

Virtual columns are separated by pipe characters and not labeled with their column names.

 row_id packed_data                                  sn 
 ------ -------------------------------------------- -- 
      5 nashville|tennessee|2010-01-01 00:00:00|35.1  1
      7 nashville|tennessee|2010-01-01 01:00:00|36.2  2
      4 nashville|tennessee|2010-01-01 02:00:00|34.5  3
      2 nashville|tennessee|2010-01-01 03:00:00|33.6  4
      3 nashville|tennessee|2010-01-01 04:00:00|33.1  5
      3 knoxville|tennessee|2010-01-01 03:00:00|33.2  6
      1 knoxville|tennessee|2010-01-01 04:00:00|32.8  7
      6 knoxville|tennessee|2010-01-01 05:00:00|32.4  8
      1 knoxville|tennessee|2010-01-01 06:00:00|32.2  9
      2 knoxville|tennessee|2010-01-01 07:00:00|32.4 10

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