Skip to content

Commit

Permalink
fix: Buggy SQL for postgres source (#3424)
Browse files Browse the repository at this point in the history
* Fix get_table_column_names_and_types for postgres source

Signed-off-by: Dimitris Stafylarakis <xanias@gmail.com>

* make linter happy

Signed-off-by: Dimitris Stafylarakis <xanias@gmail.com>

Signed-off-by: Dimitris Stafylarakis <xanias@gmail.com>
  • Loading branch information
xaniasd authored Jan 15, 2023
1 parent ecb7950 commit 1ea100e
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ def get_table_column_names_and_types(
self, config: RepoConfig
) -> Iterable[Tuple[str, str]]:
with _get_conn(config.offline_store) as conn, conn.cursor() as cur:
cur.execute(
f"SELECT * FROM ({self.get_table_query_string()}) AS sub LIMIT 0"
)
cur.execute(f"SELECT * FROM {self.get_table_query_string()} AS sub LIMIT 0")
return (
(c.name, pg_type_code_to_pg_type(c.type_code)) for c in cur.description
)
Expand Down

0 comments on commit 1ea100e

Please sign in to comment.