Skip to content

Commit 463aa13

Browse files
authored
Add detailed status docs (#392)
1 parent a75c5b4 commit 463aa13

File tree

1 file changed

+127
-9
lines changed

1 file changed

+127
-9
lines changed

docs/user_guides/fs/feature_view/feature-server.md

Lines changed: 127 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ In Hopsworks 3.7, we introduced a python client for the Online Store REST API Se
3232
"metadataOptions": {
3333
"featureName": true,
3434
"featureType": true
35+
},
36+
"options": {
37+
"validatePassedFeatures": true,
38+
"includeDetailedStatus": true
3539
}
3640
}
3741
```
@@ -46,6 +50,7 @@ featureViewVersion | number(int) |
4650
entries | objects | Map of serving key of feature view as key and value of serving key as value. Serving key are a set of the primary key of feature groups which are included in the feature view query. If feature groups are joint with prefix, the primary key needs to be attached with prefix.
4751
passedFeatures | objects | Optional. Map of feature name as key and feature value as value. This overwrites feature values in the response.
4852
metadataOptions | objects | Optional. Map of metadataoption as key and boolean as value. Default metadata option is false. Metadata is returned on request. Metadata options available: 1\. featureName 2\. featureType |
53+
options | objects | Optional. Map of option as key and boolean as value. Default option is false. Options available: 1\. validatePassedFeatures 2\. includeDetailedStatus
4954

5055
### Response
5156

@@ -75,7 +80,17 @@ metadataOptions | objects | Optional. Map of metadataoption as key and bo
7580
"featureType": "string"
7681
}
7782
],
78-
"status": "COMPLETE"
83+
"status": "COMPLETE",
84+
"detailedStatus": [
85+
{
86+
"featureGroupId": 1,
87+
"httpStatus": 200,
88+
},
89+
{
90+
"featureGroupId": 2,
91+
"httpStatus": 200,
92+
},
93+
]
7994
}
8095
```
8196

@@ -124,6 +139,66 @@ metadataOptions | objects | Optional. Map of metadataoption as key and bo
124139
}
125140
```
126141

142+
**Detailed Status**
143+
144+
If `includeDetailedStatus` option is set to true, detailed status is returned in the response. Detailed status is a list of feature group id and http status code, corresponding to each read operations perform internally by RonDB. Meaning is as follows:
145+
146+
- `featureGroupId`: Id of the feature group, used to identify which table the operation correspond from.
147+
- `httpStatus`: Http status code of the operation.
148+
* 200 means success
149+
* 400 means bad request, likely pk name is wrong or pk is incomplete. In particular, if pk for this table/feature group is not provided in the request, this http status is returned.
150+
* 404 means no row corresponding to PK
151+
* 500 means internal error.
152+
153+
Both `404` and `400` set the status to `MISSING` in the response. Examples below corresponds respectively to missing row and bad request.
154+
155+
156+
Missing Row: The pk name,value was correctly passed but the corresponding row was not found in the feature group.
157+
```
158+
{
159+
"features": [
160+
36,
161+
"2022-01-24",
162+
null,
163+
null
164+
],
165+
"status": "MISSING",
166+
"detailedStatus": [
167+
{
168+
"featureGroupId": 1,
169+
"httpStatus": 200,
170+
},
171+
{
172+
"featureGroupId": 2,
173+
"httpStatus": 404,
174+
},
175+
]
176+
}
177+
```
178+
179+
Bad Request e.g pk name,value pair for FG2 not provided or the corresponding column names was incorrect.
180+
```
181+
{
182+
"features": [
183+
36,
184+
"2022-01-24",
185+
null,
186+
null
187+
],
188+
"status": "MISSING",
189+
"detailedStatus": [
190+
{
191+
"featureGroupId": 1,
192+
"httpStatus": 200,
193+
},
194+
{
195+
"featureGroupId": 2,
196+
"httpStatus": 400,
197+
},
198+
]
199+
}
200+
```
201+
127202
## Batch feature vectors
128203

129204
### Request
@@ -159,6 +234,10 @@ metadataOptions | objects | Optional. Map of metadataoption as key and bo
159234
"metadataOptions": {
160235
"featureName": true,
161236
"featureType": true
237+
},
238+
"options": {
239+
"validatePassedFeatures": true,
240+
"includeDetailedStatus": true
162241
}
163242
}
164243
```
@@ -173,11 +252,13 @@ featureViewVersion | number(int) |
173252
entries | `array<objects>` | Each items is a map of serving key as key and value of serving key as value. Serving key of feature view.
174253
passedFeatures | `array<objects>` | Optional. Each items is a map of feature name as key and feature value as value. This overwrites feature values in the response. If provided, its size and order has to be equal to the size of entries. Item can be null.
175254
metadataOptions | objects | Optional. Map of metadataoption as key and boolean as value. Default metadata option is false. Metadata is returned on request. Metadata options available: 1\. featureName 2\. featureType
255+
options | objects | Optional. Map of option as key and boolean as value. Default option is false. Options available: 1\. validatePassedFeatures 2\. includeDetailedStatus
176256

177257
### Response
178258

179259
```
180260
{
261+
{
181262
"features": [
182263
[
183264
16,
@@ -193,9 +274,9 @@ metadataOptions | objects | Optional. Map of metadataoption as key a
193274
],
194275
[
195276
71,
196-
"2022-01-22",
197-
"int3",
198-
"str97"
277+
null,
278+
null,
279+
null
199280
],
200281
[
201282
48,
@@ -231,9 +312,31 @@ metadataOptions | objects | Optional. Map of metadataoption as key a
231312
"status": [
232313
"COMPLETE",
233314
"COMPLETE",
234-
"COMPLETE",
315+
"MISSING",
235316
"COMPLETE",
236317
"COMPLETE"
318+
],
319+
"detailedStatus": [
320+
[{
321+
"featureGroupId": 1,
322+
"httpStatus": 200,
323+
}],
324+
[{
325+
"featureGroupId": 1,
326+
"httpStatus": 200,
327+
}],
328+
[{
329+
"featureGroupId": 1,
330+
"httpStatus": 404,
331+
}],
332+
[{
333+
"featureGroupId": 1,
334+
"httpStatus": 200,
335+
}],
336+
[{
337+
"featureGroupId": 1,
338+
"httpStatus": 200,
339+
}]
237340
]
238341
}
239342
```
@@ -246,6 +349,7 @@ note: Order of the returned features are the same as the order of entries in the
246349
-------- | ------------------------------------- | ------------------------------------
247350
200 | |
248351
400 | Requested metadata does not exist |
352+
404 | Missing row corresponding to pk value |
249353
401 | Access denied | Access unshared feature store failed
250354
500 | Failed to read feature store metadata |
251355

@@ -263,16 +367,30 @@ note: Order of the returned features are the same as the order of entries in the
263367
null,
264368
[
265369
51,
266-
"id51",
267-
"2022-01-10 00:00:00",
268-
49
370+
null,
371+
null,
372+
null,
269373
]
270374
],
271375
"metadata": null,
272376
"status": [
273377
"COMPLETE",
274378
"ERROR",
275-
"COMPLETE"
379+
"MISSING"
380+
],
381+
"detailedStatus": [
382+
[{
383+
"featureGroupId": 1,
384+
"httpStatus": 200,
385+
}],
386+
[{
387+
"featureGroupId": 1,
388+
"httpStatus": 400,
389+
}],
390+
[{
391+
"featureGroupId": 1,
392+
"httpStatus": 404,
393+
}]
276394
]
277395
}
278396
```

0 commit comments

Comments
 (0)