Skip to content

Commit dc7fa49

Browse files
beubeu13220adchia
authored andcommitted
fix: control pagination response with RedshiftData-api to get column names and types
Signed-off-by: Alexandre Brehelin <alexandre.brehelin@needelp.com>
1 parent 8090e2a commit dc7fa49

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sdk/python/feast/infra/offline_stores/redshift_source.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ def get_table_column_names_and_types(
206206
client = aws_utils.get_redshift_data_client(config.offline_store.region)
207207
if self.table:
208208
try:
209-
table = client.describe_table(
209+
paginator = client.get_paginator("describe_table")
210+
response_iterator = paginator.paginate(
210211
ClusterIdentifier=config.offline_store.cluster_id,
211212
Database=(
212213
self.database
@@ -217,6 +218,7 @@ def get_table_column_names_and_types(
217218
Table=self.table,
218219
Schema=self.schema,
219220
)
221+
table = response_iterator.build_full_result()
220222
except ClientError as e:
221223
if e.response["Error"]["Code"] == "ValidationException":
222224
raise RedshiftCredentialsError() from e

0 commit comments

Comments
 (0)