Justin Boutwell
03/14/2023, 7:40 PMdf = pd.read_sql_query(interpolated_query, connection)
becomes
df = pd.read_sql_query(sqlalchemy.text(interpolated_query), connection)
I can verify locally sqlalchemy 1.4.x works with either a text object or string, but 2.0.x only works with text.
I can submit that as an issue against flytekit, but I'm wondering if a) if there is a way to verify what version of the module the task is using and b) if there is a way to force using a specific sqlalchemy version.import sqlalchemy
line. Are there packages not included or not resolvable in the base python image? (if that question even makes sense)sql_task = SQLAlchemyTask(container_image="<http://cr.flyte.org/flyteorg/flytekit:py3.10-sqlalchemy-1.2.7|cr.flyte.org/flyteorg/flytekit:py3.10-sqlalchemy-1.2.7>", ...)
I also got using sqlalchemy library working directly by using the sqlalchemy image which has the dependencies built in (conversely I could build my own image) and specifying it at runtime
pyflyte run -p flyte-test -d development --destination-dir /app --remote --image <http://cr.flyte.org/flyteorg/flytekit:py3.10-sqlalchemy-latest|cr.flyte.org/flyteorg/flytekit:py3.10-sqlalchemy-latest> db_test.py db_workflow --limit 5
Samhita Alla
03/15/2023, 7:38 AMJustin Boutwell
03/15/2023, 1:56 PMSamhita Alla
03/15/2023, 3:00 PMSlackbot
03/15/2023, 3:01 PMSamhita Alla
03/15/2023, 3:01 PM