|
6 | 6 |
|
7 | 7 | > An [AWS Professional Service](https://aws.amazon.com/professional-services/) open source initiative | [email protected] |
8 | 8 |
|
9 | | -[](https://pypi.org/project/awswrangler/) |
| 9 | +[](https://pypi.org/project/awswrangler/) |
10 | 10 | [](https://anaconda.org/conda-forge/awswrangler) |
11 | 11 | [](https://github.com/psf/black) |
12 | 12 | [](https://opensource.org/licenses/Apache-2.0) |
@@ -56,17 +56,10 @@ df = wr.s3.read_parquet("s3://bucket/dataset/", dataset=True) |
56 | 56 | # Retrieving the data from Amazon Athena |
57 | 57 | df = wr.athena.read_sql_query("SELECT * FROM my_table", database="my_db") |
58 | 58 |
|
59 | | -# Get Redshift connection (SQLAlchemy) from Glue and retrieving data from Redshift Spectrum |
60 | | -engine = wr.catalog.get_engine("my-redshift-connection") |
61 | | -df = wr.db.read_sql_query("SELECT * FROM external_schema.my_table", con=engine) |
62 | | - |
63 | | -# Get MySQL connection (SQLAlchemy) from Glue Catalog and LOAD the data into MySQL |
64 | | -engine = wr.catalog.get_engine("my-mysql-connection") |
65 | | -wr.db.to_sql(df, engine, schema="test", name="my_table") |
66 | | - |
67 | | -# Get PostgreSQL connection (SQLAlchemy) from Glue Catalog and LOAD the data into PostgreSQL |
68 | | -engine = wr.catalog.get_engine("my-postgresql-connection") |
69 | | -wr.db.to_sql(df, engine, schema="test", name="my_table") |
| 59 | +# Get a Redshift connection from Glue Catalog and retrieving data from Redshift Spectrum |
| 60 | +con = wr.redshift.connect("my-glue-connection") |
| 61 | +df = wr.redshift.read_sql_query("SELECT * FROM external_schema.my_table", con=con) |
| 62 | +con.close() |
70 | 63 | ``` |
71 | 64 |
|
72 | 65 | ## [Read The Docs](https://aws-data-wrangler.readthedocs.io/) |
@@ -112,7 +105,10 @@ wr.db.to_sql(df, engine, schema="test", name="my_table") |
112 | 105 | - [Amazon S3](https://aws-data-wrangler.readthedocs.io/en/stable/api.html#amazon-s3) |
113 | 106 | - [AWS Glue Catalog](https://aws-data-wrangler.readthedocs.io/en/stable/api.html#aws-glue-catalog) |
114 | 107 | - [Amazon Athena](https://aws-data-wrangler.readthedocs.io/en/stable/api.html#amazon-athena) |
115 | | - - [Databases (Amazon Redshift, PostgreSQL, MySQL)](https://aws-data-wrangler.readthedocs.io/en/stable/api.html#databases-amazon-redshift-postgresql-mysql) |
| 108 | + - [Amazon Redshift](https://aws-data-wrangler.readthedocs.io/en/stable/api.html#amazon-redshift) |
| 109 | + - [PostgreSQL](https://aws-data-wrangler.readthedocs.io/en/stable/api.html#postgresql) |
| 110 | + - [MySQL](https://aws-data-wrangler.readthedocs.io/en/stable/api.html#mysql) |
| 111 | + - [Amazon Timestream](https://aws-data-wrangler.readthedocs.io/en/stable/api.html#amazon-timestream) |
116 | 112 | - [Amazon EMR](https://aws-data-wrangler.readthedocs.io/en/stable/api.html#amazon-emr) |
117 | 113 | - [Amazon CloudWatch Logs](https://aws-data-wrangler.readthedocs.io/en/stable/api.html#amazon-cloudwatch-logs) |
118 | 114 | - [Amazon QuickSight](https://aws-data-wrangler.readthedocs.io/en/stable/api.html#amazon-quicksight) |
|
0 commit comments