abundant-laptop-64153
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.abundant-laptop-64153
03/14/2023, 7:42 PMimport sqlalchemy
line. Are there packages not included or not resolvable in the base python image? (if that question even makes sense)abundant-laptop-64153
03/15/2023, 1:48 AMsql_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
tall-lock-23197
abundant-laptop-64153
03/15/2023, 1:56 PMabundant-laptop-64153
03/15/2023, 1:59 PMtall-lock-23197
tall-lock-23197
user
03/15/2023, 3:01 PMtall-lock-23197
tall-lock-23197