10
10
from sqlalchemy import ( # type: ignore
11
11
BigInteger ,
12
12
Column ,
13
+ Index ,
13
14
LargeBinary ,
14
15
MetaData ,
15
16
String ,
82
83
Column ("project_proto" , LargeBinary , nullable = False ),
83
84
)
84
85
86
+ Index ("idx_projects_project_id" , projects .c .project_id )
87
+
85
88
entities = Table (
86
89
"entities" ,
87
90
metadata ,
91
94
Column ("entity_proto" , LargeBinary , nullable = False ),
92
95
)
93
96
97
+ Index ("idx_entities_project_id" , entities .c .project_id )
98
+
94
99
data_sources = Table (
95
100
"data_sources" ,
96
101
metadata ,
100
105
Column ("data_source_proto" , LargeBinary , nullable = False ),
101
106
)
102
107
108
+ Index ("idx_data_sources_project_id" , data_sources .c .project_id )
109
+
103
110
feature_views = Table (
104
111
"feature_views" ,
105
112
metadata ,
111
118
Column ("user_metadata" , LargeBinary , nullable = True ),
112
119
)
113
120
121
+ Index ("idx_feature_views_project_id" , feature_views .c .project_id )
122
+
114
123
stream_feature_views = Table (
115
124
"stream_feature_views" ,
116
125
metadata ,
121
130
Column ("user_metadata" , LargeBinary , nullable = True ),
122
131
)
123
132
133
+ Index ("idx_stream_feature_views_project_id" , stream_feature_views .c .project_id )
134
+
124
135
on_demand_feature_views = Table (
125
136
"on_demand_feature_views" ,
126
137
metadata ,
131
142
Column ("user_metadata" , LargeBinary , nullable = True ),
132
143
)
133
144
145
+ Index ("idx_on_demand_feature_views_project_id" , on_demand_feature_views .c .project_id )
146
+
134
147
feature_services = Table (
135
148
"feature_services" ,
136
149
metadata ,
140
153
Column ("feature_service_proto" , LargeBinary , nullable = False ),
141
154
)
142
155
156
+ Index ("idx_feature_services_project_id" , feature_services .c .project_id )
157
+
143
158
saved_datasets = Table (
144
159
"saved_datasets" ,
145
160
metadata ,
149
164
Column ("saved_dataset_proto" , LargeBinary , nullable = False ),
150
165
)
151
166
167
+ Index ("idx_saved_datasets_project_id" , saved_datasets .c .project_id )
168
+
152
169
validation_references = Table (
153
170
"validation_references" ,
154
171
metadata ,
157
174
Column ("last_updated_timestamp" , BigInteger , nullable = False ),
158
175
Column ("validation_reference_proto" , LargeBinary , nullable = False ),
159
176
)
177
+ Index ("idx_validation_references_project_id" , validation_references .c .project_id )
160
178
161
179
managed_infra = Table (
162
180
"managed_infra" ,
167
185
Column ("infra_proto" , LargeBinary , nullable = False ),
168
186
)
169
187
188
+ Index ("idx_managed_infra_project_id" , managed_infra .c .project_id )
189
+
170
190
permissions = Table (
171
191
"permissions" ,
172
192
metadata ,
176
196
Column ("permission_proto" , LargeBinary , nullable = False ),
177
197
)
178
198
199
+ Index ("idx_permissions_project_id" , permissions .c .project_id )
200
+
179
201
180
202
class FeastMetadataKeys (Enum ):
181
203
LAST_UPDATED_TIMESTAMP = "last_updated_timestamp"
@@ -191,6 +213,8 @@ class FeastMetadataKeys(Enum):
191
213
Column ("last_updated_timestamp" , BigInteger , nullable = False ),
192
214
)
193
215
216
+ Index ("idx_feast_metadata_project_id" , feast_metadata .c .project_id )
217
+
194
218
logger = logging .getLogger (__name__ )
195
219
196
220
0 commit comments