@@ -845,7 +845,7 @@ def _create_table_from_source_queries(
845845 table_description : t .Optional [str ] = None ,
846846 column_descriptions : t .Optional [t .Dict [str , str ]] = None ,
847847 table_kind : t .Optional [str ] = None ,
848- track_execution_stats : bool = True ,
848+ track_rows_processed : bool = True ,
849849 ** kwargs : t .Any ,
850850 ) -> None :
851851 table = exp .to_table (table_name )
@@ -891,15 +891,15 @@ def _create_table_from_source_queries(
891891 replace = replace ,
892892 table_description = table_description ,
893893 table_kind = table_kind ,
894- track_execution_stats = track_execution_stats ,
894+ track_rows_processed = track_rows_processed ,
895895 ** kwargs ,
896896 )
897897 else :
898898 self ._insert_append_query (
899899 table_name ,
900900 query ,
901901 target_columns_to_types or self .columns (table ),
902- track_execution_stats = track_execution_stats ,
902+ track_rows_processed = track_rows_processed ,
903903 )
904904
905905 # Register comments with commands if the engine supports comments and we weren't able to
@@ -923,7 +923,7 @@ def _create_table(
923923 table_description : t .Optional [str ] = None ,
924924 column_descriptions : t .Optional [t .Dict [str , str ]] = None ,
925925 table_kind : t .Optional [str ] = None ,
926- track_execution_stats : bool = True ,
926+ track_rows_processed : bool = True ,
927927 ** kwargs : t .Any ,
928928 ) -> None :
929929 self .execute (
@@ -941,7 +941,7 @@ def _create_table(
941941 table_kind = table_kind ,
942942 ** kwargs ,
943943 ),
944- track_execution_stats = track_execution_stats ,
944+ track_rows_processed = track_rows_processed ,
945945 )
946946
947947 def _build_create_table_exp (
@@ -1429,7 +1429,7 @@ def insert_append(
14291429 table_name : TableName ,
14301430 query_or_df : QueryOrDF ,
14311431 target_columns_to_types : t .Optional [t .Dict [str , exp .DataType ]] = None ,
1432- track_execution_stats : bool = True ,
1432+ track_rows_processed : bool = True ,
14331433 source_columns : t .Optional [t .List [str ]] = None ,
14341434 ) -> None :
14351435 source_queries , target_columns_to_types = self ._get_source_queries_and_columns_to_types (
@@ -1439,15 +1439,15 @@ def insert_append(
14391439 source_columns = source_columns ,
14401440 )
14411441 self ._insert_append_source_queries (
1442- table_name , source_queries , target_columns_to_types , track_execution_stats
1442+ table_name , source_queries , target_columns_to_types , track_rows_processed
14431443 )
14441444
14451445 def _insert_append_source_queries (
14461446 self ,
14471447 table_name : TableName ,
14481448 source_queries : t .List [SourceQuery ],
14491449 target_columns_to_types : t .Optional [t .Dict [str , exp .DataType ]] = None ,
1450- track_execution_stats : bool = True ,
1450+ track_rows_processed : bool = True ,
14511451 ) -> None :
14521452 with self .transaction (condition = len (source_queries ) > 0 ):
14531453 target_columns_to_types = target_columns_to_types or self .columns (table_name )
@@ -1457,7 +1457,7 @@ def _insert_append_source_queries(
14571457 table_name ,
14581458 query ,
14591459 target_columns_to_types ,
1460- track_execution_stats = track_execution_stats ,
1460+ track_rows_processed = track_rows_processed ,
14611461 )
14621462
14631463 def _insert_append_query (
@@ -1466,13 +1466,13 @@ def _insert_append_query(
14661466 query : Query ,
14671467 target_columns_to_types : t .Dict [str , exp .DataType ],
14681468 order_projections : bool = True ,
1469- track_execution_stats : bool = True ,
1469+ track_rows_processed : bool = True ,
14701470 ) -> None :
14711471 if order_projections :
14721472 query = self ._order_projections_and_filter (query , target_columns_to_types )
14731473 self .execute (
14741474 exp .insert (query , table_name , columns = list (target_columns_to_types )),
1475- track_execution_stats = track_execution_stats ,
1475+ track_rows_processed = track_rows_processed ,
14761476 )
14771477
14781478 def insert_overwrite_by_partition (
@@ -1615,7 +1615,7 @@ def _insert_overwrite_by_condition(
16151615 )
16161616 if insert_overwrite_strategy .is_replace_where :
16171617 insert_exp .set ("where" , where or exp .true ())
1618- self .execute (insert_exp , track_execution_stats = True )
1618+ self .execute (insert_exp , track_rows_processed = True )
16191619
16201620 def update_table (
16211621 self ,
@@ -1637,7 +1637,7 @@ def _merge(
16371637 exp .Subquery (this = query ), alias = MERGE_SOURCE_ALIAS , copy = False , table = True
16381638 )
16391639 self .execute (
1640- exp .Merge (this = this , using = using , on = on , whens = whens ), track_execution_stats = True
1640+ exp .Merge (this = this , using = using , on = on , whens = whens ), track_rows_processed = True
16411641 )
16421642
16431643 def scd_type_2_by_time (
@@ -2387,7 +2387,7 @@ def execute(
23872387 expressions : t .Union [str , exp .Expression , t .Sequence [exp .Expression ]],
23882388 ignore_unsupported_errors : bool = False ,
23892389 quote_identifiers : bool = True ,
2390- track_execution_stats : bool = False ,
2390+ track_rows_processed : bool = False ,
23912391 ** kwargs : t .Any ,
23922392 ) -> None :
23932393 """Execute a sql query."""
@@ -2409,7 +2409,7 @@ def execute(
24092409 expression = e if isinstance (e , exp .Expression ) else None ,
24102410 quote_identifiers = quote_identifiers ,
24112411 )
2412- self ._execute (sql , track_execution_stats , ** kwargs )
2412+ self ._execute (sql , track_rows_processed , ** kwargs )
24132413
24142414 def _attach_correlation_id (self , sql : str ) -> str :
24152415 if self .ATTACH_CORRELATION_ID and self .correlation_id :
@@ -2439,12 +2439,12 @@ def _record_execution_stats(
24392439 ) -> None :
24402440 QueryExecutionTracker .record_execution (sql , rowcount , bytes_processed )
24412441
2442- def _execute (self , sql : str , track_execution_stats : bool = False , ** kwargs : t .Any ) -> None :
2442+ def _execute (self , sql : str , track_rows_processed : bool = False , ** kwargs : t .Any ) -> None :
24432443 self .cursor .execute (sql , ** kwargs )
24442444
24452445 if (
24462446 self .SUPPORTS_QUERY_EXECUTION_TRACKING
2447- and track_execution_stats
2447+ and track_rows_processed
24482448 and QueryExecutionTracker .is_tracking ()
24492449 ):
24502450 rowcount_raw = getattr (self .cursor , "rowcount" , None )
@@ -2501,7 +2501,7 @@ def temp_table(
25012501 exists = True ,
25022502 table_description = None ,
25032503 column_descriptions = None ,
2504- track_execution_stats = False ,
2504+ track_rows_processed = False ,
25052505 ** kwargs ,
25062506 )
25072507
@@ -2753,7 +2753,7 @@ def _replace_by_key(
27532753 insert_statement .set ("where" , delete_filter )
27542754 insert_statement .set ("this" , exp .to_table (target_table ))
27552755
2756- self .execute (insert_statement , track_execution_stats = True )
2756+ self .execute (insert_statement , track_rows_processed = True )
27572757 finally :
27582758 self .drop_table (temp_table )
27592759
0 commit comments