Looker provides a development mode to allow model development in a safe environment that will not impact other users, until you are ready to deploy your changes.
Looker generally uses GitHub for LookML source code management, although Looker can be configured to work with other version control providers such as GitHub Enterprise, GitLab, Bitbucket, or any Git server that can use an SSH key for authentication. For information about configuring Git in Looker, see this article.
Looker uses Git to record changes and manage file versions. Each LookML project corresponds with a Git repository, and each user’s development mode correlates to a Git branch.
Executing Git Commands in Looker
Looker has a built-in interface that integrates with your Git service. On the LookML page you’ll see a button in the upper left for Git:
The Git button shows different options, depending on where you are in the process of making changes and deploying to your production mode.
Up-to-Date with production
If your development mode is in sync with production mode, the following message shows instead of the Git button.
Pull Development Mode
If changes have been deployed to production mode and your development mode needs to be updated, the Git button displays the following message:
In this case, the Git button will retrieve the most recent versions of any changed files and sync your development mode with the current production mode. While not strictly required, it is very useful to update your environment before making your own changes, and can help you avoid the need to resolve merge conflicts later.
If you do get a merge conflict, instructions to resolve it are found here.
After you have made and saved any changes to your LookML project, the Git button displays the following message:
Click the Git button to sync your development mode with your Git service, saving your changes to the Git service. The following window displays, listing the files that have changed and letting you enter a message to briefly describe your changes. Uncheck any files you don’t want included in the sync and enter a summary of your changes, then click Commit:
Deploy to Production
After you have committed changes, the Git button displays the following message:
Click the Git button to update your production mode by merging your committed changes with your production environment.
Git Dropdown Menu
The Git button has a dropdown menu, from which you can execute the following commands (not all commands are available in all modes):
- History shows a list of changes committed to your project
- View Uncommitted Changes shows the difference between development mode and production for all files
- Revert Uncommitted Changes discards all changes that have not been committed
- Revert to Production syncs your development mode with the current production mode, discarding any changes that have not been deployed to production
- Project Settings lets you update project settings, such as the project name and whether LookML validation is required
Checking the Impact of Your Changes
After making your changes available to the organization you can check to make sure you have not invalidated any saved Looks. You’ll have the opportunity to fix them if you have.