Chapter TwelveDeploy Modeling Code
While building staging schemas begins as the warehouse lead's responsibility, no one is a perfect data modeler. It is best to catch errors and omissions in modeling code as it is being built rather than debugging the entire single source of truth. In this process, we turn to more best practices from the world of software engineering such as comment logic in SQL files and leaving proper commit messages for code reviewers to understand the intent of your changes and implementation details.
Branch Using Version Control Software
There are several version control packages out there for you to choose from. We'll assume you're using Git. As we have said, in collaborative coding environments, it's imperative that you version control your software. A remote backup, hosted, say, through GitHub allows many different people to all contribute to a code base at once.
Using Git, you can create a new development branch to ensure there is always a degree of separation between the main branch of your warehouse transformations and the feature branch you are currently developing on (all of these practices are written about in blogs just a web search away).
When embarking on a new set of transformations, always create a new branch using Git branch ‐m.
Commit Message
Eventually, someone will work on or around code that someone else has written. When batches of changes to a shared coding project are committed, or saved, to the project, they are labeled with ...
Get The Informed Company now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.