@@ -837,7 +837,7 @@ def _create_table_from_source_queries(
837837 table_description : t .Optional [str ] = None ,
838838 column_descriptions : t .Optional [t .Dict [str , str ]] = None ,
839839 table_kind : t .Optional [str ] = None ,
840- track_execution_stats : bool = True ,
840+ track_rows_processed : bool = True ,
841841 ** kwargs : t .Any ,
842842 ) -> None :
843843 table = exp .to_table (table_name )
@@ -883,15 +883,15 @@ def _create_table_from_source_queries(
883883 replace = replace ,
884884 table_description = table_description ,
885885 table_kind = table_kind ,
886- track_execution_stats = track_execution_stats ,
886+ track_rows_processed = track_rows_processed ,
887887 ** kwargs ,
888888 )
889889 else :
890890 self ._insert_append_query (
891891 table_name ,
892892 query ,
893893 target_columns_to_types or self .columns (table ),
894- track_execution_stats = track_execution_stats ,
894+ track_rows_processed = track_rows_processed ,
895895 )
896896
897897 # Register comments with commands if the engine supports comments and we weren't able to
@@ -915,7 +915,7 @@ def _create_table(
915915 table_description : t .Optional [str ] = None ,
916916 column_descriptions : t .Optional [t .Dict [str , str ]] = None ,
917917 table_kind : t .Optional [str ] = None ,
918- track_execution_stats : bool = True ,
918+ track_rows_processed : bool = True ,
919919 ** kwargs : t .Any ,
920920 ) -> None :
921921 self .execute (
@@ -933,7 +933,7 @@ def _create_table(
933933 table_kind = table_kind ,
934934 ** kwargs ,
935935 ),
936- track_execution_stats = track_execution_stats ,
936+ track_rows_processed = track_rows_processed ,
937937 )
938938
939939 def _build_create_table_exp (
@@ -1408,7 +1408,7 @@ def insert_append(
14081408 table_name : TableName ,
14091409 query_or_df : QueryOrDF ,
14101410 target_columns_to_types : t .Optional [t .Dict [str , exp .DataType ]] = None ,
1411- track_execution_stats : bool = True ,
1411+ track_rows_processed : bool = True ,
14121412 source_columns : t .Optional [t .List [str ]] = None ,
14131413 ) -> None :
14141414 source_queries , target_columns_to_types = self ._get_source_queries_and_columns_to_types (
@@ -1418,15 +1418,15 @@ def insert_append(
14181418 source_columns = source_columns ,
14191419 )
14201420 self ._insert_append_source_queries (
1421- table_name , source_queries , target_columns_to_types , track_execution_stats
1421+ table_name , source_queries , target_columns_to_types , track_rows_processed
14221422 )
14231423
14241424 def _insert_append_source_queries (
14251425 self ,
14261426 table_name : TableName ,
14271427 source_queries : t .List [SourceQuery ],
14281428 target_columns_to_types : t .Optional [t .Dict [str , exp .DataType ]] = None ,
1429- track_execution_stats : bool = True ,
1429+ track_rows_processed : bool = True ,
14301430 ) -> None :
14311431 with self .transaction (condition = len (source_queries ) > 0 ):
14321432 target_columns_to_types = target_columns_to_types or self .columns (table_name )
@@ -1436,7 +1436,7 @@ def _insert_append_source_queries(
14361436 table_name ,
14371437 query ,
14381438 target_columns_to_types ,
1439- track_execution_stats = track_execution_stats ,
1439+ track_rows_processed = track_rows_processed ,
14401440 )
14411441
14421442 def _insert_append_query (
@@ -1445,13 +1445,13 @@ def _insert_append_query(
14451445 query : Query ,
14461446 target_columns_to_types : t .Dict [str , exp .DataType ],
14471447 order_projections : bool = True ,
1448- track_execution_stats : bool = True ,
1448+ track_rows_processed : bool = True ,
14491449 ) -> None :
14501450 if order_projections :
14511451 query = self ._order_projections_and_filter (query , target_columns_to_types )
14521452 self .execute (
14531453 exp .insert (query , table_name , columns = list (target_columns_to_types )),
1454- track_execution_stats = track_execution_stats ,
1454+ track_rows_processed = track_rows_processed ,
14551455 )
14561456
14571457 def insert_overwrite_by_partition (
@@ -1594,7 +1594,7 @@ def _insert_overwrite_by_condition(
15941594 )
15951595 if insert_overwrite_strategy .is_replace_where :
15961596 insert_exp .set ("where" , where or exp .true ())
1597- self .execute (insert_exp , track_execution_stats = True )
1597+ self .execute (insert_exp , track_rows_processed = True )
15981598
15991599 def update_table (
16001600 self ,
@@ -1616,7 +1616,7 @@ def _merge(
16161616 exp .Subquery (this = query ), alias = MERGE_SOURCE_ALIAS , copy = False , table = True
16171617 )
16181618 self .execute (
1619- exp .Merge (this = this , using = using , on = on , whens = whens ), track_execution_stats = True
1619+ exp .Merge (this = this , using = using , on = on , whens = whens ), track_rows_processed = True
16201620 )
16211621
16221622 def scd_type_2_by_time (
@@ -2366,7 +2366,7 @@ def execute(
23662366 expressions : t .Union [str , exp .Expression , t .Sequence [exp .Expression ]],
23672367 ignore_unsupported_errors : bool = False ,
23682368 quote_identifiers : bool = True ,
2369- track_execution_stats : bool = False ,
2369+ track_rows_processed : bool = False ,
23702370 ** kwargs : t .Any ,
23712371 ) -> None :
23722372 """Execute a sql query."""
@@ -2388,7 +2388,7 @@ def execute(
23882388 expression = e if isinstance (e , exp .Expression ) else None ,
23892389 quote_identifiers = quote_identifiers ,
23902390 )
2391- self ._execute (sql , track_execution_stats , ** kwargs )
2391+ self ._execute (sql , track_rows_processed , ** kwargs )
23922392
23932393 def _attach_correlation_id (self , sql : str ) -> str :
23942394 if self .ATTACH_CORRELATION_ID and self .correlation_id :
@@ -2418,12 +2418,12 @@ def _record_execution_stats(
24182418 ) -> None :
24192419 QueryExecutionTracker .record_execution (sql , rowcount , bytes_processed )
24202420
2421- def _execute (self , sql : str , track_execution_stats : bool = False , ** kwargs : t .Any ) -> None :
2421+ def _execute (self , sql : str , track_rows_processed : bool = False , ** kwargs : t .Any ) -> None :
24222422 self .cursor .execute (sql , ** kwargs )
24232423
24242424 if (
24252425 self .SUPPORTS_QUERY_EXECUTION_TRACKING
2426- and track_execution_stats
2426+ and track_rows_processed
24272427 and QueryExecutionTracker .is_tracking ()
24282428 ):
24292429 rowcount_raw = getattr (self .cursor , "rowcount" , None )
@@ -2480,7 +2480,7 @@ def temp_table(
24802480 exists = True ,
24812481 table_description = None ,
24822482 column_descriptions = None ,
2483- track_execution_stats = False ,
2483+ track_rows_processed = False ,
24842484 ** kwargs ,
24852485 )
24862486
@@ -2732,7 +2732,7 @@ def _replace_by_key(
27322732 insert_statement .set ("where" , delete_filter )
27332733 insert_statement .set ("this" , exp .to_table (target_table ))
27342734
2735- self .execute (insert_statement , track_execution_stats = True )
2735+ self .execute (insert_statement , track_rows_processed = True )
27362736 finally :
27372737 self .drop_table (temp_table )
27382738
0 commit comments