From c224dd6650285325913454f7c03b824b8aa7210d Mon Sep 17 00:00:00 2001 From: Eduardo Lauer Date: Fri, 25 Oct 2024 16:07:53 -0300 Subject: [PATCH 1/2] add variable --- fastetl/hooks/db_to_db_hook.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fastetl/hooks/db_to_db_hook.py b/fastetl/hooks/db_to_db_hook.py index ffc1771..4a0845f 100644 --- a/fastetl/hooks/db_to_db_hook.py +++ b/fastetl/hooks/db_to_db_hook.py @@ -40,6 +40,7 @@ def full_copy( destination_truncate=destination_truncate, chunksize=chunksize, copy_table_comments=copy_table_comments, + debug_mode=debug_mode, ) def incremental_copy( @@ -70,4 +71,5 @@ def incremental_copy( sync_exclusions=sync_exclusions, chunksize=chunksize, copy_table_comments=copy_table_comments, + debug_mode=debug_mode, ) From d6d8a3a22a5f56a20554a39a1830ad981f83da60 Mon Sep 17 00:00:00 2001 From: Eduardo Lauer Date: Fri, 25 Oct 2024 16:11:08 -0300 Subject: [PATCH 2/2] add logging if debug true --- fastetl/custom_functions/fast_etl.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fastetl/custom_functions/fast_etl.py b/fastetl/custom_functions/fast_etl.py index 8a76ffc..d5cdb56 100644 --- a/fastetl/custom_functions/fast_etl.py +++ b/fastetl/custom_functions/fast_etl.py @@ -259,6 +259,8 @@ def copy_db_to_db( Return: None """ + if debug_mode: + logging.info("Debug mode on") # validate connections source = SourceConnection(source) @@ -525,6 +527,9 @@ def sync_db_2_db( None """ + if debug_mode: + logging.info("Debug mode on") + def _divide_chunks(l, n): """Split list into a new list with n lists""" # looping till length l