@@ -785,7 +785,8 @@ def split(self, desired_bundle_size, start_position=None, stop_position=None):
785785 if self .export_result is None :
786786 bq = bigquery_tools .BigQueryWrapper (
787787 temp_dataset_id = (
788- self .temp_dataset .datasetId if self .temp_dataset else None ))
788+ self .temp_dataset .datasetId if self .temp_dataset else None ),
789+ client = bigquery_tools .BigQueryWrapper ._bigquery_client (self .options ))
789790
790791 if self .query is not None :
791792 self ._setup_temporary_dataset (bq )
@@ -1082,7 +1083,8 @@ def display_data(self):
10821083
10831084 def estimate_size (self ):
10841085 # Returns the pre-filtering size of the (temporary) table being read.
1085- bq = bigquery_tools .BigQueryWrapper ()
1086+ bq = bigquery_tools .BigQueryWrapper .from_pipeline_options (
1087+ self .pipeline_options )
10861088 if self .table_reference is not None :
10871089 return self ._get_table_size (bq , self .table_reference )
10881090 elif self .query is not None and self .query .is_accessible ():
@@ -1112,7 +1114,9 @@ def estimate_size(self):
11121114 def split (self , desired_bundle_size , start_position = None , stop_position = None ):
11131115 if self .split_result is None :
11141116 bq = bigquery_tools .BigQueryWrapper (
1115- temp_table_ref = (self .temp_table if self .temp_table else None ))
1117+ temp_table_ref = (self .temp_table if self .temp_table else None ),
1118+ client = bigquery_tools .BigQueryWrapper ._bigquery_client (
1119+ self .pipeline_options ))
11161120
11171121 if self .query is not None :
11181122 self ._setup_temporary_dataset (bq )
0 commit comments