Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add online_read_async for dynamodb #4244

Merged
merged 16 commits into from
Jun 5, 2024
Prev Previous commit
Next Next commit
format
Signed-off-by: robhowley <rhowley@seatgeek.com>
  • Loading branch information
robhowley committed May 31, 2024
commit 6b178bbbf2ad5942583268a7098446ddcabc6753
8 changes: 5 additions & 3 deletions sdk/python/feast/infra/online_stores/dynamodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@

try:
import boto3
from aiobotocore import session
from botocore.config import Config
from botocore.exceptions import ClientError
from aiobotocore import session
except ImportError as e:
from feast.errors import FeastExtrasDependencyImportError

Expand Down Expand Up @@ -208,7 +208,9 @@ def online_write_batch(
)
self._write_batch_non_duplicates(table_instance, data, progress, config)

def _read_batches(self, online_config, entity_ids, table_name, batch_get_item) -> List[Tuple[Optional[datetime], Optional[Dict[str, ValueProto]]]]:
def _read_batches(
self, online_config, entity_ids, table_name, batch_get_item
) -> List[Tuple[Optional[datetime], Optional[Dict[str, ValueProto]]]]:
result: List[Tuple[Optional[datetime], Optional[Dict[str, ValueProto]]]] = []

batch_size = online_config.batch_size
Expand Down Expand Up @@ -335,7 +337,7 @@ async def online_read_async(
online_config,
entity_ids,
_get_table_name(online_config, config, table),
client.batch_get_item
client.batch_get_item,
)

def _get_aioboto_session(self):
Expand Down