In this article, we saw the importance of having good data quality, and how to use soda.io to monitor it, covering the checks by a concrete unit testing strategy. Among the possible checks, we saw the possibility of checking the failed rows of a table. In this article we will see how to refactor the SQL queries to make them more maintainable with a pattern where we will be able to see different parts of the query in a more clear way (building, errorsRows and reportedRows).
The failed rows check, in short, is a query that returns the rows that meet a fail condition. For example, if we have a table where start date is later than end date, we can check the rows that meet this condition with the following query:
Do you want more? We invite you to subscribe to our newsletter to get the most relevan articles.
If you enjoy reading our blog, could you imagine how much fun it would be to work with us? let's do it!
But wait a second 🖐 we've got a conflict here. Newsletters are often 💩👎👹 to us. That's why we've created the LEAN LIST, the first zen, enjoyable, rocker, and reggaetoner list of the IT industry. We've all subscribed to newsletters beyond our limits 😅 so we are serious about this.