◐ Shell
clean mode source ↗

fix: Fix for materializing entityless feature views in Snowflake by JohnLemmonMedely · Pull Request #3961 · feast-dev/feast

@JohnLemmonMedely

What this PR does / why we need it: When using an entityless featureview with a Snowflake offline store it fails to materialize correctly.

Which issue(s) this PR fixes:

Fixes #3960

Signed-off-by: john.lemmon <john.lemmon@medely.com>

JohnLemmonMedely

Comment on lines -277 to +281

if feature_view.entity_columns:
if (
feature_view.entity_columns[0].name == DUMMY_ENTITY_ID
): # entityless Feature View's placeholder entity
entities_to_write = 1
else:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Entityless feature views do have an entity column, it's just that it's a dummy value.

@JohnLemmonMedely JohnLemmonMedely changed the title Fix for entityless feature views in Snowflake fix: Fix for materializing entityless feature views in Snowflake

Feb 21, 2024

@franciscojavierarceo

@JohnLemmonMedely can you provide more context on this one? Do we support entityless feature views outside of this? Or is this a bit of a hack?

@JohnLemmonMedely

@JohnLemmonMedely can you provide more context on this one? Do we support entityless feature views outside of this? Or is this a bit of a hack?

Yes, I hit this bug when setting up a feature view like this. It looks like the documentation calls this "Feature views without entities" but the code refers to it as "entityless feature views".

In this case the original code was checking for an entityless feature view by checking if entity_columns is truthy. I'm not sure if this was once a valid check or not but today in Feast entityless feature views are given a dummy entity_column instead.

@JohnLemmonMedely

@franciscojavierarceo Does my above comment answer your question? Anything else I need to do before merging this in?

franciscojavierarceo

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this lgtm. your pr title lint failed

@JohnLemmonMedely

this lgtm. your pr title lint failed

Thanks @franciscojavierarceo, I think I fixed the PR title earlier so the check is passing now.

tqtensor pushed a commit to tqtensor/feast that referenced this pull request

Mar 11, 2024