Skip to content

Conversation

@dbirman
Copy link
Member

@dbirman dbirman commented Nov 17, 2025

I believe this is the correct way to get us out of the mess we're in with Redshift dependencies. I tested with python 3.13 and this works properly for me, and it installs in another repository (zombie-squirrel) that communicates with redshift, and that runs properly.

We should be careful to test this across python versions on non-mac architectures before merging.

@dbirman dbirman linked an issue Nov 17, 2025 that may be closed by this pull request
7 tasks
@dbirman
Copy link
Member Author

dbirman commented Nov 20, 2025

Testing on Python 3.12 on a different mac (M1 instead of M3) this failed for me with 2025-11-19 16:10:04,411 Error fetching from cache: (psycopg.NotSupportedError) codec not available in Python: 'UNICODE' [SQL: select pg_catalog.version()]

@dbirman
Copy link
Member Author

dbirman commented Nov 20, 2025

On further testing it just seems like psycopg2/SQLAlchemy don't work well on Mac, and also maybe aren't the proper solution anymore. Trying with redshift-connector instead (and changing to a draft)

@dbirman dbirman marked this pull request as draft November 20, 2025 02:36
@jtyoung84
Copy link
Contributor

For an early 2026 project, I want to run this in a Lambda function and have users interact with an REST API endpoint like what we're doing with DocDB instead of interfacing with Redshift directly. If this is working in Code Ocean at least, then maybe that can hold us over until then.

@dbirman
Copy link
Member Author

dbirman commented Nov 20, 2025

redshift-connector seems to work for reading from redshift. I need to test across python versions though and test writing. But yes a different solution is probably better. I will also ask David about just read/write from some parquet files in a folder on aind-open-data as a workaround until a better API can be built.

@jtyoung84
Copy link
Contributor

redshift-connector seems to work for reading from redshift. I need to test across python versions though and test writing. But yes a different solution is probably better. I will also ask David about just read/write from some parquet files in a folder on aind-open-data as a workaround until a better API can be built.

aind-scratch-data is also a public bucket that might be better as a short-term solution.

@dbirman dbirman closed this Nov 24, 2025
@dbirman dbirman deleted the test-rds-psycopg branch November 24, 2025 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On mac 'brew install postgresql' is required to use RDS features

3 participants