datajudge
datajudge copied to clipboard
Support Oracle Database
Context
As of now, datajudge comes with full-fledged support for
- Postgres
- MSSQL
- Snowflake
and partial support for
- Impala
- DB2
- BigQuery
We might consider adding support for Oracle Database.
Objectives
On a high-level, there a two components to supporting a new backend:
- Ensuring that an instance of this backend is available for tests to be run against
- Ensuring -- via our integration tests -- that the queries built by
datajudgeare accepted by the backend and yield the expected results
Naturally, systematically tackling the latter requires the former.
Tasks
In order to tackle the first objective, these tasks will be required:
- Providing a docker container with a backend instance
- E.g. mssql, postgres
- Oracle seems to have a container registry with, among others, this repository for Oracle Database. We would need to double-check the licensing clause.
- Adding a corresponding job to the CI integration tests
- Implementing a way to connect to said docker container from Python, see
get_engine- This reference from sqlalchemy might be useful.
- Adding a
pytestparser option for this backend inpytest_addoption - Creating a
pixienvironment for this backend with the correspond backend-specific dependencies (e.g. a driver package, the sqlalchemy connector ) and the corresponding integration test command
Once this is up and running, we should already get feedback regarding the second objective. We will probably need to tweak a couple of conditions in the query-building engine, such as _date_gap_condition. I'm happy to take care of that.
FYI @DanielSchalkQC