Documenting Queries for Future You

Something I've been always adamant when working with data I wished I saw more of it here is this: Documenting queries. Pipelines change all the time; New columns show up; Business logic evolves; New people join the team. And suddenly… a query that made sense months ago is hard to understand. I had a joke with a previous colleague that when th code was made, just me and God knew what it was. Now that a few months has passed it's just God 😂 😂 Documenting doesn't have to be a big issue. A few small things go a long way: • Write a small summary of what the query is actually doing • Write where the data is coming from • Any tricky joins or specific business rules? Comment it • How key metrics are calculated? A small comment goes a long way Nothing fancy. Even a few lines at the top help a lot. Good documentation isn’t just for others. It’s for you… 3 months later, trying to figure out what you were thinking 😅 😄 #DataEngineering #SQL #Coding #Documentation

To view or add a comment, sign in

Explore content categories