In an ETL process a table is dynamically constructed using a complex SQL query. This query is written by a developer. As a QA engineer, how can I validate that the table is correct according to specification?
What I am doing right now is:
1/ Validating constraints. For example: No duplicate for some functional key, no null value..
2/ Trying to rewrite the query and comparing the results with the developer’s query (should give same result).
I feel that 1/ is not enough and 2/ is doing the developer’s job again (if i use his code, it is not validating anything, writing my own is complicated and I can also make mistakes in my code).
What is a good strategy to test this kind of database?