sqlalchemy-vertica-python is a Vertica dialect for SQLAlchemy that utilizes the pure-Python DB-API driver `vertica-python` for database connectivity. It is currently at version 0.6.3, actively maintained by BlueLabs, and typically releases updates to align with SQLAlchemy versions or address bugs.
pip install sqlalchemy-vertica-pythonVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to establish a connection to a Vertica database using `sqlalchemy-vertica-python` and execute a simple query to retrieve the database version. Ensure your Vertica instance is accessible and replace placeholder credentials with actual environment variables or direct values.
Review the SQLAlchemy 2.0 migration guide and update application code accordingly. For connection string usage, ensure `create_engine` is used. Consider pinning `sqlalchemy` to a 1.x version if immediate migration to 2.0 is not feasible with older dialect versions.
Always use `with engine.connect() as connection:` to ensure connections are properly closed, or manually call `connection.close()` and `engine.dispose()` when managing connections manually.
Be aware of potential limitations and ensure thorough testing in production environments. Consider contributing to the project for missing features.
Explicitly define the `dtype` mapping for string columns to `sqlalchemy.types.VARCHAR` when using `df.to_sql` to ensure correct type inference and prevent issues.