GoogleCloudPlatform / GoogleCloudPlatform/professional-services-data-validator

Some backends are subclassed and others are monkey patched - better to do it one way

Open
#1,771 1 comment 0 reactions 0 assignees View on GitHub
type: feature request
Dominant language
Python
Stars
524
Forks
171
Avg merge
5d 15h
Merged PRs (30d)
4

Description

**Is your feature request related to a problem? Please describe.**
This is code refactoring, clarity and improvement

**What version of DVT are you using?**
8.7

**What type of connections are you using for source and target?**
Postgres

**Describe the solution you'd like**
DVT uses backend in two different ways
1. The Oracle, MSSQL model - where the a Backend child class with BaseAlchemyBackend as the base class
2. The Postgres, MySQL model - where the ibis backend is monkey patched to add libraries.

Both models provide similar functionality, customized do_connect, list_primary_keys, raw_metadata, is_char_padded etc. The first appears cleaner, the second is difficult to understand.

Better if we go with one model, perhaps the first - thoughts?

Contributor guide

Open the contributing guide

Research direction

Read the Oracle and MSSQL backend subclasses alongside the Postgres and MySQL implementations that monkey patch ibis. Compare how do_connect, list_primary_keys, raw_metadata, and is_char_padded are provided, then define which single backend model should replace both approaches while preserving that functionality.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, postgres, python
Domain
backend, databases
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.