@@ -44,10 +44,30 @@ df = wr.s3.read_parquet("s3://bucket/dataset/", dataset=True)
4444df = wr.athena.read_sql_query(" SELECT * FROM my_table" , database = " my_db" )
4545
4646# Getting Redshift connection (SQLAlchemy) from Glue Catalog Connections
47- engine = wr.catalog.get_engine(" my-redshift-connection" )
48-
4947# Retrieving the data from Amazon Redshift Spectrum
48+ engine = wr.catalog.get_engine(" my-redshift-connection" )
5049df = wr.db.read_sql_query(" SELECT * FROM external_schema.my_table" , con = engine)
50+
51+ # Creating QuickSight Data Source and Dataset to reflect our new table
52+ wr.quicksight.create_athena_data_source(" athena-source" , allowed_to_manage = [" username" ])
53+ wr.quicksight.create_athena_dataset(
54+ name = " my-dataset" ,
55+ database = " my_db" ,
56+ table = " my_table" ,
57+ data_source_name = " athena-source" ,
58+ allowed_to_manage = [" username" ]
59+ )
60+
61+ # Getting MySQL connection (SQLAlchemy) from Glue Catalog Connections
62+ # Load the data into MySQL
63+ engine = wr.catalog.get_engine(" my-mysql-connection" )
64+ wr.db.to_sql(df, engine, schema = " test" , name = " my_table" )
65+
66+ # Getting PostgreSQL connection (SQLAlchemy) from Glue Catalog Connections
67+ # 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" )
70+
5171```
5272
5373## [ Read The Docs] ( https://aws-data-wrangler.readthedocs.io/ )
@@ -80,13 +100,15 @@ df = wr.db.read_sql_query("SELECT * FROM external_schema.my_table", con=engine)
80100 - [ 015 - EMR] ( https://github.com/awslabs/aws-data-wrangler/blob/master/tutorials/015%20-%20EMR.ipynb )
81101 - [ 016 - EMR & Docker] ( https://github.com/awslabs/aws-data-wrangler/blob/master/tutorials/016%20-%20EMR%20%26%20Docker.ipynb )
82102 - [ 017 - Partition Projection] ( https://github.com/awslabs/aws-data-wrangler/blob/master/tutorials/017%20-%20Partition%20Projection.ipynb )
103+ - [ 018 - QuickSight] ( https://github.com/awslabs/aws-data-wrangler/blob/master/tutorials/018%20-%20QuickSight.ipynb )
83104- [ ** API Reference** ] ( https://aws-data-wrangler.readthedocs.io/en/latest/api.html )
84105 - [ Amazon S3] ( https://aws-data-wrangler.readthedocs.io/en/latest/api.html#amazon-s3 )
85106 - [ AWS Glue Catalog] ( https://aws-data-wrangler.readthedocs.io/en/latest/api.html#aws-glue-catalog )
86107 - [ Amazon Athena] ( https://aws-data-wrangler.readthedocs.io/en/latest/api.html#amazon-athena )
87108 - [ Databases (Redshift, PostgreSQL, MySQL)] ( https://aws-data-wrangler.readthedocs.io/en/latest/api.html#databases-redshift-postgresql-mysql )
88109 - [ EMR Cluster] ( https://aws-data-wrangler.readthedocs.io/en/latest/api.html#emr-cluster )
89110 - [ CloudWatch Logs] ( https://aws-data-wrangler.readthedocs.io/en/latest/api.html#cloudwatch-logs )
111+ - [ QuickSight] ( https://aws-data-wrangler.readthedocs.io/en/latest/api.html#quicksight )
90112- [ ** License** ] ( https://github.com/awslabs/aws-data-wrangler/blob/master/LICENSE )
91113- [ ** Contributing** ] ( https://github.com/awslabs/aws-data-wrangler/blob/master/CONTRIBUTING.md )
92114- [ ** Legacy Docs** (pre-1.0.0)] ( https://aws-data-wrangler.readthedocs.io/en/legacy/ )
0 commit comments