From 36f505571b324f03b56870bd5b5a3441672d9679 Mon Sep 17 00:00:00 2001 From: Matt Kornfield Date: Mon, 5 Feb 2024 21:36:46 -0800 Subject: [PATCH] add barebones schema prepend --- src/gretel_trainer/relational/extractor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gretel_trainer/relational/extractor.py b/src/gretel_trainer/relational/extractor.py index 02fc3baf..129b6605 100644 --- a/src/gretel_trainer/relational/extractor.py +++ b/src/gretel_trainer/relational/extractor.py @@ -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 )