crate / crate-python

Python DB API client library for CrateDB, using HTTP.
https://cratedb.com/docs/python/
Apache License 2.0
79 stars 30 forks source link

SQLAlchemy: Improve DDL compiler to ignore unsupported `UNIQUE` and `FOREIGN KEY` constraints #582

Closed amotl closed 11 months ago

amotl commented 11 months ago

About

Adjust SQLAlchemy's DDL compiler to ignore foreign key and uniqueness constraints, because CrateDB doesn't support them.

Background

At recent work about unlocking MLflow and LangChain to work together with CrateDB ^1, we needed to add some patches/workarounds.

Both of those to be integrated here are pretty straight-forward and non-invasive, and just mask corresponding SQL features not supported by CrateDB anyway, in order run applications with typical data schemas. Other dialects essentially to the same on their corresponding weak spots.

P.S.: I am intending to bring in this patch before running another release, where users are currently waiting for.

/cc @hlcianfagna, @hammerhead, @surister

amotl commented 11 months ago

Good idea. I added 154d77a298051, to emit corresponding warnings, as you suggested.