3 ms·
> It lets me write test first sql transforms. I never thought TDD sql would be possible I went through the library you linked, but I’m really, really not convi
by FridgeSeal 4y ago
> It lets me write test first sql transforms. I never thought TDD sql would be possible
I went through the library you linked, but I’m really, really not convinced. This just looks like a messier, more unclear way to test some SQL. A feat you could with some spark code (for example) in a significantly less confusing and boilerplate-y manner.
I think the benefit is that dbt appears to give some cleaner way to separate and the re-compose SQL. Which is good, we do need that. However it does it in the most awkward and unwieldy way possible (string templating) and yet it’s heralded as “the true way forward”.
- mythhouse 4y agoSure a full fledged programming stack will obviously have a more mature tdd facilities. this if you choose to write sql . sql vs spark is probably a discussion for another time :0 > This just looks like a messier, more unclear way to test some SQL. As a software engineer I've written my own share of unit tests. They are supposed to be documentation of how a unit might work but it rarely ever works in that way. I found that to be more true for CSV tests for sql https://github.com/EqualExperts/dbt-unit-testing#different-ways-to-build-mock-values https://github.com/EqualExperts/dbt-unit-testing#different-w... because they are always in the same format , input csv -> output csv I am more motivated to look at the tests to see what sql is doing. Its pretty straight forward.