data-diff
data-diff copied to clipboard
Remove Preql scripts; rely on database_types.py instead
@erezsh wdyt about removing all the Preql scripts and just rely on database_types.py
instead? We can add instructions on running a single test to seed your local database if you want to just run it locally.
I think this would cut down on the amount of testing code we have to maintain
If someone wants to send a PR for it, they're welcome to.
Things that it would have to solve:
- DDL operations (mostly create & drop, but requires translating column types)
- Resolving table names, so it uses the right schema, handling of lower/upper-case mangling, and avoiding reserved keywords (like
comment
in oracle) - Syntax variations (there are many). examples:
- In MySQL
||
is "or", not "concat". In Oracle, "concat" can only accept two arguments, but||
is concat.
- In MySQL
- (to be updated)
So far, trying to get our tests to run on all databases, only makes me think that more of them should use Preql, not less.
I just stumbled across this while building a driver for Exasol. Is there anything new on this topic? How should one currently deal with testing new drivers for databases that are not supported by Preql?
@nklsw Preql is not necessary to test new drivers. Read this guide: https://data-diff.readthedocs.io/en/latest/new-database-driver-guide.html
@erezsh Do I understand you correctly that I should not include a new database in TEST_DATABASES? Just out of interest: What are these tests for and why should not all supported databases be tested there?
Task completed.