-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathFeatureEngineeringAPI.java
More file actions
executable file
·183 lines (155 loc) · 5.99 KB
/
FeatureEngineeringAPI.java
File metadata and controls
executable file
·183 lines (155 loc) · 5.99 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
package com.databricks.sdk.service.ml;
import com.databricks.sdk.core.ApiClient;
import com.databricks.sdk.support.Generated;
import com.databricks.sdk.support.Paginator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/** [description] */
@Generated
public class FeatureEngineeringAPI {
private static final Logger LOG = LoggerFactory.getLogger(FeatureEngineeringAPI.class);
private final FeatureEngineeringService impl;
/** Regular-use constructor */
public FeatureEngineeringAPI(ApiClient apiClient) {
impl = new FeatureEngineeringImpl(apiClient);
}
/** Constructor for mocks */
public FeatureEngineeringAPI(FeatureEngineeringService mock) {
impl = mock;
}
/** Batch create materialized features. */
public BatchCreateMaterializedFeaturesResponse batchCreateMaterializedFeatures(
BatchCreateMaterializedFeaturesRequest request) {
return impl.batchCreateMaterializedFeatures(request);
}
/** Create a Feature. */
public Feature createFeature(CreateFeatureRequest request) {
return impl.createFeature(request);
}
/**
* Create a Kafka config. During PrPr, Kafka configs can be read and used when creating features
* under the entire metastore. Only the creator of the Kafka config can delete it.
*/
public KafkaConfig createKafkaConfig(CreateKafkaConfigRequest request) {
return impl.createKafkaConfig(request);
}
/** Create a materialized feature. */
public MaterializedFeature createMaterializedFeature(CreateMaterializedFeatureRequest request) {
return impl.createMaterializedFeature(request);
}
public void deleteFeature(String fullName) {
deleteFeature(new DeleteFeatureRequest().setFullName(fullName));
}
/** Delete a Feature. */
public void deleteFeature(DeleteFeatureRequest request) {
impl.deleteFeature(request);
}
public void deleteKafkaConfig(String name) {
deleteKafkaConfig(new DeleteKafkaConfigRequest().setName(name));
}
/**
* Delete a Kafka config. During PrPr, Kafka configs can be read and used when creating features
* under the entire metastore. Only the creator of the Kafka config can delete it.
*/
public void deleteKafkaConfig(DeleteKafkaConfigRequest request) {
impl.deleteKafkaConfig(request);
}
public void deleteMaterializedFeature(String materializedFeatureId) {
deleteMaterializedFeature(
new DeleteMaterializedFeatureRequest().setMaterializedFeatureId(materializedFeatureId));
}
/** Delete a materialized feature. */
public void deleteMaterializedFeature(DeleteMaterializedFeatureRequest request) {
impl.deleteMaterializedFeature(request);
}
public Feature getFeature(String fullName) {
return getFeature(new GetFeatureRequest().setFullName(fullName));
}
/** Get a Feature. */
public Feature getFeature(GetFeatureRequest request) {
return impl.getFeature(request);
}
public KafkaConfig getKafkaConfig(String name) {
return getKafkaConfig(new GetKafkaConfigRequest().setName(name));
}
/**
* Get a Kafka config. During PrPr, Kafka configs can be read and used when creating features
* under the entire metastore. Only the creator of the Kafka config can delete it.
*/
public KafkaConfig getKafkaConfig(GetKafkaConfigRequest request) {
return impl.getKafkaConfig(request);
}
public MaterializedFeature getMaterializedFeature(String materializedFeatureId) {
return getMaterializedFeature(
new GetMaterializedFeatureRequest().setMaterializedFeatureId(materializedFeatureId));
}
/** Get a materialized feature. */
public MaterializedFeature getMaterializedFeature(GetMaterializedFeatureRequest request) {
return impl.getMaterializedFeature(request);
}
/** List Features. */
public Iterable<Feature> listFeatures(ListFeaturesRequest request) {
return new Paginator<>(
request,
impl::listFeatures,
ListFeaturesResponse::getFeatures,
response -> {
String token = response.getNextPageToken();
if (token == null || token.isEmpty()) {
return null;
}
return request.setPageToken(token);
});
}
/**
* List Kafka configs. During PrPr, Kafka configs can be read and used when creating features
* under the entire metastore. Only the creator of the Kafka config can delete it.
*/
public Iterable<KafkaConfig> listKafkaConfigs(ListKafkaConfigsRequest request) {
return new Paginator<>(
request,
impl::listKafkaConfigs,
ListKafkaConfigsResponse::getKafkaConfigs,
response -> {
String token = response.getNextPageToken();
if (token == null || token.isEmpty()) {
return null;
}
return request.setPageToken(token);
});
}
/** List materialized features. */
public Iterable<MaterializedFeature> listMaterializedFeatures(
ListMaterializedFeaturesRequest request) {
return new Paginator<>(
request,
impl::listMaterializedFeatures,
ListMaterializedFeaturesResponse::getMaterializedFeatures,
response -> {
String token = response.getNextPageToken();
if (token == null || token.isEmpty()) {
return null;
}
return request.setPageToken(token);
});
}
/** Update a Feature. */
public Feature updateFeature(UpdateFeatureRequest request) {
return impl.updateFeature(request);
}
/**
* Update a Kafka config. During PrPr, Kafka configs can be read and used when creating features
* under the entire metastore. Only the creator of the Kafka config can delete it.
*/
public KafkaConfig updateKafkaConfig(UpdateKafkaConfigRequest request) {
return impl.updateKafkaConfig(request);
}
/** Update a materialized feature (pause/resume). */
public MaterializedFeature updateMaterializedFeature(UpdateMaterializedFeatureRequest request) {
return impl.updateMaterializedFeature(request);
}
public FeatureEngineeringService impl() {
return impl;
}
}