Skip to content

Commit

Permalink
fix: index out of range error in feast integration
Browse files Browse the repository at this point in the history
  • Loading branch information
emgeee committed Dec 9, 2024
1 parent d5a056c commit 72e4525
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions py-denormalized/python/denormalized/feast_data_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,11 @@ def write_feast_feature(
"""

def _sink_to_feast(rb: pa.RecordBatch):
df = rb.to_pandas()
try:
feature_store.push(source_name, df, to=PushMode.ONLINE)
except Exception as e:
print(e)
if len(rb):
df = rb.to_pandas()
try:
feature_store.push(source_name, df, to=PushMode.ONLINE)
except Exception as e:
print(e)

self.ds.sink_python(_sink_to_feast)

0 comments on commit 72e4525

Please sign in to comment.