Skip to content

Commit 7948327

Browse files
authored
Merge branch 'main' into fix/issue-2965-bool-config
2 parents 69f05fc + 635f6d5 commit 7948327

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

awswrangler/data_api/rds.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,9 @@ def _create_value_dict( # noqa: PLR0911
359359
if isinstance(value, Decimal):
360360
return {"stringValue": str(value)}, "DECIMAL"
361361

362+
if isinstance(value, uuid.UUID):
363+
return {"stringValue": str(value)}, "UUID"
364+
362365
raise exceptions.InvalidArgumentType(f"Value {value} not supported.")
363366

364367

test_infra/stacks/base_stack.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def __init__(self, scope: Construct, construct_id: str, **kwargs: str) -> None:
7979
),
8080
],
8181
versioned=True,
82+
enforce_ssl=True,
8283
)
8384
self.bucket_access_point = s3.CfnAccessPoint(
8485
self,

test_infra/stacks/glueray_stack.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def __init__(
2121
"Script Bucket",
2222
block_public_access=s3.BlockPublicAccess.BLOCK_ALL,
2323
removal_policy=RemovalPolicy.DESTROY,
24+
enforce_ssl=True,
2425
)
2526

2627
self.athena_workgroup = athena.CfnWorkGroup(

tests/unit/test_data_api.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22

3+
import uuid
34
from typing import Any, Iterator
45

56
import boto3
@@ -284,7 +285,8 @@ def test_data_api_mysql_ansi(mysql_serverless_connector: "RdsDataApi", mysql_ser
284285

285286
def test_data_api_postgresql(postgresql_serverless_connector: "RdsDataApi", postgresql_serverless_table: str) -> None:
286287
database = "test"
287-
frame = pd.DataFrame([[42, "test"]], columns=["id", "name"])
288+
_id = uuid.uuid4()
289+
frame = pd.DataFrame([[_id, "test"]], columns=["id", "name"])
288290

289291
wr.data_api.rds.to_sql(
290292
df=frame,
@@ -295,7 +297,7 @@ def test_data_api_postgresql(postgresql_serverless_connector: "RdsDataApi", post
295297
)
296298

297299
out_frame = wr.data_api.rds.read_sql_query(
298-
f"SELECT name FROM {postgresql_serverless_table} WHERE id = 42", con=postgresql_serverless_connector
300+
f"SELECT name FROM {postgresql_serverless_table} WHERE id = '{_id}'", con=postgresql_serverless_connector
299301
)
300302
expected_dataframe = pd.DataFrame([["test"]], columns=["name"])
301303
assert_pandas_equals(out_frame, expected_dataframe)

0 commit comments

Comments
 (0)