forked from feast-dev/feast
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeastSavedDataset.ts
More file actions
37 lines (34 loc) · 979 Bytes
/
Copy pathfeastSavedDataset.ts
File metadata and controls
37 lines (34 loc) · 979 Bytes
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
import { z } from "zod";
const FeastSavedDatasetSchema = z.object({
spec: z.object({
name: z.string(),
features: z.array(z.string()),
joinKeys: z.array(z.string()),
storage: z.object({
fileStorage: z.object({
fileFormat: z.object({
parquestFormat: z.object({}).optional(),
}),
fileUrl: z.string(),
}),
}),
featureService: z
.object({
spec: z.object({
name: z.string(),
}),
})
.transform((obj) => {
return obj.spec.name;
}),
profile: z.string().optional(),
}),
meta: z.object({
createdTimestamp: z.string().transform((val) => new Date(val)),
minEventTimestamp: z.string().transform((val) => new Date(val)),
maxEventTimestamp: z.string().transform((val) => new Date(val)),
}),
});
type FeastSavedDatasetType = z.infer<typeof FeastSavedDatasetSchema>;
export { FeastSavedDatasetSchema };
export type { FeastSavedDatasetType };