diff --git a/py-denormalized/python/denormalized/feast_data_stream.py b/py-denormalized/python/denormalized/feast_data_stream.py index 395f63f..728d376 100644 --- a/py-denormalized/python/denormalized/feast_data_stream.py +++ b/py-denormalized/python/denormalized/feast_data_stream.py @@ -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)