DataOps Best Practices
These are some best practices that can make using Git go smoothly for your organization.
Commits
- Make frequent commits using meaningful commit descriptions.
- Keep your commits simple. They should be for solving a single unit of work or single task. This makes it easier to revert changes.
- Ensure that all members of the development team are aware that a commit is planned, so that all code for the Workspace is in a ‘commit ready' state.
- Consider allocating a single developer the task of performing commits to the Main branch, to avoid any possible conflicts.
- Avoid making breaking commits to your main Git branch.
Having Trouble Making Commits
If you cannot commit your changes in a Workspace to Git, contact Coalesce support for help. Potentially overwriting your live metadata with a previous commit will cause you to lose all recent uncommitted development.
Branches
- Use branches for development to keep work in progress away from the main branch.
- Use a branching strategy
- Only deploy to target Environments from a ‘Main' branch, rather than from feature branches.
Workspace
- Do not have more than one instance of the Git modal open for a single Workspace, at the same time.
- Never develop directly in your main development Workspace.
- Never merge into a Workspace which has uncommitted changes.
- Never change the Git repo settings when having uncommitted changes in ANY Workspace.
- All development Workspaces should be ideally mapped to different schemas (except perhaps source nodes). You can't have a Workspace AND Environment on the same set of Snowflake schemas, unless the Workspace is used as read-only (which cannot be enforced).
- All Environments should be mapped to different schemas, except for source nodes in some cases.
Resources
- Read our tutorial on setting up Git, merging changes and the deployment process in DataOps Best Practices with Git and Coalesce
- Watch a video on Using Best Practices in Git.