From a39b59b6b4c1d29da96e36c328e8f01ac573ba1d Mon Sep 17 00:00:00 2001 From: Mayur Singal <39544459+ulixius9@users.noreply.github.com> Date: Tue, 30 Jul 2024 10:39:20 +0530 Subject: [PATCH] FIX #17206: Dynaomodb pagination type fix (#17226) --- .../metadata/ingestion/source/database/dynamodb/metadata.py | 4 ++-- .../src/metadata/ingestion/source/database/dynamodb/models.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ingestion/src/metadata/ingestion/source/database/dynamodb/metadata.py b/ingestion/src/metadata/ingestion/source/database/dynamodb/metadata.py index 506e8a5339a..977e941ef76 100644 --- a/ingestion/src/metadata/ingestion/source/database/dynamodb/metadata.py +++ b/ingestion/src/metadata/ingestion/source/database/dynamodb/metadata.py @@ -84,8 +84,8 @@ class DynamodbSource(CommonNoSQLSource): Method to get actual data available within table need to be overridden by sources """ + attributes = [] try: - attributes = [] scan_kwargs = {} done = False start_key = None @@ -103,7 +103,7 @@ class DynamodbSource(CommonNoSQLSource): logger.warning( f"Failed to read DynamoDB attributes for [{table_name}]: {err}" ) - return [] + return attributes def get_source_url( self, diff --git a/ingestion/src/metadata/ingestion/source/database/dynamodb/models.py b/ingestion/src/metadata/ingestion/source/database/dynamodb/models.py index c2f4a7987a9..58e44329282 100644 --- a/ingestion/src/metadata/ingestion/source/database/dynamodb/models.py +++ b/ingestion/src/metadata/ingestion/source/database/dynamodb/models.py @@ -11,7 +11,7 @@ """ DynamoDB Models """ -from typing import Dict, List, Optional +from typing import Any, Dict, List, Optional from pydantic import BaseModel @@ -22,4 +22,4 @@ class TableResponse(BaseModel): """ Items: Optional[List[Dict]] = [] - LastEvaluatedKey: Optional[str] = None + LastEvaluatedKey: Optional[Any] = None