crate / cratedb-examples

A collection of clear and concise examples how to work with CrateDB.
Apache License 2.0
9 stars 7 forks source link

Evaluate mainlining of `cratedb_toolkit.sqlalchemy.patch.patch_inspector` #137

Open amotl opened 11 months ago

amotl commented 11 months ago

About

@ckurze and @amotl discovered a case where the flaw is reproducible, that SQLAlchemy's introspection/reflection machinery is not able to pick up the schema name correctly.

Details

832c3bc176a fixes it. Indeed, we apparently need a runtime fix here, when using a non-standard schema (doc vs. testdrive).

# TODO: Bring this into the `crate-python` driver.
from cratedb_toolkit.sqlalchemy.patch import patch_inspector
patch_inspector()

_Originally posted by @amotl in https://github.com/crate/cratedb-examples/pull/136#discussion_r1386949635_

amotl commented 10 months ago

We need the patch at influxio, mlflow-cratedb, and langchain. This clearly indicates it should be mainlined.

-- https://github.com/search?q=patch_inspector+language%3APython&type=code&l=Python

amotl commented 8 months ago

This is the corresponding upstream patch.