datajudge icon indicating copy to clipboard operation
datajudge copied to clipboard

Support Oracle Database

Open kklein opened this issue 1 year ago • 1 comments

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:

  1. Ensuring that an instance of this backend is available for tests to be run against
  2. Ensuring -- via our integration tests -- that the queries built by datajudge are 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
  • Adding a pytest parser option for this backend in pytest_addoption
  • Creating a pixi environment 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.

kklein avatar Oct 24 '24 09:10 kklein

FYI @DanielSchalkQC

kklein avatar Oct 24 '24 09:10 kklein