News for hackers. Stuff that matters.
Re:SQL should be your default choice for data engineering pi... by dangwhy on Monday January 30, 2023 @10:16AM (#34580675)
> How do you test some SQL logic in isolation?

I do this using sql

1. Extracting an 'ephemeral model' to different model file

2. Mock out this model in upstream model in unit tests https://github.com/EqualExperts/dbt-unit-testing

3. Write unit tests for this model.

This is not different than regular software development in a language like java.

I would argue its even better better because unit tests are always in tabular format and pretty easy to understand. Java unit tests on other hand are never read by devs in practice.

> in this day and age where enriching the data by running it through some ML model isn't that rare,

Still pretty rare, This constitutes a very minor percentage of ETL in an typical enterprise.

Re:SQL should be your default choice for data engineering pi... by alphabetam on Monday January 30, 2023 @10:40AM (#34581076)
> Java unit tests on other hand are never read by devs in practice.

You should get to know better java developers. :-)

Re:SQL should be your default choice for data engineering pi... by dangwhy on Monday January 30, 2023 @10:43AM (#34581135)
haha same!. Ppl saying sql is unreadable need to know better sql developers.

sql is so pretty and so very readable and maintable if done by people who know what they are doing.