This PR adds support for Druids SQL Dynamic Parameters.
It's backward compatiable for the existing DB API and is a non breaking change and requires opt in
To opt into using Dynamic Parameters dynamic_parameters=True can be set on the db.api.connect method. It's set to False by default
It ensures correct ordering in thecontext.parameters JSON payload, regardless of the Dict parameters insertion order ensuring support for Python Verisons < 3.7
Fixes a breaking change introduced in #243 for SQLAlchemy, see more below on this
Produced queries/requests been tested against Druid 0.18 and above.
Documented with a working example, inspired from the Druid Tutorial Documentation
SQLAlchemy breaking change fix
Exception was being raised when using the DB API independantly of SQLAlchemy, it was attempting to import CompileError but this is an optional dependency as defined in extras_require. This was introduced in the enhancement #243 - the fix facilitates backwards compatibility but preserves the new enhancement.
This PR adds support for Druids SQL Dynamic Parameters.
dynamic_parameters=True
can be set on thedb.api.connect
method. It's set toFalse
by defaultcontext.parameters
JSON payload, regardless of the Dict parameters insertion order ensuring support for Python Verisons< 3.7
SQLAlchemy breaking change fix Exception was being raised when using the DB API independantly of SQLAlchemy, it was attempting to import
CompileError
but this is an optional dependency as defined inextras_require
. This was introduced in the enhancement #243 - the fix facilitates backwards compatibility but preserves the new enhancement.