TD_OneHotEncodingTransformの例 - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Advanced SQL Engine分析関数

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
2021年7月
Language
日本語
Last Update
2021-09-23
dita:mapPath
ja-JP/wnd1589838592459.ditamap
dita:ditavalPath
ja-JP/ayr1485454803741.ditaval
dita:id
B035-1206
Product Category
Software
Teradata Vantage

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