News for hackers. Stuff that matters.

Ask HN: What is your development and testing workflow for SQL queries?

What is your workflow for developing, testing and versioning SQL queries?

My company has data pipelines that query a number of databases, such as MySQL and BigQuery. The SQL queries are typically read from a file or inlined as a string.

It seems to be challenging to develop, test and reuse SQL queries as you would code in programming languages like Python or Java.

For example, I'd like to decompose queries into reusable units that can be individually tested without heavy-weight external or remote dependencies and complicated setup, have any ideas?

( 2 comments | 3 points | on HN )
Re:Ask HN: What is your development and testing workflow for... by chanakya22 on Monday May 09, 2022 @07:47PM (#31321429)
Please check dbt package
Re:Ask HN: What is your development and testing workflow for... by testerhn on Tuesday May 10, 2022 @11:22AM (#31328210)
Interesting will have a look, thanks!