Using Source Control For Those Database Queries

Caitlin Hudon shares a few SQL Truths and explains why tracking database queries in source control is important:

If I could teach SQL to analysts who plan to work in industry data science, I’d start by sharing a few SQL Truths I’ve learned, and why I recommend tracking SQL queries in git. Here goes:

  1. You will *always* need that query again
  2. Queries are living artifacts that change over time
  3. If it’s useful to you, it’s useful to others (and vice versa)

Focusing on these points has led to my continuous adoption of a query library — a git repository for saving and sharing commonly (and uncommonly) used queries, all while tracking any changes made to these queries over time.

This is separate from keeping database objects (like table or procedure definitions) in source control.

Related Posts

Version Control and Power BI Desktop

Gilbert Quevauvilliers takes us through version control with PBIX files: In the second part of my blog post I am going to detail how to use the version control with Power BI Desktop files. This will include adding files, checking files in and out, viewing previous versions and reverting to previous versions. If this is […]

Read More

Reverting a Git Push

Stuart Moore takes us through backing out a commit in Git when you pushed to the wrong branch: We’ve all done it. Working for ages tracking down that elusive bug in a project. Diligently committing away on our local repo as we make small changes. We’ve found the convoluted 50 lines of tortured logic, replaced […]

Read More

Categories

November 2018
MTWTFSS
« Oct Dec »
 1234
567891011
12131415161718
19202122232425
2627282930