pydiverse / pydiverse.pipedag

A data pipeline orchestration library for rapid iterative development with automatic cache invalidation allowing users to focus writing their tasks in pandas, polars, sqlalchemy, ibis, and alike.
https://pydiversepipedag.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
12 stars 2 forks source link

SQLAlchemy >= 2.0.0, Depedency for IBM-DB2 #206

Open DelongChenQC opened 1 week ago

DelongChenQC commented 1 week ago

When using pipedag_config.get('instance') function with an IBM-DB2 that needs to be connected to. There is the following error, when SQLAlchemy is below version 2.0.0:

I only logged the actuall error outputs.

TypeError: Invalid argument(s) 'isolation_level' sent to create_engine(), using configuration DB2Dialect_ibm_db/QueuePool/Engine.  Please check that the keyword arguments are appropriate for this combination of components.
RuntimeError: Failed loading table_store
RuntimeError: Error while creating backend objects from pipedag config (instance=mini, flow=None): /home/ubuntu/hf4-claims-exploration/src/hf4_claims_exploration/pipeline/pipedag.yaml

To my understanding, when trying to call the create_engine() function of sqlalchemy, with an specific isolation_level for versions below 2.0.0 it can lead to incompatibility issues. This is fixed in versions > 2.0.0 as noted here. I simply upgraded the sqlalchemy version and then it worked. Does this incompatibility maybe warrant setting the SQLAlchemy dependency to > 2.0.0 in the pyproject.toml?