File tree 7 files changed +17
-5
lines changed
7 files changed +17
-5
lines changed Original file line number Diff line number Diff line change 6
6
7
7
> An [ AWS Professional Service] ( https://aws.amazon.com/professional-services/ ) open source initiative | [email protected]
8
8
9
- [ ![ Release] ( https://img.shields.io/badge/release-1.10.0 -brightgreen.svg )] ( https://pypi.org/project/awswrangler/ )
9
+ [ ![ Release] ( https://img.shields.io/badge/release-1.10.1 -brightgreen.svg )] ( https://pypi.org/project/awswrangler/ )
10
10
[ ![ Python Version] ( https://img.shields.io/badge/python-3.6%20%7C%203.7%20%7C%203.8-brightgreen.svg )] ( https://anaconda.org/conda-forge/awswrangler )
11
11
[ ![ Code style: black] ( https://img.shields.io/badge/code%20style-black-000000.svg )] ( https://github.com/psf/black )
12
12
[ ![ License] ( https://img.shields.io/badge/License-Apache%202.0-blue.svg )] ( https://opensource.org/licenses/Apache-2.0 )
Original file line number Diff line number Diff line change 7
7
8
8
__title__ : str = "awswrangler"
9
9
__description__ : str = "Pandas on AWS."
10
- __version__ : str = "1.10.0 "
10
+ __version__ : str = "1.10.1 "
11
11
__license__ : str = "Apache License 2.0"
Original file line number Diff line number Diff line change 86
86
"tables" ,
87
87
"delete_database" ,
88
88
"delete_table_if_exists" ,
89
+ "delete_partitions" ,
90
+ "delete_all_partitions" ,
89
91
]
Original file line number Diff line number Diff line change @@ -571,6 +571,11 @@ def get_engine(
571
571
conn_str : str = f"{ db_type } +psycopg2://{ user } :{ password } @{ host } :{ port } /{ database } "
572
572
sqlalchemy_kwargs ["executemany_mode" ] = "values"
573
573
sqlalchemy_kwargs ["executemany_values_page_size" ] = 100_000
574
+ if db_type == "redshift" :
575
+ # pylint: disable=import-outside-toplevel,unused-import
576
+ import sqlalchemy_redshift .dialect # noqa: F401
577
+
578
+ # pylint: enable=import-outside-toplevel,unused-import
574
579
return sqlalchemy .create_engine (conn_str , ** sqlalchemy_kwargs )
575
580
if db_type == "mysql" :
576
581
conn_str = f"mysql+pymysql://{ user } :{ password } @{ host } :{ port } /{ database } "
Original file line number Diff line number Diff line change @@ -386,7 +386,7 @@ def read_sql_query(
386
386
Parameters
387
387
----------
388
388
sql : str
389
- Pandas DataFrame https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html
389
+ SQL query.
390
390
con : sqlalchemy.engine.Engine
391
391
SQLAlchemy Engine. Please use,
392
392
wr.db.get_engine(), wr.db.get_redshift_temp_engine() or wr.catalog.get_engine()
@@ -642,6 +642,11 @@ def get_engine(
642
642
conn_str : str = f"{ db_type } +psycopg2://{ user } :{ password } @{ host } :{ port } /{ database } "
643
643
sqlalchemy_kwargs ["executemany_mode" ] = "values"
644
644
sqlalchemy_kwargs ["executemany_values_page_size" ] = 100_000
645
+ if db_type == "redshift" :
646
+ # pylint: disable=import-outside-toplevel,unused-import
647
+ import sqlalchemy_redshift .dialect # noqa: F401
648
+
649
+ # pylint: enable=import-outside-toplevel,unused-import
645
650
return sqlalchemy .create_engine (conn_str , ** sqlalchemy_kwargs )
646
651
if db_type == "mysql" :
647
652
conn_str = f"mysql+pymysql://{ user } :{ password } @{ host } :{ port } /{ database } "
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ pytest==6.1.2
10
10
pytest-cov == 2.10.1
11
11
pytest-xdist == 2.1.0
12
12
pytest-timeout == 1.4.2
13
- cfn-lint ~= 0.41 .0
13
+ cfn-lint ~= 0.42 .0
14
14
pydot ~= 1.4.1
15
15
cfn-flip == 1.2.3
16
16
twine == 3.2.0
Original file line number Diff line number Diff line change 2
2
3
3
4
4
def test_metadata ():
5
- assert wr .__version__ == "1.10.0 "
5
+ assert wr .__version__ == "1.10.1 "
6
6
assert wr .__title__ == "awswrangler"
7
7
assert wr .__description__ == "Pandas on AWS."
8
8
assert wr .__license__ == "Apache License 2.0"
You can’t perform that action at this time.
0 commit comments