Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 6a61c06

Browse files
committed
Support querying view schema on Redshift
1 parent 4c3bb93 commit 6a61c06

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

sqeleton/databases/redshift.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ def query_pg_get_cols(self, path: DbPath) -> Dict[str, tuple]:
130130
if len(type_info) > 1:
131131
if base_type == 'numeric':
132132
precision, scale = type_info[1][:-1].split(',')
133+
precision = int(precision)
134+
scale = int(scale)
133135

134136
out = [col_name, base_type, None, precision, scale]
135137
output[col_name] = tuple(out)
@@ -140,10 +142,7 @@ def query_table_schema(self, path: DbPath) -> Dict[str, tuple]:
140142
try:
141143
return super().query_table_schema(path)
142144
except RuntimeError:
143-
try:
144-
return self.query_external_table_schema(path)
145-
except RuntimeError:
146-
return self.query_pg_get_cols()
145+
return self.query_external_table_schema(path)
147146

148147
def _normalize_table_path(self, path: DbPath) -> DbPath:
149148
if len(path) == 1:

0 commit comments

Comments
 (0)