Skip to content

Commit

Permalink
fix: Get all columns with describe table method from RedshiftData-api (
Browse files Browse the repository at this point in the history
  • Loading branch information
beubeu13220 authored Dec 14, 2022
1 parent 7b160c7 commit fd97254
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdk/python/feast/infra/offline_stores/redshift_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit fd97254

Please sign in to comment.