forked from feast-dev/feast
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeastDatasources.ts
More file actions
30 lines (27 loc) · 964 Bytes
/
Copy pathfeastDatasources.ts
File metadata and controls
30 lines (27 loc) · 964 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
import { z } from "zod";
import { FeastFeatureColumnSchema } from "./feastFeatureViews";
const FeastDatasourceSchema = z.object({
type: z.string(),
eventTimestampColumn: z.string().optional(),
createdTimestampColumn: z.string().optional(),
fileOptions: z.object({
uri: z.string().optional(),
}).optional(),
name: z.string(),
description: z.string().optional(),
owner: z.string().optional(),
meta: z.object({
latestEventTimestamp: z.string().transform((val) => new Date(val)),
earliestEventTimestamp: z.string().transform((val) => new Date(val)),
}).optional(),
requestDataOptions: z.object({
schema: z.array(FeastFeatureColumnSchema),
}).optional(),
bigqueryOptions: z.object({
tableRef: z.string().optional(),
dbtModelSerialized: z.string().optional()
}).optional(),
});
type FeastDatasourceType = z.infer<typeof FeastDatasourceSchema>;
export { FeastDatasourceSchema };
export type { FeastDatasourceType };