MCPcopy Create free account
hub / github.com/feast-dev/feast / update

Method update

sdk/python/feast/infra/online_stores/sqlite.py:291–315  ·  view source on GitHub ↗
(
        self,
        config: RepoConfig,
        tables_to_delete: Sequence[FeatureView],
        tables_to_keep: Sequence[FeatureView],
        entities_to_delete: Sequence[Entity],
        entities_to_keep: Sequence[Entity],
        partial: bool,
    )

Source from the content-addressed store, hash-verified

289 return result
290
291 def update(
292 self,
293 config: RepoConfig,
294 tables_to_delete: Sequence[FeatureView],
295 tables_to_keep: Sequence[FeatureView],
296 entities_to_delete: Sequence[Entity],
297 entities_to_keep: Sequence[Entity],
298 partial: bool,
299 ):
300 conn = self._get_conn(config)
301 project = config.project
302
303 versioning = config.registry.enable_online_feature_view_versioning
304 for table in tables_to_keep:
305 conn.execute(
306 f"CREATE TABLE IF NOT EXISTS {_table_id(project, table, versioning)} (entity_key BLOB, feature_name TEXT, value BLOB, vector_value BLOB, event_ts timestamp, created_ts timestamp, PRIMARY KEY(entity_key, feature_name))"
307 )
308 conn.execute(
309 f"CREATE INDEX IF NOT EXISTS {_table_id(project, table, versioning)}_ek ON {_table_id(project, table, versioning)} (entity_key);"
310 )
311
312 for table in tables_to_delete:
313 conn.execute(
314 f"DROP TABLE IF EXISTS {_table_id(project, table, versioning)}"
315 )
316
317 def plan(
318 self, config: RepoConfig, desired_registry_proto: RegistryProto

Callers

nothing calls this directly

Calls 3

_get_connMethod · 0.95
_table_idFunction · 0.70
executeMethod · 0.45

Tested by

no test coverage detected