@@ -39,6 +39,8 @@ class BigQueryCreateDataTransferOperator(BaseOperator):
3939 created. If set to None or missing, the default project_id from the Google Cloud connection
4040 is used.
4141 :type project_id: str
42+ :param: location: BigQuery Transfer Service location for regional transfers.
43+ :type location: Optional[str]
4244 :param authorization_code: authorization code to use with this transfer configuration.
4345 This is required if new credentials are needed.
4446 :type authorization_code: Optional[str]
@@ -77,6 +79,7 @@ def __init__(
7779 * ,
7880 transfer_config : dict ,
7981 project_id : Optional [str ] = None ,
82+ location : Optional [str ] = None ,
8083 authorization_code : Optional [str ] = None ,
8184 retry : Retry = None ,
8285 timeout : Optional [float ] = None ,
@@ -89,6 +92,7 @@ def __init__(
8992 self .transfer_config = transfer_config
9093 self .authorization_code = authorization_code
9194 self .project_id = project_id
95+ self .location = location
9296 self .retry = retry
9397 self .timeout = timeout
9498 self .metadata = metadata
@@ -97,7 +101,7 @@ def __init__(
97101
98102 def execute (self , context ):
99103 hook = BiqQueryDataTransferServiceHook (
100- gcp_conn_id = self .gcp_conn_id , impersonation_chain = self .impersonation_chain
104+ gcp_conn_id = self .gcp_conn_id , impersonation_chain = self .impersonation_chain , location = self . location
101105 )
102106 self .log .info ("Creating DTS transfer config" )
103107 response = hook .create_transfer_config (
@@ -127,6 +131,8 @@ class BigQueryDeleteDataTransferConfigOperator(BaseOperator):
127131 :param project_id: The BigQuery project id where the transfer configuration should be
128132 created. If set to None or missing, the default project_id from the Google Cloud connection is used.
129133 :type project_id: str
134+ :param: location: BigQuery Transfer Service location for regional transfers.
135+ :type location: Optional[str]
130136 :param retry: A retry object used to retry requests. If `None` is
131137 specified, requests will not be retried.
132138 :type retry: Optional[google.api_core.retry.Retry]
@@ -161,6 +167,7 @@ def __init__(
161167 * ,
162168 transfer_config_id : str ,
163169 project_id : Optional [str ] = None ,
170+ location : Optional [str ] = None ,
164171 retry : Retry = None ,
165172 timeout : Optional [float ] = None ,
166173 metadata : Optional [Sequence [Tuple [str , str ]]] = None ,
@@ -170,6 +177,7 @@ def __init__(
170177 ) -> None :
171178 super ().__init__ (** kwargs )
172179 self .project_id = project_id
180+ self .location = location
173181 self .transfer_config_id = transfer_config_id
174182 self .retry = retry
175183 self .timeout = timeout
@@ -179,7 +187,7 @@ def __init__(
179187
180188 def execute (self , context ) -> None :
181189 hook = BiqQueryDataTransferServiceHook (
182- gcp_conn_id = self .gcp_conn_id , impersonation_chain = self .impersonation_chain
190+ gcp_conn_id = self .gcp_conn_id , impersonation_chain = self .impersonation_chain , location = self . location
183191 )
184192 hook .delete_transfer_config (
185193 transfer_config_id = self .transfer_config_id ,
@@ -215,6 +223,8 @@ class BigQueryDataTransferServiceStartTransferRunsOperator(BaseOperator):
215223 :param project_id: The BigQuery project id where the transfer configuration should be
216224 created. If set to None or missing, the default project_id from the Google Cloud connection is used.
217225 :type project_id: str
226+ :param: location: BigQuery Transfer Service location for regional transfers.
227+ :type location: Optional[str]
218228 :param retry: A retry object used to retry requests. If `None` is
219229 specified, requests will not be retried.
220230 :type retry: Optional[google.api_core.retry.Retry]
@@ -251,6 +261,7 @@ def __init__(
251261 * ,
252262 transfer_config_id : str ,
253263 project_id : Optional [str ] = None ,
264+ location : Optional [str ] = None ,
254265 requested_time_range : Optional [dict ] = None ,
255266 requested_run_time : Optional [dict ] = None ,
256267 retry : Retry = None ,
@@ -262,6 +273,7 @@ def __init__(
262273 ) -> None :
263274 super ().__init__ (** kwargs )
264275 self .project_id = project_id
276+ self .location = location
265277 self .transfer_config_id = transfer_config_id
266278 self .requested_time_range = requested_time_range
267279 self .requested_run_time = requested_run_time
@@ -273,7 +285,7 @@ def __init__(
273285
274286 def execute (self , context ):
275287 hook = BiqQueryDataTransferServiceHook (
276- gcp_conn_id = self .gcp_conn_id , impersonation_chain = self .impersonation_chain
288+ gcp_conn_id = self .gcp_conn_id , impersonation_chain = self .impersonation_chain , location = self . location
277289 )
278290 self .log .info ('Submitting manual transfer for %s' , self .transfer_config_id )
279291 response = hook .start_manual_transfer_runs (
0 commit comments