Skip to content

Commit

Permalink
add barebones schema prepend
Browse files Browse the repository at this point in the history
  • Loading branch information
mckornfield committed Feb 6, 2024
1 parent ac54417 commit 36f5055
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gretel_trainer/relational/extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,9 @@ def _sample_table(
if self._config.entire_table:
logger.debug(f"Extracting entire table: {table_name}")
with engine.connect() as conn:
if schema:
# prepend schema if not in the name
table_name = f"{schema}.{table_name}"
df_iter = pd.read_sql_table(
table_name, conn, chunksize=self._chunk_size
)
Expand Down

0 comments on commit 36f5055

Please sign in to comment.