Ask HN: How do you test SQL?
663 pointsI've been looking for resources for our data team to apply best practices for testing SQL pipelines (we use DBT) but have not found anything. How do you test SQL pipelines? What patterns, tools and best practices would you recommend? Any good reference material you know of?
Comments (315) 98 threads
Earlier commentsThe backbone for this is that we spin up a DB per unit test, so we don't have to worry about shared state.
https://news.ycombinator.com/item?id=34580675
I am always baffled by why this ins't more popular way of writing SQL.
Most of the times there is a layer around your sql (a repository, a bash script or whatever) that you can use for integration testing.
All comments shown.
Couldn't load more comments. Check your connection and try again.