Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for SQLAlchemy 2.X.X to be installed alongside dbt-databricks #550

Open
ewengillies opened this issue Jan 14, 2024 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@ewengillies
Copy link

Describe the feature

We've been having trouble making pip happy with SQLAlchemy 2.X.X installed in the same python environment as dbt-databricks. This is because dbt-databricks pins to databricks-sql-python < 3.0.0 which implicitly pins to SQLAlchemy < 2.0.0

I see great progress has been made on the SQLAlchemy 2.X.X front in the dependent databricks-sql-python library: https://github.com/databricks/databricks-sql-python/releases/tag/v3.0.0. It is pinned to above 2.0.0 now and optional, which are both excellent!

Describe alternatives you've considered

In my experience, SQLAlchemy was always optional in nature to databricks-sql-python (or databricks-sql-connector as it used to be called).

You can get the needed state through several pip installs like this:

pip install dbt-databricks==1.7.3
pip install --no-warn-conflicts 'SQLAlchemy>=2.0.0`

This logics is repeated over a few of our CI/CD environments, its not great.

Additional context

None.

Who will this benefit?

Anyone like me who needs dbt-databricks and sqlalchemy > 2.0.0 to co-exist in a python environment.

Are you interested in contributing this feature?

No, just curious as to the roadmap for loosening the databricks-sql-python < 3.0.0 pin in dbt-databricks.

@susodapop any thoughts on this? Thanks! --Ewen

@ewengillies ewengillies added the enhancement New feature or request label Jan 14, 2024
@benc-db
Copy link
Collaborator

benc-db commented Jan 16, 2024

This is top of mind for me, just need to finish the feature push on MV/ST. We will update to being compatible with databricks-sql-python soon, but its a breaking change, so requires a little bit of effort. If you want to speed up the process, please feel free to send out a PR that accomplishes the upgrade. The breaking change bit is around query parameters, which I believe comes up only with seeds.

@benc-db
Copy link
Collaborator

benc-db commented Feb 26, 2024

We had to roll back to 2.9.3 due to retry behavior regression. If you want, you can try 1.8.0b1 (where we upgrade to 3.1.0 for databricks-sql-connector).

@ewengillies
Copy link
Author

Hi @benc-db, thanks for the update here. I've been watching the releases and saw the move back to 2.9.3. Good to know 1.8.0 is right around the corner! Thanks for the update here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants