Add docs for SQL Alchemy ORM support#1237
Conversation
…hemy and add note on wrapper_plugins
|
|
||
| | Driver | Database Dialect | | ||
| |-------------------|------------------| | ||
| | `aws_wrapper_mysqlconnector` | `mysql` | |
There was a problem hiding this comment.
Curious on this "database dialect" - is that from our wrapper or sql alchemy? if it's our wrapper should we not support aurora-mysql and the other mysql database dialects too?
There was a problem hiding this comment.
I copied this table from the other documentation and adapted it to fit the URL information defined in pyproject.toml:
[tool.poetry.plugins."sqlalchemy.dialects"]
"mysql.aws_wrapper_mysqlconnector" = "aws_advanced_python_wrapper.sqlalchemy.mysql_orm_dialect:SqlAlchemyOrmMysqlDialect"
This is supposed to help the user figure out what the put in their create_engine URL:
create_engine("**mysql+aws_wrapper_mysqlconnector**://your_username:your_password@your-cluster-endpoint.cluster-xyz.us-east-1.rds.amazonaws.com:your_port/your_database_name?connect_timeout=10&wrapper_plugins=aurora_connection_tracker%2Cfailover_v2")
I don't believe we need to explicitly add the aurora-mysql and other mysql database dialects here, but I'm also not 100% sure about this. Maybe worth asking @faviansamatha about this?
|
|
||
| The Read/Write Splitting Plugin is not supported for SQLAlchemy, since session binds already implement this functionality. | ||
|
|
||
| See the [official SQLAlchemy documentation on the Session API](https://docs.sqlalchemy.org/en/20/orm/session_api.html) for more information on session binds. |
There was a problem hiding this comment.
I would love to see this maybe structured a different way or with some additional plugins that ARE supported. You say that there are many other plugins and then only list one so I would suggest either
- add to line 34 that failover is the most relevant and then keep the section as is
- list iam as another plugin that is helpful after failover
I would also like rw splitting to be under a header of something like "not supported" It's confusing that it is positioned the same way as failover which is supported. Adding a not supported section would also give you space to mention that lack of pg support again
There was a problem hiding this comment.
We could consider reworking this into a plugin compatibility section, and create a table indicating which plugins are supported and which are not (rw splitting and srw)
|
|
||
| ### Failover Plugin | ||
|
|
||
| The Failover Plugin provides automatic failover handling for Aurora clusters. When a database instance becomes unavailable, the plugin automatically connects to a healthy instance in the cluster. |
There was a problem hiding this comment.
Can we add a link to the failover plugin docs here
There was a problem hiding this comment.
It was already there, but I decided to move it up to make it more visible. I also updated it to point to the v2 docs instead of v1.
Co-authored-by: Karen <64801825+karenc-bq@users.noreply.github.com>
…o failover 2 docs
Description
This PR adds documentation for SQL Alchemy ORM support.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.