/
CreateDB.sql
95 lines (90 loc) · 3.09 KB
/
CreateDB.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
---create database teddybank as perm=1000000000;
SET session database teddybank;
CREATE TABLE Hyperparameters(id INTEGER not null, name Varchar(100),json_hyperparameters JSON(165535)) PRIMARY INDEX (id);
INSERT INTO Hyperparameters values(1, 'TD_BincodeFit', '{
"db": "teddybank",
"inputtable": "onehot_titanic_dataset",
"dimensiontable": "bc_dimensionTable",
"output_table": "abc",
"output_table_type": "VOLATILE",
"TargetColumns": "''age''",
"MethodType": "''equal-width''",
"NBins": "3",
"LabelPrefix": "''separate prefix values''",
"MinValueColumn": "''MinValue_''",
"MaxValueCOlumn": "''MaxValue_''",
"LabelColumn": "''Label''",
"TargetColNames": "''ColumnName''"
}');
INSERT INTO Hyperparameters values(2, 'TD_OneHotEncodingFit', '{
"db": "teddybank",
"inputtable": "customers",
"inputtable_type": "Q",
"dimensiontable_type": "",
"dimensiontable": "ohe_dimensionTable",
"IsInputDense": "''true''",
"TargetColumn": "''gender'',''state_code'',''acct_type''",
"OtherColumnName": "",
"CategoricalValues": "''a'',''b''",
"Approach": "''List''",
"CategoryCounts": "2,6,3",
"TargetColumnNames": "''column_name''",
"CategoriesColumn": "''category''",
"TargetAttributes": "",
"AttributeColumn": "",
"ValueColumn": "",
"cat_table": "",
"fit_partition": ""
}');
INSERT INTO Hyperparameters values(3, 'TD_OneHotEncodingTransform', '{
"db": "EFS",
"inputtable": "customers",
"inputtable_type": "Q",
"IsDimension": "''true''",
"IsInputDense": "''true''",
"partition_fittable": "",
"partition_inputtable": "",
"fittable": "",
"fittable_type": "Q"
}');
INSERT INTO Hyperparameters values(4, 'TD_OneHotEncodingFit', '{
"db": "EFS",
"inputtable": "accounts",
"dimensiontable": "",
"IsInputDense": "''true''",
"TargetColumn": "''acct_type''",
"OtherColumnName": "''other''",
"CategoricalValues": "''a'',''b''",
"Approach": "''Auto''",
"CategoryCounts": "6",
"TargetColumnNames": "''column_name''",
"CategoriesColumn": "''category''",
"TargetAttributes": "",
"AttributeColumn": "",
"ValueColumn": "",
"cat_table": "",
"fit_partition": ""
}');
INSERT INTO Hyperparameters values(5, 'TD_OneHotEncodingTransform', '{
"db": "EFS",
"inputtable": "accounts",
"inputtable_type": "",
"IsDimension": "''true''",
"IsInputDense": "''true''",
"partition_fittable": "",
"partition_inputtable": "",
"fittable": "",
"fittable_type": ""
}');
create table ohe_dimensionTable (column_name VARCHAR(20) CHARACTER SET Latin NOT CASESPECIFIC,
category VARCHAR(20) CHARACTER SET Latin NOT CASESPECIFIC);
insert into ohe_dimensionTable values('gender','F');
insert into ohe_dimensionTable values('gender','M');
insert into ohe_dimensionTable values('state_code','a');
insert into ohe_dimensionTable values('state_code','b');
insert into ohe_dimensionTable values('state_code','c');
insert into ohe_dimensionTable values('state_code','a');
insert into ohe_dimensionTable values('state_code','b');
insert into ohe_dimensionTable values('state_code','c');
insert into ohe_dimensionTable values('acct_type','Del');
insert into ohe_dimensionTable values('acct_type','Hyd');