feast-dev / feast

The Open Source Feature Store for Machine Learning
https://feast.dev
Apache License 2.0
5.61k stars 999 forks source link

KeyError exception on materialize-incremental with Postgres as offline store #3467

Closed pewpewp3w closed 1 year ago

pewpewp3w commented 1 year ago

Expected Behavior

Current Behavior

 Traceback (most recent call last):
  File "/usr/local/bin/feast", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/feast/cli.py", line 606, in materialize_incremental_command
    store.materialize_incremental(
  File "/usr/local/lib/python3.10/site-packages/feast/usage.py", line 294, in wrapper
    raise exc.with_traceback(traceback)
  File "/usr/local/lib/python3.10/site-packages/feast/usage.py", line 283, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/feast/feature_store.py", line 1282, in materialize_incremental
    feature_views_to_materialize = self._get_feature_views_to_materialize(
  File "/usr/local/lib/python3.10/site-packages/feast/feature_store.py", line 642, in _get_feature_views_to_materialize
    feature_views_to_materialize = self._list_feature_views(
  File "/usr/local/lib/python3.10/site-packages/feast/feature_store.py", line 288, in _list_feature_views
    for fv in self._registry.list_feature_views(
  File "/usr/local/lib/python3.10/site-packages/feast/infra/registry/registry.py", line 576, in list_feature_views
    feature_views.append(FeatureView.from_proto(feature_view_proto))
  File "/usr/local/lib/python3.10/site-packages/typeguard/__init__.py", line 1033, in wrapper
    retval = func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/feast/feature_view.py", line 377, in from_proto
    batch_source = DataSource.from_proto(feature_view_proto.spec.batch_source)
  File "/usr/local/lib/python3.10/site-packages/typeguard/__init__.py", line 1033, in wrapper
    retval = func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/feast/data_source.py", line 301, in from_proto
    return cls.from_proto(data_source)
  File "/usr/local/lib/python3.10/site-packages/typeguard/__init__.py", line 1033, in wrapper
    retval = func(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/feast/infra/offline_stores/contrib/postgres_offline_store/postgres_source.py", line 77, in from_proto
    table=postgres_options["table"],
KeyError: 'table' 

Steps to reproduce

With feast v0.24.0 or higher, define source as

source = PostgreSQLSource(
    name="pg_source",
    query=query,
    timestamp_field="time",
    created_timestamp_column="created_at",
)

run feast materialize-incremental

Specifications

Possible Solution

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

srausser commented 5 months ago

looks like deleting the feast registry and reapplying solved the issue.