Skip to content

Commit

Permalink
Merge pull request #166 from ExpediaGroup/reuse_connections
Browse files Browse the repository at this point in the history
fix: Reuse online store for materialization writes
  • Loading branch information
omirandadev authored Jan 31, 2025
2 parents 9b70f4b + 891ab12 commit b5f14f2
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ def _map_by_partition(
iterator,
spark_serialized_artifacts: _SparkSerializedArtifacts,
):
feature_view, online_store, repo_config = spark_serialized_artifacts.unserialize()
"""Load pandas df to online store"""
for pdf in iterator:
pdf_row_count = pdf.shape[0]
Expand All @@ -244,13 +245,6 @@ def _map_by_partition(

table = pyarrow.Table.from_pandas(pdf)

# unserialize artifacts
(
feature_view,
online_store,
repo_config,
) = spark_serialized_artifacts.unserialize()

if feature_view.batch_source.field_mapping is not None:
# Spark offline store does the field mapping during pull_latest_from_table_or_query
# This is for the case where the offline store is not spark
Expand Down

0 comments on commit b5f14f2

Please sign in to comment.