Everything works as expected on local machine. Code fails where SQLAlchemy db engine initializes. We use latest (17.0.0.8) release of https://pypi.org/project/teradatasqlalchemy/ library to provide DB engine for SQLAlchemy. SQLAlchemy reports that it can not load plugin teradatasql. I attached screenshot with error and piece of code which is used to establish connection. Seems like library pkg_resources which is called inside SQLAlchemy can't resolve teradatasql inside Amazon environment from .zip. Site-packages shipped for Amazon as site-packages.zip placed on AWS s3. Direct imports of teradatasql or pkg_resources work fine (or teradatasqlalchemy which is located in .zip with site-packages on s3 too). Site-packages in archive look same as site-packages in their directory on local machine (i.e. where python located or in virtual env, or inside filesystem of docker container).
To develop script and run ETL job locally we use container (as described here https://aws.amazon.com/blogs/big-data/developing-aws-glue-etl-jobs-locally-using-a-container/) created from our image (installation of python libraries for script from requirements.txt in Dockerfile was added) which inherits from amazon/aws-glue-libs. I also notified Amazon Support. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/87ce8dc9-b015-4ef0-a92a-5c5c10b528fan%40googlegroups.com.