From dc7fa49aa932fce194bbbf21f89ff899b3ac212f Mon Sep 17 00:00:00 2001 From: Alexandre Brehelin Date: Sun, 4 Dec 2022 18:12:59 +0100 Subject: [PATCH] fix: control pagination response with RedshiftData-api to get column names and types Signed-off-by: Alexandre Brehelin --- sdk/python/feast/infra/offline_stores/redshift_source.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/python/feast/infra/offline_stores/redshift_source.py b/sdk/python/feast/infra/offline_stores/redshift_source.py index d6d51d0310f..4279e6a0687 100644 --- a/sdk/python/feast/infra/offline_stores/redshift_source.py +++ b/sdk/python/feast/infra/offline_stores/redshift_source.py @@ -206,7 +206,8 @@ def get_table_column_names_and_types( client = aws_utils.get_redshift_data_client(config.offline_store.region) if self.table: try: - table = client.describe_table( + paginator = client.get_paginator("describe_table") + response_iterator = paginator.paginate( ClusterIdentifier=config.offline_store.cluster_id, Database=( self.database @@ -217,6 +218,7 @@ def get_table_column_names_and_types( Table=self.table, Schema=self.schema, ) + table = response_iterator.build_full_result() except ClientError as e: if e.response["Error"]["Code"] == "ValidationException": raise RedshiftCredentialsError() from e