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

sqlalchemy-redshift seems dormant and does not seem to be compatible with current environments despite being recommended by dvc #5343

Closed
DaveParr opened this issue Feb 10, 2025 · 6 comments
Labels
A: docs Area: user documentation (gatsby-theme-iterative) C: ref Content of /doc/*-reference 🐛 type: bug Something isn't working.

Comments

@DaveParr
Copy link

import-db docs reference sqlalchemy-redshift which seems to be an unsupported/dormant/soon to be archived package.

I also believe due to version constraints it's not possible to install the dependency in 'current' projects since sqlalchemy went 2.0.0:

poetry add sqlalchemy-redshift
Using version ^0.8.14 for sqlalchemy-redshift

Updating dependencies
Resolving dependencies... (0.0s)

Because no versions of sqlalchemy-redshift match >0.8.14,<0.9.0
 and sqlalchemy-redshift (0.8.14) depends on SQLAlchemy (>=0.9.2,<2.0.0), sqlalchemy-redshift (>=0.8.14,<0.9.0) requires SQLAlchemy (>=0.9.2,<2.0.0).
So, because cable-forecasting-v2 depends on both sqlalchemy (^2.0.38) and sqlalchemy-redshift (^0.8.14), version solving failed.

While a project might be able to use a prior sqlalchemy version right now, it appears that would be a significant practical constraint as sqlalchemy-redshift doesn't seem to aim to release a new update?

@shcheklein
Copy link
Member

@DaveParr do you know about the alternatives? can you recommend an update to the docs?

@shcheklein shcheklein added A: docs Area: user documentation (gatsby-theme-iterative) C: ref Content of /doc/*-reference 🐛 type: bug Something isn't working. labels Feb 10, 2025
@DaveParr
Copy link
Author

DaveParr commented Feb 11, 2025

@shcheklein I'm afraid I don't.

From sqlalchemy/sqlalchemy#11950 it seems that sqlalchemy are not interested in plugging this hole themselves, and also have highlighted that as redshift is 'proprietary' it makes any non-aws backed project a significantly larger lift.

I don't work for aws but I am guessing that they saw that this functionally overlaps a subset of the capabilities of awswrangler https://aws-sdk-pandas.readthedocs.io/en/3.11.0/stubs/awswrangler.redshift.connect.html and so that's where the focus has gone? However, as DVC seems to be sqlalchemy based and awswrangler might not be I don't think this is a drop in replacement.

For our current codebase I expect we will work around this using a dvc stage which calls a python command that does the execution against redshift using aws wrangler during it's execution. I realise it's slightly less ergonomic and we miss out on a few nice to haves but it will fulfil our needs today.

@shcheklein
Copy link
Member

@skshetry should we remove it from docs or mention that it is deprecated?

@skshetry
Copy link
Member

skshetry commented Feb 12, 2025

DVC is compatible with SQLAlchemy v1 as well, so that still works.

However, the PyPI packages mentioned on the page are third-party packages, and we can't guarantee that they will always work — they are only recommendations.

@shcheklein
Copy link
Member

okay, let's close this for now. I think users can see and decide on their own.

@shcheklein shcheklein closed this as not planned Won't fix, can't repro, duplicate, stale Feb 12, 2025
@DaveParr
Copy link
Author

DaveParr commented Feb 13, 2025

Totally understand this decision, thanks for working it through with me.

Last thing, in case it's useful. In poking awswrangler I came across this: https://github.com/aws/amazon-redshift-python-driver which has this issue: aws/amazon-redshift-python-driver#253

Very unsure where this exists in the stack, I have no prior experience with it, but thought it might have some relevance to working this through for people more in the db connections weeds than me.

Eitherway, thanks for the work, DVC is providing us a tonne of benefit even outside this 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: docs Area: user documentation (gatsby-theme-iterative) C: ref Content of /doc/*-reference 🐛 type: bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

3 participants