@@ -830,7 +830,7 @@ def _create_table_from_source_queries(
830830 table_description : t .Optional [str ] = None ,
831831 column_descriptions : t .Optional [t .Dict [str , str ]] = None ,
832832 table_kind : t .Optional [str ] = None ,
833- track_execution_stats : bool = True ,
833+ track_rows_processed : bool = True ,
834834 ** kwargs : t .Any ,
835835 ) -> None :
836836 table = exp .to_table (table_name )
@@ -876,15 +876,15 @@ def _create_table_from_source_queries(
876876 replace = replace ,
877877 table_description = table_description ,
878878 table_kind = table_kind ,
879- track_execution_stats = track_execution_stats ,
879+ track_rows_processed = track_rows_processed ,
880880 ** kwargs ,
881881 )
882882 else :
883883 self ._insert_append_query (
884884 table_name ,
885885 query ,
886886 target_columns_to_types or self .columns (table ),
887- track_execution_stats = track_execution_stats ,
887+ track_rows_processed = track_rows_processed ,
888888 )
889889
890890 # Register comments with commands if the engine supports comments and we weren't able to
@@ -908,7 +908,7 @@ def _create_table(
908908 table_description : t .Optional [str ] = None ,
909909 column_descriptions : t .Optional [t .Dict [str , str ]] = None ,
910910 table_kind : t .Optional [str ] = None ,
911- track_execution_stats : bool = True ,
911+ track_rows_processed : bool = True ,
912912 ** kwargs : t .Any ,
913913 ) -> None :
914914 self .execute (
@@ -926,7 +926,7 @@ def _create_table(
926926 table_kind = table_kind ,
927927 ** kwargs ,
928928 ),
929- track_execution_stats = track_execution_stats ,
929+ track_rows_processed = track_rows_processed ,
930930 )
931931
932932 def _build_create_table_exp (
@@ -1401,7 +1401,7 @@ def insert_append(
14011401 table_name : TableName ,
14021402 query_or_df : QueryOrDF ,
14031403 target_columns_to_types : t .Optional [t .Dict [str , exp .DataType ]] = None ,
1404- track_execution_stats : bool = True ,
1404+ track_rows_processed : bool = True ,
14051405 source_columns : t .Optional [t .List [str ]] = None ,
14061406 ) -> None :
14071407 source_queries , target_columns_to_types = self ._get_source_queries_and_columns_to_types (
@@ -1411,15 +1411,15 @@ def insert_append(
14111411 source_columns = source_columns ,
14121412 )
14131413 self ._insert_append_source_queries (
1414- table_name , source_queries , target_columns_to_types , track_execution_stats
1414+ table_name , source_queries , target_columns_to_types , track_rows_processed
14151415 )
14161416
14171417 def _insert_append_source_queries (
14181418 self ,
14191419 table_name : TableName ,
14201420 source_queries : t .List [SourceQuery ],
14211421 target_columns_to_types : t .Optional [t .Dict [str , exp .DataType ]] = None ,
1422- track_execution_stats : bool = True ,
1422+ track_rows_processed : bool = True ,
14231423 ) -> None :
14241424 with self .transaction (condition = len (source_queries ) > 0 ):
14251425 target_columns_to_types = target_columns_to_types or self .columns (table_name )
@@ -1429,7 +1429,7 @@ def _insert_append_source_queries(
14291429 table_name ,
14301430 query ,
14311431 target_columns_to_types ,
1432- track_execution_stats = track_execution_stats ,
1432+ track_rows_processed = track_rows_processed ,
14331433 )
14341434
14351435 def _insert_append_query (
@@ -1438,13 +1438,13 @@ def _insert_append_query(
14381438 query : Query ,
14391439 target_columns_to_types : t .Dict [str , exp .DataType ],
14401440 order_projections : bool = True ,
1441- track_execution_stats : bool = True ,
1441+ track_rows_processed : bool = True ,
14421442 ) -> None :
14431443 if order_projections :
14441444 query = self ._order_projections_and_filter (query , target_columns_to_types )
14451445 self .execute (
14461446 exp .insert (query , table_name , columns = list (target_columns_to_types )),
1447- track_execution_stats = track_execution_stats ,
1447+ track_rows_processed = track_rows_processed ,
14481448 )
14491449
14501450 def insert_overwrite_by_partition (
@@ -1587,7 +1587,7 @@ def _insert_overwrite_by_condition(
15871587 )
15881588 if insert_overwrite_strategy .is_replace_where :
15891589 insert_exp .set ("where" , where or exp .true ())
1590- self .execute (insert_exp , track_execution_stats = True )
1590+ self .execute (insert_exp , track_rows_processed = True )
15911591
15921592 def update_table (
15931593 self ,
@@ -1609,7 +1609,7 @@ def _merge(
16091609 exp .Subquery (this = query ), alias = MERGE_SOURCE_ALIAS , copy = False , table = True
16101610 )
16111611 self .execute (
1612- exp .Merge (this = this , using = using , on = on , whens = whens ), track_execution_stats = True
1612+ exp .Merge (this = this , using = using , on = on , whens = whens ), track_rows_processed = True
16131613 )
16141614
16151615 def scd_type_2_by_time (
@@ -2359,7 +2359,7 @@ def execute(
23592359 expressions : t .Union [str , exp .Expression , t .Sequence [exp .Expression ]],
23602360 ignore_unsupported_errors : bool = False ,
23612361 quote_identifiers : bool = True ,
2362- track_execution_stats : bool = False ,
2362+ track_rows_processed : bool = False ,
23632363 ** kwargs : t .Any ,
23642364 ) -> None :
23652365 """Execute a sql query."""
@@ -2381,7 +2381,7 @@ def execute(
23812381 expression = e if isinstance (e , exp .Expression ) else None ,
23822382 quote_identifiers = quote_identifiers ,
23832383 )
2384- self ._execute (sql , track_execution_stats , ** kwargs )
2384+ self ._execute (sql , track_rows_processed , ** kwargs )
23852385
23862386 def _attach_correlation_id (self , sql : str ) -> str :
23872387 if self .ATTACH_CORRELATION_ID and self .correlation_id :
@@ -2411,12 +2411,12 @@ def _record_execution_stats(
24112411 ) -> None :
24122412 QueryExecutionTracker .record_execution (sql , rowcount , bytes_processed )
24132413
2414- def _execute (self , sql : str , track_execution_stats : bool = False , ** kwargs : t .Any ) -> None :
2414+ def _execute (self , sql : str , track_rows_processed : bool = False , ** kwargs : t .Any ) -> None :
24152415 self .cursor .execute (sql , ** kwargs )
24162416
24172417 if (
24182418 self .SUPPORTS_QUERY_EXECUTION_TRACKING
2419- and track_execution_stats
2419+ and track_rows_processed
24202420 and QueryExecutionTracker .is_tracking ()
24212421 ):
24222422 rowcount_raw = getattr (self .cursor , "rowcount" , None )
@@ -2473,7 +2473,7 @@ def temp_table(
24732473 exists = True ,
24742474 table_description = None ,
24752475 column_descriptions = None ,
2476- track_execution_stats = False ,
2476+ track_rows_processed = False ,
24772477 ** kwargs ,
24782478 )
24792479
@@ -2725,7 +2725,7 @@ def _replace_by_key(
27252725 insert_statement .set ("where" , delete_filter )
27262726 insert_statement .set ("this" , exp .to_table (target_table ))
27272727
2728- self .execute (insert_statement , track_execution_stats = True )
2728+ self .execute (insert_statement , track_rows_processed = True )
27292729 finally :
27302730 self .drop_table (temp_table )
27312731
0 commit comments