@@ -856,7 +856,7 @@ def _create_table_from_source_queries(
856856 table_description : t .Optional [str ] = None ,
857857 column_descriptions : t .Optional [t .Dict [str , str ]] = None ,
858858 table_kind : t .Optional [str ] = None ,
859- track_execution_stats : bool = True ,
859+ track_rows_processed : bool = True ,
860860 ** kwargs : t .Any ,
861861 ) -> None :
862862 table = exp .to_table (table_name )
@@ -902,15 +902,15 @@ def _create_table_from_source_queries(
902902 replace = replace ,
903903 table_description = table_description ,
904904 table_kind = table_kind ,
905- track_execution_stats = track_execution_stats ,
905+ track_rows_processed = track_rows_processed ,
906906 ** kwargs ,
907907 )
908908 else :
909909 self ._insert_append_query (
910910 table_name ,
911911 query ,
912912 target_columns_to_types or self .columns (table ),
913- track_execution_stats = track_execution_stats ,
913+ track_rows_processed = track_rows_processed ,
914914 )
915915
916916 # Register comments with commands if the engine supports comments and we weren't able to
@@ -934,7 +934,7 @@ def _create_table(
934934 table_description : t .Optional [str ] = None ,
935935 column_descriptions : t .Optional [t .Dict [str , str ]] = None ,
936936 table_kind : t .Optional [str ] = None ,
937- track_execution_stats : bool = True ,
937+ track_rows_processed : bool = True ,
938938 ** kwargs : t .Any ,
939939 ) -> None :
940940 self .execute (
@@ -952,7 +952,7 @@ def _create_table(
952952 table_kind = table_kind ,
953953 ** kwargs ,
954954 ),
955- track_execution_stats = track_execution_stats ,
955+ track_rows_processed = track_rows_processed ,
956956 )
957957
958958 def _build_create_table_exp (
@@ -1440,7 +1440,7 @@ def insert_append(
14401440 table_name : TableName ,
14411441 query_or_df : QueryOrDF ,
14421442 target_columns_to_types : t .Optional [t .Dict [str , exp .DataType ]] = None ,
1443- track_execution_stats : bool = True ,
1443+ track_rows_processed : bool = True ,
14441444 source_columns : t .Optional [t .List [str ]] = None ,
14451445 ) -> None :
14461446 source_queries , target_columns_to_types = self ._get_source_queries_and_columns_to_types (
@@ -1450,15 +1450,15 @@ def insert_append(
14501450 source_columns = source_columns ,
14511451 )
14521452 self ._insert_append_source_queries (
1453- table_name , source_queries , target_columns_to_types , track_execution_stats
1453+ table_name , source_queries , target_columns_to_types , track_rows_processed
14541454 )
14551455
14561456 def _insert_append_source_queries (
14571457 self ,
14581458 table_name : TableName ,
14591459 source_queries : t .List [SourceQuery ],
14601460 target_columns_to_types : t .Optional [t .Dict [str , exp .DataType ]] = None ,
1461- track_execution_stats : bool = True ,
1461+ track_rows_processed : bool = True ,
14621462 ) -> None :
14631463 with self .transaction (condition = len (source_queries ) > 0 ):
14641464 target_columns_to_types = target_columns_to_types or self .columns (table_name )
@@ -1468,7 +1468,7 @@ def _insert_append_source_queries(
14681468 table_name ,
14691469 query ,
14701470 target_columns_to_types ,
1471- track_execution_stats = track_execution_stats ,
1471+ track_rows_processed = track_rows_processed ,
14721472 )
14731473
14741474 def _insert_append_query (
@@ -1477,13 +1477,13 @@ def _insert_append_query(
14771477 query : Query ,
14781478 target_columns_to_types : t .Dict [str , exp .DataType ],
14791479 order_projections : bool = True ,
1480- track_execution_stats : bool = True ,
1480+ track_rows_processed : bool = True ,
14811481 ) -> None :
14821482 if order_projections :
14831483 query = self ._order_projections_and_filter (query , target_columns_to_types )
14841484 self .execute (
14851485 exp .insert (query , table_name , columns = list (target_columns_to_types )),
1486- track_execution_stats = track_execution_stats ,
1486+ track_rows_processed = track_rows_processed ,
14871487 )
14881488
14891489 def insert_overwrite_by_partition (
@@ -1626,7 +1626,7 @@ def _insert_overwrite_by_condition(
16261626 )
16271627 if insert_overwrite_strategy .is_replace_where :
16281628 insert_exp .set ("where" , where or exp .true ())
1629- self .execute (insert_exp , track_execution_stats = True )
1629+ self .execute (insert_exp , track_rows_processed = True )
16301630
16311631 def update_table (
16321632 self ,
@@ -1648,7 +1648,7 @@ def _merge(
16481648 exp .Subquery (this = query ), alias = MERGE_SOURCE_ALIAS , copy = False , table = True
16491649 )
16501650 self .execute (
1651- exp .Merge (this = this , using = using , on = on , whens = whens ), track_execution_stats = True
1651+ exp .Merge (this = this , using = using , on = on , whens = whens ), track_rows_processed = True
16521652 )
16531653
16541654 def scd_type_2_by_time (
@@ -2398,7 +2398,7 @@ def execute(
23982398 expressions : t .Union [str , exp .Expression , t .Sequence [exp .Expression ]],
23992399 ignore_unsupported_errors : bool = False ,
24002400 quote_identifiers : bool = True ,
2401- track_execution_stats : bool = False ,
2401+ track_rows_processed : bool = False ,
24022402 ** kwargs : t .Any ,
24032403 ) -> None :
24042404 """Execute a sql query."""
@@ -2420,7 +2420,7 @@ def execute(
24202420 expression = e if isinstance (e , exp .Expression ) else None ,
24212421 quote_identifiers = quote_identifiers ,
24222422 )
2423- self ._execute (sql , track_execution_stats , ** kwargs )
2423+ self ._execute (sql , track_rows_processed , ** kwargs )
24242424
24252425 def _attach_correlation_id (self , sql : str ) -> str :
24262426 if self .ATTACH_CORRELATION_ID and self .correlation_id :
@@ -2450,12 +2450,12 @@ def _record_execution_stats(
24502450 ) -> None :
24512451 QueryExecutionTracker .record_execution (sql , rowcount , bytes_processed )
24522452
2453- def _execute (self , sql : str , track_execution_stats : bool = False , ** kwargs : t .Any ) -> None :
2453+ def _execute (self , sql : str , track_rows_processed : bool = False , ** kwargs : t .Any ) -> None :
24542454 self .cursor .execute (sql , ** kwargs )
24552455
24562456 if (
24572457 self .SUPPORTS_QUERY_EXECUTION_TRACKING
2458- and track_execution_stats
2458+ and track_rows_processed
24592459 and QueryExecutionTracker .is_tracking ()
24602460 ):
24612461 rowcount_raw = getattr (self .cursor , "rowcount" , None )
@@ -2512,7 +2512,7 @@ def temp_table(
25122512 exists = True ,
25132513 table_description = None ,
25142514 column_descriptions = None ,
2515- track_execution_stats = False ,
2515+ track_rows_processed = False ,
25162516 ** kwargs ,
25172517 )
25182518
@@ -2764,7 +2764,7 @@ def _replace_by_key(
27642764 insert_statement .set ("where" , delete_filter )
27652765 insert_statement .set ("this" , exp .to_table (target_table ))
27662766
2767- self .execute (insert_statement , track_execution_stats = True )
2767+ self .execute (insert_statement , track_rows_processed = True )
27682768 finally :
27692769 self .drop_table (temp_table )
27702770
0 commit comments