Skip to content

Commit 85e7a48

Browse files
Merge branch 'main' into 2956-athena-read_sql_query-provides-completely-wrong-results-for-qmark-style-parametrized-queries-with-cache-enabled
2 parents 64c4e13 + 9b2cdd9 commit 85e7a48

37 files changed

+2132
-1791
lines changed

.bumpversion.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.bumpversion]
2-
current_version = "3.9.2b1"
2+
current_version = "3.10.0"
33
commit = false
44
tag = false
55
tag_name = "{new_version}"

README.md

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -94,27 +94,27 @@ FROM "sampleDB"."sampleTable" ORDER BY time DESC LIMIT 3
9494
## At scale
9595
AWS SDK for pandas can also run your workflows at scale by leveraging [Modin](https://modin.readthedocs.io/en/stable/) and [Ray](https://www.ray.io/). Both projects aim to speed up data workloads by distributing processing over a cluster of workers.
9696

97-
Read our [docs](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/scale.html) or head to our latest [tutorials](https://github.com/aws/aws-sdk-pandas/tree/main/tutorials) to learn more.
97+
Read our [docs](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/scale.html) or head to our latest [tutorials](https://github.com/aws/aws-sdk-pandas/tree/main/tutorials) to learn more.
9898

9999
> ⚠️ **Ray is currently not available for Python 3.12. While AWS SDK for pandas supports Python 3.12, it cannot be used at scale.**
100100
101101
## [Read The Docs](https://aws-sdk-pandas.readthedocs.io/)
102102

103-
- [**What is AWS SDK for pandas?**](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/about.html)
104-
- [**Install**](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/install.html)
105-
- [PyPi (pip)](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/install.html#pypi-pip)
106-
- [Conda](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/install.html#conda)
107-
- [AWS Lambda Layer](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/install.html#aws-lambda-layer)
108-
- [AWS Glue Python Shell Jobs](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/install.html#aws-glue-python-shell-jobs)
109-
- [AWS Glue PySpark Jobs](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/install.html#aws-glue-pyspark-jobs)
110-
- [Amazon SageMaker Notebook](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/install.html#amazon-sagemaker-notebook)
111-
- [Amazon SageMaker Notebook Lifecycle](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/install.html#amazon-sagemaker-notebook-lifecycle)
112-
- [EMR](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/install.html#emr)
113-
- [From source](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/install.html#from-source)
114-
- [**At scale**](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/scale.html)
115-
- [Getting Started](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/scale.html#getting-started)
116-
- [Supported APIs](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/scale.html#supported-apis)
117-
- [Resources](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/scale.html#resources)
103+
- [**What is AWS SDK for pandas?**](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/about.html)
104+
- [**Install**](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/install.html)
105+
- [PyPi (pip)](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/install.html#pypi-pip)
106+
- [Conda](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/install.html#conda)
107+
- [AWS Lambda Layer](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/install.html#aws-lambda-layer)
108+
- [AWS Glue Python Shell Jobs](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/install.html#aws-glue-python-shell-jobs)
109+
- [AWS Glue PySpark Jobs](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/install.html#aws-glue-pyspark-jobs)
110+
- [Amazon SageMaker Notebook](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/install.html#amazon-sagemaker-notebook)
111+
- [Amazon SageMaker Notebook Lifecycle](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/install.html#amazon-sagemaker-notebook-lifecycle)
112+
- [EMR](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/install.html#emr)
113+
- [From source](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/install.html#from-source)
114+
- [**At scale**](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/scale.html)
115+
- [Getting Started](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/scale.html#getting-started)
116+
- [Supported APIs](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/scale.html#supported-apis)
117+
- [Resources](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/scale.html#resources)
118118
- [**Tutorials**](https://github.com/aws/aws-sdk-pandas/tree/main/tutorials)
119119
- [001 - Introduction](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/001%20-%20Introduction.ipynb)
120120
- [002 - Sessions](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/002%20-%20Sessions.ipynb)
@@ -155,30 +155,30 @@ Read our [docs](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/scale.html) or
155155
- [039 - Athena Iceberg](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/039%20-%20Athena%20Iceberg.ipynb)
156156
- [040 - EMR Serverless](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/040%20-%20EMR%20Serverless.ipynb)
157157
- [041 - Apache Spark on Amazon Athena](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/041%20-%20Apache%20Spark%20on%20Amazon%20Athena.ipynb)
158-
- [**API Reference**](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html)
159-
- [Amazon S3](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#amazon-s3)
160-
- [AWS Glue Catalog](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#aws-glue-catalog)
161-
- [Amazon Athena](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#amazon-athena)
162-
- [Amazon Redshift](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#amazon-redshift)
163-
- [PostgreSQL](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#postgresql)
164-
- [MySQL](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#mysql)
165-
- [SQL Server](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#sqlserver)
166-
- [Oracle](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#oracle)
167-
- [Data API Redshift](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#data-api-redshift)
168-
- [Data API RDS](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#data-api-rds)
169-
- [OpenSearch](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#opensearch)
170-
- [AWS Glue Data Quality](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#aws-glue-data-quality)
171-
- [Amazon Neptune](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#amazon-neptune)
172-
- [DynamoDB](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#dynamodb)
173-
- [Amazon Timestream](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#amazon-timestream)
174-
- [Amazon EMR](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#amazon-emr)
175-
- [Amazon CloudWatch Logs](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#amazon-cloudwatch-logs)
176-
- [Amazon Chime](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#amazon-chime)
177-
- [Amazon QuickSight](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#amazon-quicksight)
178-
- [AWS STS](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#aws-sts)
179-
- [AWS Secrets Manager](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#aws-secrets-manager)
180-
- [Global Configurations](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#global-configurations)
181-
- [Distributed - Ray](https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/api.html#distributed-ray)
158+
- [**API Reference**](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html)
159+
- [Amazon S3](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#amazon-s3)
160+
- [AWS Glue Catalog](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#aws-glue-catalog)
161+
- [Amazon Athena](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#amazon-athena)
162+
- [Amazon Redshift](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#amazon-redshift)
163+
- [PostgreSQL](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#postgresql)
164+
- [MySQL](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#mysql)
165+
- [SQL Server](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#sqlserver)
166+
- [Oracle](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#oracle)
167+
- [Data API Redshift](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#data-api-redshift)
168+
- [Data API RDS](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#data-api-rds)
169+
- [OpenSearch](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#opensearch)
170+
- [AWS Glue Data Quality](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#aws-glue-data-quality)
171+
- [Amazon Neptune](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#amazon-neptune)
172+
- [DynamoDB](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#dynamodb)
173+
- [Amazon Timestream](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#amazon-timestream)
174+
- [Amazon EMR](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#amazon-emr)
175+
- [Amazon CloudWatch Logs](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#amazon-cloudwatch-logs)
176+
- [Amazon Chime](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#amazon-chime)
177+
- [Amazon QuickSight](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#amazon-quicksight)
178+
- [AWS STS](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#aws-sts)
179+
- [AWS Secrets Manager](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#aws-secrets-manager)
180+
- [Global Configurations](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#global-configurations)
181+
- [Distributed - Ray](https://aws-sdk-pandas.readthedocs.io/en/3.10.0/api.html#distributed-ray)
182182
- [**License**](https://github.com/aws/aws-sdk-pandas/blob/main/LICENSE.txt)
183183
- [**Contributing**](https://github.com/aws/aws-sdk-pandas/blob/main/CONTRIBUTING.md)
184184

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.9.2b1
1+
3.10.0

awswrangler/__metadata__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77

88
__title__: str = "awswrangler"
99
__description__: str = "Pandas on AWS."
10-
__version__: str = "3.9.2b1"
10+
__version__: str = "3.10.0"
1111
__license__: str = "Apache License 2.0"

awswrangler/_config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ def _apply_type(name: str, value: Any, dtype: type[_ConfigValueType], nullable:
224224
raise exceptions.InvalidArgumentValue(
225225
f"{name} configuration does not accept a null value. Please pass {dtype}."
226226
)
227+
# Handle case where string is empty, "False" or "0". Anything else is True
228+
if isinstance(value, str) and dtype is bool:
229+
return value.lower() not in ("false", "0", "")
227230
try:
228231
return dtype(value) if isinstance(value, dtype) is False else value
229232
except ValueError as ex:

awswrangler/_data_types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,8 @@ def pyarrow2postgresql( # noqa: PLR0911
213213
return pyarrow2postgresql(dtype=dtype.value_type, string_type=string_type)
214214
if pa.types.is_binary(dtype):
215215
return "BYTEA"
216+
if pa.types.is_list(dtype):
217+
return pyarrow2postgresql(dtype=dtype.value_type, string_type=string_type) + "[]"
216218
raise exceptions.UnsupportedType(f"Unsupported PostgreSQL type: {dtype}")
217219

218220

awswrangler/_databases.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@ def generate_placeholder_parameter_pairs(
359359
"""Extract Placeholder and Parameter pairs."""
360360

361361
def convert_value_to_native_python_type(value: Any) -> Any:
362+
if isinstance(value, list):
363+
return value
362364
if pd.isna(value):
363365
return None
364366
if hasattr(value, "to_pydatetime"):

awswrangler/athena/_read.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -793,11 +793,11 @@ def read_sql_query(
793793
794794
**Related tutorial:**
795795
796-
- `Amazon Athena <https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/
796+
- `Amazon Athena <https://aws-sdk-pandas.readthedocs.io/en/3.10.0/
797797
tutorials/006%20-%20Amazon%20Athena.html>`_
798-
- `Athena Cache <https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/
798+
- `Athena Cache <https://aws-sdk-pandas.readthedocs.io/en/3.10.0/
799799
tutorials/019%20-%20Athena%20Cache.html>`_
800-
- `Global Configurations <https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/
800+
- `Global Configurations <https://aws-sdk-pandas.readthedocs.io/en/3.10.0/
801801
tutorials/021%20-%20Global%20Configurations.html>`_
802802
803803
**There are three approaches available through ctas_approach and unload_approach parameters:**
@@ -861,7 +861,7 @@ def read_sql_query(
861861
/athena.html#Athena.Client.get_query_execution>`_ .
862862
863863
For a practical example check out the
864-
`related tutorial <https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/
864+
`related tutorial <https://aws-sdk-pandas.readthedocs.io/en/3.10.0/
865865
tutorials/024%20-%20Athena%20Query%20Metadata.html>`_!
866866
867867
@@ -1138,11 +1138,11 @@ def read_sql_table(
11381138
11391139
**Related tutorial:**
11401140
1141-
- `Amazon Athena <https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/
1141+
- `Amazon Athena <https://aws-sdk-pandas.readthedocs.io/en/3.10.0/
11421142
tutorials/006%20-%20Amazon%20Athena.html>`_
1143-
- `Athena Cache <https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/
1143+
- `Athena Cache <https://aws-sdk-pandas.readthedocs.io/en/3.10.0/
11441144
tutorials/019%20-%20Athena%20Cache.html>`_
1145-
- `Global Configurations <https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/
1145+
- `Global Configurations <https://aws-sdk-pandas.readthedocs.io/en/3.10.0/
11461146
tutorials/021%20-%20Global%20Configurations.html>`_
11471147
11481148
**There are three approaches available through ctas_approach and unload_approach parameters:**
@@ -1206,7 +1206,7 @@ def read_sql_table(
12061206
/athena.html#Athena.Client.get_query_execution>`_ .
12071207
12081208
For a practical example check out the
1209-
`related tutorial <https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/
1209+
`related tutorial <https://aws-sdk-pandas.readthedocs.io/en/3.10.0/
12101210
tutorials/024%20-%20Athena%20Query%20Metadata.html>`_!
12111211
12121212

awswrangler/athena/_write_iceberg.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,13 @@ def _determine_differences(
115115

116116
catalog_column_types = typing.cast(
117117
Dict[str, str],
118-
catalog.get_table_types(database=database, table=table, catalog_id=catalog_id, boto3_session=boto3_session),
118+
catalog.get_table_types(
119+
database=database,
120+
table=table,
121+
catalog_id=catalog_id,
122+
filter_iceberg_current=True,
123+
boto3_session=boto3_session,
124+
),
119125
)
120126

121127
original_column_names = set(catalog_column_types)

awswrangler/catalog/_create.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,7 +1100,7 @@ def create_csv_table(
11001100
If True allows schema evolution (new or missing columns), otherwise a exception will be raised.
11011101
(Only considered if dataset=True and mode in ("append", "overwrite_partitions"))
11021102
Related tutorial:
1103-
https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/tutorials/014%20-%20Schema%20Evolution.html
1103+
https://aws-sdk-pandas.readthedocs.io/en/3.10.0/tutorials/014%20-%20Schema%20Evolution.html
11041104
sep
11051105
String of length 1. Field delimiter for the output file.
11061106
skip_header_line_count
@@ -1280,7 +1280,7 @@ def create_json_table(
12801280
If True allows schema evolution (new or missing columns), otherwise a exception will be raised.
12811281
(Only considered if dataset=True and mode in ("append", "overwrite_partitions"))
12821282
Related tutorial:
1283-
https://aws-sdk-pandas.readthedocs.io/en/3.9.2b1/tutorials/014%20-%20Schema%20Evolution.html
1283+
https://aws-sdk-pandas.readthedocs.io/en/3.10.0/tutorials/014%20-%20Schema%20Evolution.html
12841284
serde_library
12851285
Specifies the SerDe Serialization library which will be used. You need to provide the Class library name
12861286
as a string.

0 commit comments

Comments
 (0)