You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fetching historical feature values by passing sql as entity_df #3234
feature_view = self.feature_store.get_feature_view(fq.feature_view_name)
entity = self.feature_store.get_entity(feature_view.entities[0])
features = [f"{feature_view.name}:{f.name}" for f in feature_view.features]
batch_source: MsSqlServerSource = feature_view.batch_source
entity_df = f"select {entity.join_key}, {feature_view.batch_source.timestamp_field} as event_timestamp from [dbo].{batch_source.table_ref} where {batch_source.timestamp_field} between '{fq.from_date}' and '{fq.to_date}'"
feature_service = self.feature_store.get_feature_service("test_service_1")
job = self.feature_store.get_historical_features(
entity_df=entity_df, features=feature_service
)
df = job.to_df()
I encountered a similar issue where the insertion operation defaults the string column in an entity table with varchar(1) which violates the length check.
I believe this might have been just an incorrect gate. The other offline stores allow for this and it seemed to work in the old version. We should be able to re-enable this and fix any tests that are failing as a result
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.
Activity
Nevermind-s commentedon Dec 8, 2022
Any news on this one?
amommendes commentedon Jan 6, 2023
Seems to me this is an implementation decision and not a bug (whether introduced or not), then this could be a feature request... The old version ran a
SELECT INTOfrom sql string in the entity tabletsenhungwu commentedon Feb 8, 2023
I encountered a similar issue where the insertion operation defaults the string column in an entity table with varchar(1) which violates the length check.
adchia commentedon Feb 8, 2023
I believe this might have been just an incorrect gate. The other offline stores allow for this and it seemed to work in the old version. We should be able to re-enable this and fix any tests that are failing as a result
stale commentedon Jun 10, 2023
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.