# Testing SQL for BigQuery

DevFeed: [Testing SQL for BigQuery](<https://devfeed.tech/articles/testing-sql-for-bigquery-2165.md>)

Original publisher: [Read original article](<https://developers.soundcloud.com/blog//testing-sql-for-bigquery>)

Published: 2020-10-16T00:00:00Z

Content type: article

Language: en

Sources: [SoundCloud Backstage Blog](<https://devfeed.tech/sources/soundcloud-backstage-blog.md>)

Topics: [Test-driven development](<https://devfeed.tech/topics/tdd.md>), [ci](<https://devfeed.tech/topics/ci.md>)

Tags: [bigquery](<https://devfeed.tech/tags/bigquery.md>), [code](<https://devfeed.tech/tags/code.md>), [data](<https://devfeed.tech/tags/data.md>), [sql](<https://devfeed.tech/tags/sql.md>), [testing](<https://devfeed.tech/tags/testing.md>), [validation](<https://devfeed.tech/tags/validation.md>)

## AI overview

The article explains why SQL data pipelines should be tested as code, distinguishing code tests from data validations. It advocates running tests in continuous integration for faster feedback and stronger confidence in ETL transformations.

## Source excerpt

"To me, legacy code is simply code without tests." -- Michael Feathers If untested code is legacy code, why aren't we testing data pipelines or ETLs (extract, transform, load)? In particular, data pipelines built in SQL are rarely tested. However, as software engineers, we know all our code should be tested. So in this post, I'll describe how we started testing SQL data pipelines at SoundCloud.