◐ Shell
reader mode source ↗
Skip to content
Merged
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
Tuple,
)

from ikvpy.client import IKVReader, IKVWriter
from ikvpy.clientoptions import ClientOptions, ClientOptionsBuilder
from ikvpy.document import IKVDocument, IKVDocumentBuilder
Expand Down Expand Up @@ -162,7 +164,9 @@ def _decode_fields_for_primary_key(
dt: Optional[datetime] = None
dt_bytes = next(value_iter)
if dt_bytes:
dt = datetime.fromisoformat(str(dt_bytes, "utf-8"))

# decode other features
features = {}
Expand Down Expand Up @@ -252,12 +256,17 @@ def _create_document(
"""Converts feast key-value pairs into an IKV document."""

# initialie builder by inserting primary key and row creation timestamp
event_timestamp_str: str = utils.make_tzaware(event_timestamp).isoformat()
builder = (
IKVDocumentBuilder()
.put_string_field(PRIMARY_KEY_FIELD_NAME, entity_id)
.put_bytes_field(
EVENT_CREATION_TIMESTAMP_FIELD_NAME, event_timestamp_str.encode("utf-8")
)
)

Expand Down
Toggle all file notes Toggle all file annotations