News for hackers. Stuff that matters.
Re:Ask HN: How do you test SQL? by marijnz0r on Wednesday February 01, 2023 @03:10AM (#34607814)
I really like this answer because it tests CTEs in a modular way. One question I have is: how do you test a the CTE with an in.csv and out.csv without altering the original CTE? Currently I have a chain of multiple CTEs in a sequence, so how would I be able to take the middle CTE and "mock" the previous one without altering the CTE actually used in production? I prefer not to maintain a CTE for the live query and the same CTE adapted for tests.

There are no comments on this comment yet.