Skip to content

Commit fd051b1

Browse files
chore: Prepare release 3.2.1 (#2343)
1 parent 61f320f commit fd051b1

30 files changed

+139
-850
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 3.2.0
2+
current_version = 3.2.1
33
commit = False
44
tag = False
55
tag_name = {new_version}

CONTRIBUTING_COMMON_ERRORS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Requirement already satisfied: pbr!=2.1.0,>=2.0.0 in ./.venv/lib/python3.7/site-
1313
Using legacy 'setup.py install' for python-Levenshtein, since package 'wheel' is not installed.
1414
Installing collected packages: awswrangler, python-Levenshtein
1515
Attempting uninstall: awswrangler
16-
Found existing installation: awswrangler 3.2.0
17-
Uninstalling awswrangler-3.2.0:
18-
Successfully uninstalled awswrangler-3.2.0
16+
Found existing installation: awswrangler 3.2.1
17+
Uninstalling awswrangler-3.2.1:
18+
Successfully uninstalled awswrangler-3.2.1
1919
Running setup.py develop for awswrangler
2020
Running setup.py install for python-Levenshtein ... error
2121
ERROR: Command errored out with exit status 1:

README.md

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Easy integration with Athena, Glue, Redshift, Timestream, OpenSearch, Neptune, Q
1111

1212
> An [AWS Professional Service](https://aws.amazon.com/professional-services/) open source initiative | [email protected]
1313
14-
[![Release](https://img.shields.io/badge/3.2.0-brightgreen.svg)](https://pypi.org/project/awswrangler/)
14+
[![Release](https://img.shields.io/badge/3.2.1-brightgreen.svg)](https://pypi.org/project/awswrangler/)
1515
[![Python Version](https://img.shields.io/badge/python-3.8%20%7C%203.8%20%7C%203.9%20%7C%203.10-brightgreen.svg)](https://anaconda.org/conda-forge/awswrangler)
1616
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
1717
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
@@ -99,25 +99,25 @@ FROM "sampleDB"."sampleTable" ORDER BY time DESC LIMIT 3
9999
## At scale
100100
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.
101101

102-
The quickest way to get started is to use AWS Glue with Ray. Read our [docs](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/scale.html), our [blog](https://aws.amazon.com/blogs/big-data/scale-aws-sdk-for-pandas-workloads-with-aws-glue-for-ray/), or head to our latest [tutorials](https://github.com/aws/aws-sdk-pandas/tree/main/tutorials) to discover even more features.
102+
The quickest way to get started is to use AWS Glue with Ray. Read our [docs](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/scale.html), our [blog](https://aws.amazon.com/blogs/big-data/scale-aws-sdk-for-pandas-workloads-with-aws-glue-for-ray/), or head to our latest [tutorials](https://github.com/aws/aws-sdk-pandas/tree/main/tutorials) to discover even more features.
103103

104104
## [Read The Docs](https://aws-sdk-pandas.readthedocs.io/)
105105

106-
- [**What is AWS SDK for pandas?**](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/about.html)
107-
- [**Install**](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/install.html)
108-
- [PyPi (pip)](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/install.html#pypi-pip)
109-
- [Conda](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/install.html#conda)
110-
- [AWS Lambda Layer](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/install.html#aws-lambda-layer)
111-
- [AWS Glue Python Shell Jobs](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/install.html#aws-glue-python-shell-jobs)
112-
- [AWS Glue PySpark Jobs](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/install.html#aws-glue-pyspark-jobs)
113-
- [Amazon SageMaker Notebook](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/install.html#amazon-sagemaker-notebook)
114-
- [Amazon SageMaker Notebook Lifecycle](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/install.html#amazon-sagemaker-notebook-lifecycle)
115-
- [EMR](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/install.html#emr)
116-
- [From source](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/install.html#from-source)
117-
- [**At scale**](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/scale.html)
118-
- [Getting Started](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/scale.html#getting-started)
119-
- [Supported APIs](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/scale.html#supported-apis)
120-
- [Resources](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/scale.html#resources)
106+
- [**What is AWS SDK for pandas?**](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/about.html)
107+
- [**Install**](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/install.html)
108+
- [PyPi (pip)](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/install.html#pypi-pip)
109+
- [Conda](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/install.html#conda)
110+
- [AWS Lambda Layer](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/install.html#aws-lambda-layer)
111+
- [AWS Glue Python Shell Jobs](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/install.html#aws-glue-python-shell-jobs)
112+
- [AWS Glue PySpark Jobs](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/install.html#aws-glue-pyspark-jobs)
113+
- [Amazon SageMaker Notebook](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/install.html#amazon-sagemaker-notebook)
114+
- [Amazon SageMaker Notebook Lifecycle](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/install.html#amazon-sagemaker-notebook-lifecycle)
115+
- [EMR](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/install.html#emr)
116+
- [From source](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/install.html#from-source)
117+
- [**At scale**](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/scale.html)
118+
- [Getting Started](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/scale.html#getting-started)
119+
- [Supported APIs](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/scale.html#supported-apis)
120+
- [Resources](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/scale.html#resources)
121121
- [**Tutorials**](https://github.com/aws/aws-sdk-pandas/tree/main/tutorials)
122122
- [001 - Introduction](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/001%20-%20Introduction.ipynb)
123123
- [002 - Sessions](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/002%20-%20Sessions.ipynb)
@@ -158,31 +158,31 @@ The quickest way to get started is to use AWS Glue with Ray. Read our [docs](htt
158158
- [037 - Glue Data Quality](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/037%20-%20Glue%20Data%20Quality.ipynb)
159159
- [038 - OpenSearch Serverless](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/038%20-%20OpenSearch%20Serverless.ipynb)
160160
- [039 - Athena Iceberg](https://github.com/aws/aws-sdk-pandas/blob/main/tutorials/039%20-%20Athena%20Iceberg.ipynb)
161-
- [**API Reference**](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html)
162-
- [Amazon S3](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#amazon-s3)
163-
- [AWS Glue Catalog](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#aws-glue-catalog)
164-
- [Amazon Athena](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#amazon-athena)
165-
- [AWS Lake Formation](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#aws-lake-formation)
166-
- [Amazon Redshift](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#amazon-redshift)
167-
- [PostgreSQL](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#postgresql)
168-
- [MySQL](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#mysql)
169-
- [SQL Server](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#sqlserver)
170-
- [Oracle](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#oracle)
171-
- [Data API Redshift](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#data-api-redshift)
172-
- [Data API RDS](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#data-api-rds)
173-
- [OpenSearch](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#opensearch)
174-
- [AWS Glue Data Quality](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#aws-glue-data-quality)
175-
- [Amazon Neptune](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#amazon-neptune)
176-
- [DynamoDB](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#dynamodb)
177-
- [Amazon Timestream](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#amazon-timestream)
178-
- [Amazon EMR](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#amazon-emr)
179-
- [Amazon CloudWatch Logs](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#amazon-cloudwatch-logs)
180-
- [Amazon Chime](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#amazon-chime)
181-
- [Amazon QuickSight](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#amazon-quicksight)
182-
- [AWS STS](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#aws-sts)
183-
- [AWS Secrets Manager](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#aws-secrets-manager)
184-
- [Global Configurations](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#global-configurations)
185-
- [Distributed - Ray](https://aws-sdk-pandas.readthedocs.io/en/3.2.0/api.html#distributed-ray)
161+
- [**API Reference**](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html)
162+
- [Amazon S3](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#amazon-s3)
163+
- [AWS Glue Catalog](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#aws-glue-catalog)
164+
- [Amazon Athena](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#amazon-athena)
165+
- [AWS Lake Formation](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#aws-lake-formation)
166+
- [Amazon Redshift](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#amazon-redshift)
167+
- [PostgreSQL](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#postgresql)
168+
- [MySQL](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#mysql)
169+
- [SQL Server](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#sqlserver)
170+
- [Oracle](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#oracle)
171+
- [Data API Redshift](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#data-api-redshift)
172+
- [Data API RDS](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#data-api-rds)
173+
- [OpenSearch](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#opensearch)
174+
- [AWS Glue Data Quality](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#aws-glue-data-quality)
175+
- [Amazon Neptune](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#amazon-neptune)
176+
- [DynamoDB](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#dynamodb)
177+
- [Amazon Timestream](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#amazon-timestream)
178+
- [Amazon EMR](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#amazon-emr)
179+
- [Amazon CloudWatch Logs](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#amazon-cloudwatch-logs)
180+
- [Amazon Chime](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#amazon-chime)
181+
- [Amazon QuickSight](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#amazon-quicksight)
182+
- [AWS STS](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#aws-sts)
183+
- [AWS Secrets Manager](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#aws-secrets-manager)
184+
- [Global Configurations](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#global-configurations)
185+
- [Distributed - Ray](https://aws-sdk-pandas.readthedocs.io/en/3.2.1/api.html#distributed-ray)
186186
- [**License**](https://github.com/aws/aws-sdk-pandas/blob/main/LICENSE.txt)
187187
- [**Contributing**](https://github.com/aws/aws-sdk-pandas/blob/main/CONTRIBUTING.md)
188188

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.0
1+
3.2.1

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.2.0"
10+
__version__: str = "3.2.1"
1111
__license__: str = "Apache License 2.0"

awswrangler/athena/__init__.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77
wait_query,
88
)
99
from awswrangler.athena._spark import create_spark_session, run_spark_calculation
10-
from awswrangler.athena._statements import (
11-
create_prepared_statement,
12-
delete_prepared_statement,
13-
list_prepared_statements,
14-
)
1510
from awswrangler.athena._read import ( # noqa
1611
get_query_results,
1712
read_sql_query,
@@ -56,8 +51,5 @@
5651
"stop_query_execution",
5752
"unload",
5853
"wait_query",
59-
"create_prepared_statement",
60-
"list_prepared_statements",
61-
"delete_prepared_statement",
6254
"to_iceberg",
6355
]

awswrangler/athena/_executions.py

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,22 @@
44
from typing import (
55
Any,
66
Dict,
7-
List,
87
Optional,
98
Union,
109
cast,
1110
)
1211

1312
import boto3
1413
import botocore
15-
from typing_extensions import Literal
1614

1715
from awswrangler import _utils, exceptions, typing
1816
from awswrangler._config import apply_configs
17+
from awswrangler._sql_formatter import _process_sql_params
1918

2019
from ._cache import _cache_manager, _CacheInfo, _check_for_cached_results
2120
from ._utils import (
2221
_QUERY_FINAL_STATES,
2322
_QUERY_WAIT_POLLING_DELAY,
24-
_apply_formatter,
2523
_get_workgroup_config,
2624
_start_query_execution,
2725
_WorkGroupConfig,
@@ -38,8 +36,7 @@ def start_query_execution(
3836
workgroup: Optional[str] = None,
3937
encryption: Optional[str] = None,
4038
kms_key: Optional[str] = None,
41-
params: Union[Dict[str, Any], List[str], None] = None,
42-
paramstyle: Literal["qmark", "named"] = "named",
39+
params: Optional[Dict[str, Any]] = None,
4340
boto3_session: Optional[boto3.Session] = None,
4441
athena_cache_settings: Optional[typing.AthenaCacheSettings] = None,
4542
athena_query_wait_polling_delay: float = _QUERY_WAIT_POLLING_DELAY,
@@ -67,25 +64,10 @@ def start_query_execution(
6764
None, 'SSE_S3', 'SSE_KMS', 'CSE_KMS'.
6865
kms_key : str, optional
6966
For SSE-KMS and CSE-KMS , this is the KMS key ARN or ID.
70-
params: Dict[str, any] | List[str], optional
71-
Parameters that will be used for constructing the SQL query.
72-
Only named or question mark parameters are supported.
73-
The parameter style needs to be specified in the ``paramstyle`` parameter.
74-
75-
For ``paramstyle="named"``, this value needs to be a dictionary.
76-
The dict needs to contain the information in the form ``{'name': 'value'}`` and the SQL query needs to contain
77-
``:name``.
78-
The formatter will be applied client-side in this scenario.
79-
80-
For ``paramstyle="qmark"``, this value needs to be a list of strings.
81-
The formatter will be applied server-side.
82-
The values are applied sequentially to the parameters in the query in the order in which the parameters occur.
83-
paramstyle: str, optional
84-
Determines the style of ``params``.
85-
Possible values are:
86-
87-
- ``named``
88-
- ``qmark``
67+
params: Dict[str, any], optional
68+
Dict of parameters that will be used for constructing the SQL query. Only named parameters are supported.
69+
The dict needs to contain the information in the form {'name': 'value'} and the SQL query needs to contain
70+
`:name`. Note that for varchar columns and similar, you must surround the value in single quotes.
8971
boto3_session : boto3.Session(), optional
9072
Boto3 Session. The default boto3 session will be used if boto3_session receive None.
9173
athena_cache_settings: typing.AthenaCacheSettings, optional
@@ -121,8 +103,7 @@ def start_query_execution(
121103
>>> query_exec_id = wr.athena.start_query_execution(sql='...', database='...', data_source='...')
122104
123105
"""
124-
# Substitute query parameters if applicable
125-
sql, execution_params = _apply_formatter(sql, params, paramstyle)
106+
sql = _process_sql_params(sql, params)
126107
_logger.debug("Executing query:\n%s", sql)
127108

128109
athena_cache_settings = athena_cache_settings if athena_cache_settings else {}
@@ -158,7 +139,6 @@ def start_query_execution(
158139
workgroup=workgroup,
159140
encryption=encryption,
160141
kms_key=kms_key,
161-
execution_params=execution_params,
162142
boto3_session=boto3_session,
163143
)
164144
if wait:

awswrangler/athena/_executions.pyi

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from typing import (
22
Any,
33
Dict,
4-
List,
54
Literal,
65
Optional,
76
Union,
@@ -20,8 +19,7 @@ def start_query_execution(
2019
workgroup: Optional[str] = ...,
2120
encryption: Optional[str] = ...,
2221
kms_key: Optional[str] = ...,
23-
params: Union[Dict[str, Any], List[str], None] = ...,
24-
paramstyle: Literal["qmark", "named"] = ...,
22+
params: Optional[Dict[str, Any]] = ...,
2523
boto3_session: Optional[boto3.Session] = ...,
2624
athena_cache_settings: Optional[typing.AthenaCacheSettings] = ...,
2725
athena_query_wait_polling_delay: float = ...,
@@ -37,8 +35,7 @@ def start_query_execution(
3735
workgroup: Optional[str] = ...,
3836
encryption: Optional[str] = ...,
3937
kms_key: Optional[str] = ...,
40-
params: Union[Dict[str, Any], List[str], None] = ...,
41-
paramstyle: Literal["qmark", "named"] = ...,
38+
params: Optional[Dict[str, Any]] = ...,
4239
boto3_session: Optional[boto3.Session] = ...,
4340
athena_cache_settings: Optional[typing.AthenaCacheSettings] = ...,
4441
athena_query_wait_polling_delay: float = ...,
@@ -54,8 +51,7 @@ def start_query_execution(
5451
workgroup: Optional[str] = ...,
5552
encryption: Optional[str] = ...,
5653
kms_key: Optional[str] = ...,
57-
params: Union[Dict[str, Any], List[str], None] = ...,
58-
paramstyle: Literal["qmark", "named"] = ...,
54+
params: Optional[Dict[str, Any]] = ...,
5955
boto3_session: Optional[boto3.Session] = ...,
6056
athena_cache_settings: Optional[typing.AthenaCacheSettings] = ...,
6157
athena_query_wait_polling_delay: float = ...,

0 commit comments

Comments
 (0)