@@ -309,13 +309,13 @@ def read(self) -> Optional[OAuthToken]:
309
309
310
310
initialize_telemetry_client (
311
311
telemetry_enabled = self .telemetry_enabled ,
312
- connection_uuid = self .get_session_id_hex (),
312
+ session_id_hex = self .get_session_id_hex (),
313
313
auth_provider = auth_provider ,
314
314
host_url = self .host ,
315
315
)
316
316
317
317
self ._telemetry_client = get_telemetry_client (
318
- connection_uuid = self .get_session_id_hex ()
318
+ session_id_hex = self .get_session_id_hex ()
319
319
)
320
320
321
321
driver_connection_params = DriverConnectionParameters (
@@ -427,7 +427,7 @@ def cursor(
427
427
if not self .open :
428
428
raise InterfaceError (
429
429
"Cannot create cursor from closed connection" ,
430
- connection_uuid = self .get_session_id_hex (),
430
+ session_id_hex = self .get_session_id_hex (),
431
431
)
432
432
433
433
cursor = Cursor (
@@ -480,7 +480,7 @@ def commit(self):
480
480
def rollback (self ):
481
481
raise NotSupportedError (
482
482
"Transactions are not supported on Databricks" ,
483
- connection_uuid = self .get_session_id_hex (),
483
+ session_id_hex = self .get_session_id_hex (),
484
484
)
485
485
486
486
@@ -535,7 +535,7 @@ def __iter__(self):
535
535
else :
536
536
raise ProgrammingError (
537
537
"There is no active result set" ,
538
- connection_uuid = self .connection .get_session_id_hex (),
538
+ session_id_hex = self .connection .get_session_id_hex (),
539
539
)
540
540
541
541
def _determine_parameter_approach (
@@ -675,7 +675,7 @@ def _check_not_closed(self):
675
675
if not self .open :
676
676
raise InterfaceError (
677
677
"Attempting operation on closed cursor" ,
678
- connection_uuid = self .connection .get_session_id_hex (),
678
+ session_id_hex = self .connection .get_session_id_hex (),
679
679
)
680
680
681
681
def _handle_staging_operation (
@@ -695,7 +695,7 @@ def _handle_staging_operation(
695
695
else :
696
696
raise ProgrammingError (
697
697
"You must provide at least one staging_allowed_local_path when initialising a connection to perform ingestion commands" ,
698
- connection_uuid = self .connection .get_session_id_hex (),
698
+ session_id_hex = self .connection .get_session_id_hex (),
699
699
)
700
700
701
701
abs_staging_allowed_local_paths = [
@@ -725,7 +725,7 @@ def _handle_staging_operation(
725
725
if not allow_operation :
726
726
raise ProgrammingError (
727
727
"Local file operations are restricted to paths within the configured staging_allowed_local_path" ,
728
- connection_uuid = self .connection .get_session_id_hex (),
728
+ session_id_hex = self .connection .get_session_id_hex (),
729
729
)
730
730
731
731
# May be real headers, or could be json string
@@ -756,7 +756,7 @@ def _handle_staging_operation(
756
756
raise ProgrammingError (
757
757
f"Operation { row .operation } is not supported. "
758
758
+ "Supported operations are GET, PUT, and REMOVE" ,
759
- connection_uuid = self .connection .get_session_id_hex (),
759
+ session_id_hex = self .connection .get_session_id_hex (),
760
760
)
761
761
762
762
def _handle_staging_put (
@@ -770,7 +770,7 @@ def _handle_staging_put(
770
770
if local_file is None :
771
771
raise ProgrammingError (
772
772
"Cannot perform PUT without specifying a local_file" ,
773
- connection_uuid = self .connection .get_session_id_hex (),
773
+ session_id_hex = self .connection .get_session_id_hex (),
774
774
)
775
775
776
776
with open (local_file , "rb" ) as fh :
@@ -789,7 +789,7 @@ def _handle_staging_put(
789
789
if r .status_code not in [OK , CREATED , NO_CONTENT , ACCEPTED ]:
790
790
raise OperationalError (
791
791
f"Staging operation over HTTP was unsuccessful: { r .status_code } -{ r .text } " ,
792
- connection_uuid = self .connection .get_session_id_hex (),
792
+ session_id_hex = self .connection .get_session_id_hex (),
793
793
)
794
794
795
795
if r .status_code == ACCEPTED :
@@ -809,7 +809,7 @@ def _handle_staging_get(
809
809
if local_file is None :
810
810
raise ProgrammingError (
811
811
"Cannot perform GET without specifying a local_file" ,
812
- connection_uuid = self .connection .get_session_id_hex (),
812
+ session_id_hex = self .connection .get_session_id_hex (),
813
813
)
814
814
815
815
r = requests .get (url = presigned_url , headers = headers )
@@ -819,7 +819,7 @@ def _handle_staging_get(
819
819
if not r .ok :
820
820
raise OperationalError (
821
821
f"Staging operation over HTTP was unsuccessful: { r .status_code } -{ r .text } " ,
822
- connection_uuid = self .connection .get_session_id_hex (),
822
+ session_id_hex = self .connection .get_session_id_hex (),
823
823
)
824
824
825
825
with open (local_file , "wb" ) as fp :
@@ -835,7 +835,7 @@ def _handle_staging_remove(
835
835
if not r .ok :
836
836
raise OperationalError (
837
837
f"Staging operation over HTTP was unsuccessful: { r .status_code } -{ r .text } " ,
838
- connection_uuid = self .connection .get_session_id_hex (),
838
+ session_id_hex = self .connection .get_session_id_hex (),
839
839
)
840
840
841
841
def execute (
@@ -1035,7 +1035,7 @@ def get_async_execution_result(self):
1035
1035
else :
1036
1036
raise OperationalError (
1037
1037
f"get_execution_result failed with Operation status { operation_state } " ,
1038
- connection_uuid = self .connection .get_session_id_hex (),
1038
+ session_id_hex = self .connection .get_session_id_hex (),
1039
1039
)
1040
1040
1041
1041
def executemany (self , operation , seq_of_parameters ):
@@ -1187,7 +1187,7 @@ def fetchall(self) -> List[Row]:
1187
1187
else :
1188
1188
raise ProgrammingError (
1189
1189
"There is no active result set" ,
1190
- connection_uuid = self .connection .get_session_id_hex (),
1190
+ session_id_hex = self .connection .get_session_id_hex (),
1191
1191
)
1192
1192
1193
1193
def fetchone (self ) -> Optional [Row ]:
@@ -1204,7 +1204,7 @@ def fetchone(self) -> Optional[Row]:
1204
1204
else :
1205
1205
raise ProgrammingError (
1206
1206
"There is no active result set" ,
1207
- connection_uuid = self .connection .get_session_id_hex (),
1207
+ session_id_hex = self .connection .get_session_id_hex (),
1208
1208
)
1209
1209
1210
1210
def fetchmany (self , size : int ) -> List [Row ]:
@@ -1229,7 +1229,7 @@ def fetchmany(self, size: int) -> List[Row]:
1229
1229
else :
1230
1230
raise ProgrammingError (
1231
1231
"There is no active result set" ,
1232
- connection_uuid = self .connection .get_session_id_hex (),
1232
+ session_id_hex = self .connection .get_session_id_hex (),
1233
1233
)
1234
1234
1235
1235
def fetchall_arrow (self ) -> "pyarrow.Table" :
@@ -1239,7 +1239,7 @@ def fetchall_arrow(self) -> "pyarrow.Table":
1239
1239
else :
1240
1240
raise ProgrammingError (
1241
1241
"There is no active result set" ,
1242
- connection_uuid = self .connection .get_session_id_hex (),
1242
+ session_id_hex = self .connection .get_session_id_hex (),
1243
1243
)
1244
1244
1245
1245
def fetchmany_arrow (self , size ) -> "pyarrow.Table" :
@@ -1249,7 +1249,7 @@ def fetchmany_arrow(self, size) -> "pyarrow.Table":
1249
1249
else :
1250
1250
raise ProgrammingError (
1251
1251
"There is no active result set" ,
1252
- connection_uuid = self .connection .get_session_id_hex (),
1252
+ session_id_hex = self .connection .get_session_id_hex (),
1253
1253
)
1254
1254
1255
1255
def cancel (self ) -> None :
0 commit comments