17.10 - TD_OneHotEncodingTransformの例 - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Advanced SQL Engine分析関数

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
2021年7月
Content Type
プログラミング リファレンス
Publication ID
B035-1206-171K-JPN
Language
日本語 (日本)

SQL呼び出し

SELECT * FROM TD_OneHotEncodingTransform (
  ON onehotencoding_input AS InputTable PARTITION BY ANY
  ON onehotencodingfit_output AS FitTable DIMENSION
  USING
  IsInputDense ('true')
) AS dt;

出力

 Passenger Survived Pclass Name               Age Sex_male Sex_female Sex_other 
 --------- -------- ------ ------------------ --- -------- ---------- --------- 
         1        0      3 Mr. Owen Harris     22        1          0         0
         4        0      3 Mrs. Jacques Heath  35        0          1         0
         3        1      3 Mrs. Laina          26        0          1         0
         2        1      1 Mrs. John Bradley   38        0          1         0