@@ -434,6 +434,7 @@ def connect(
434
434
timeout : Optional [int ] = None ,
435
435
max_prepared_statements : int = 1000 ,
436
436
tcp_keepalive : bool = True ,
437
+ ** kwargs : Any ,
437
438
) -> redshift_connector .Connection :
438
439
"""Return a redshift_connector connection from a Glue Catalog or Secret Manager.
439
440
@@ -455,23 +456,23 @@ def connect(
455
456
456
457
Parameters
457
458
----------
458
- connection : Optional[ str]
459
+ connection : str, optional
459
460
Glue Catalog Connection name.
460
461
secret_id : Optional[str]:
461
462
Specifies the secret containing the connection details that you want to retrieve.
462
463
You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.
463
464
catalog_id : str, optional
464
465
The ID of the Data Catalog.
465
466
If none is provided, the AWS account ID is used by default.
466
- dbname : Optional[ str]
467
+ dbname : str, optional
467
468
Optional database name to overwrite the stored one.
468
469
boto3_session : boto3.Session(), optional
469
470
Boto3 Session. The default boto3 session will be used if boto3_session receive None.
470
471
ssl : bool
471
472
This governs SSL encryption for TCP/IP sockets.
472
473
This parameter is forward to redshift_connector.
473
474
https://github.com/aws/amazon-redshift-python-driver
474
- timeout : Optional[ int]
475
+ timeout : int, optional
475
476
This is the time in seconds before the connection to the server will time out.
476
477
The default is None which means no timeout.
477
478
This parameter is forward to redshift_connector.
@@ -483,6 +484,9 @@ def connect(
483
484
If True then use TCP keepalive. The default is True.
484
485
This parameter is forward to redshift_connector.
485
486
https://github.com/aws/amazon-redshift-python-driver
487
+ **kwargs : Any
488
+ Forwarded to redshift_connector.connect.
489
+ e.g. is_serverless=True, serverless_acct_id='...', serverless_work_group='...'
486
490
487
491
Returns
488
492
-------
@@ -527,6 +531,7 @@ def connect(
527
531
timeout = timeout ,
528
532
max_prepared_statements = max_prepared_statements ,
529
533
tcp_keepalive = tcp_keepalive ,
534
+ ** kwargs ,
530
535
)
531
536
532
537
@@ -542,6 +547,7 @@ def connect_temp(
542
547
timeout : Optional [int ] = None ,
543
548
max_prepared_statements : int = 1000 ,
544
549
tcp_keepalive : bool = True ,
550
+ ** kwargs : Any ,
545
551
) -> redshift_connector .Connection :
546
552
"""Return a redshift_connector temporary connection (No password required).
547
553
@@ -571,7 +577,7 @@ def connect_temp(
571
577
This governs SSL encryption for TCP/IP sockets.
572
578
This parameter is forward to redshift_connector.
573
579
https://github.com/aws/amazon-redshift-python-driver
574
- timeout : Optional[ int]
580
+ timeout : int, optional
575
581
This is the time in seconds before the connection to the server will time out.
576
582
The default is None which means no timeout.
577
583
This parameter is forward to redshift_connector.
@@ -583,6 +589,9 @@ def connect_temp(
583
589
If True then use TCP keepalive. The default is True.
584
590
This parameter is forward to redshift_connector.
585
591
https://github.com/aws/amazon-redshift-python-driver
592
+ **kwargs : Any
593
+ Forwarded to redshift_connector.connect.
594
+ e.g. is_serverless=True, serverless_acct_id='...', serverless_work_group='...'
586
595
587
596
Returns
588
597
-------
@@ -623,6 +632,7 @@ def connect_temp(
623
632
max_prepared_statements = max_prepared_statements ,
624
633
tcp_keepalive = tcp_keepalive ,
625
634
db_groups = db_groups ,
635
+ ** kwargs ,
626
636
)
627
637
628
638
0 commit comments