Introduction

Google Looker is one of the best BI tools available and it is getting very popular. Backed by Google’s technology, it integrates well with other Google Cloud offerings, making it a viable option for BI needs. In this guide we will show you how to connect GitHub to Looker.

LookML is a language that lets you describe an SQL data source including its data relationships, dimensions, calculations, aggregates etc. Using this “Model” created in LookML, Looker can construct queries to fetch data from it. A LookML project is a collection of Models ( tables, their relationships and joins), Views( calculations and aggregates of each table), etc. 

Your multiple LookML projects can reside in a GIT repository , thereby allowing configuration and change management. With software getting more powerful and versatile, the software development process is getting more complex. Having multiple teams working on different modules in different stages, the need for software configuration management and versioning is crucial.

GIT is a distributed version control system that facilitates coordination among teams, allowing for smooth context switching and feature based workflows. GitHub is a service that provides hosted GIT based software configuration management and version control and eases cooperation between stakeholders.

GitHub is the preferred platform among developers as it frees you from the hassles of hosting, maintaining and upgrading a GIT tool; instead teams can focus on their core task of testing and development.

Connecting GitHub to Looker

  1. From Looker Dashboard, click on Develop and go to your project. 
  2. Click Configure GIT and select GitHub.
  3. Create a new repo on GitHub, and save its address URL. 
  4. Inside Looker , put this URL of your repository, in the “repository URL” text box. 
  5. Once Looker knows where to fetch from, you will have to specify your Looker “deploy key string” into GitHub, allow “Write access” and then add the key. 
  6. Looker can then read and write into the GitHub repo. 
  7. You can validate your LookML and commit it to the repo in production. 

Some of your Github commands will also be available in the Looker dashboard.

The above procedure suffices when you make a new Git repo for your Looker project. More often than not, you would need to connect your existing repos to your Looker projects OR allow multiple developers to commit LookML in your repos.
Next, we discuss how to use existing repos and allow multiple/single developer access. 

Single or Multiple Accounts

You can either have a single teamwide account, and all your developers can use that to commit to the repo. Looker will use this account to log into Git and make changes on behalf of the developers. Of course, this single user account must have read+write privileges on GitHub. Here, each individual developer’s Looker username is used to identify the committer on GitHub.

The other option is to let each developer use his individual account to commit changes on Git, and use one generic team-wide account to enable Looker to monitor changes as well as to pull the production version of files. Each individual developer account thus has both read+write access to the Git repo, whereas the single generic team-wide account should at least have read access. Here, the Looker admin has to set up each individual developer account, making sure to hide the password or access token attribute. 

HTTPS or SSH Access

Looker provides two methods to access your related Git repo, you can either use HTTPS or SSH. 

For HTTPS access:

  1. Go to your project settings and click “configure GIT” ( for creating a new Git project) or “Reset GIT connection”( edit existing projects).
  2. Then go to your GIT repo, and copy the HTTPS (not SSH) URL for your Git repo.
  3. If you want to connect an existing repo, this URL can also be copied from the “Clone or Download” link, on the “Code” page of your Git repo. 
  4. Paste this URL into the “configure GIT” dialogue in your Looker settings. 
  5. Next, depending on whether you are using the “Single account” option or “Multiple accounts”, specify the credentials Looker will use for accessing the repo. 
  6. If you are using a single team-wide account, choose the “Use a single, constant username and password combination”  radio. 
  7. Then specify the single account you want all your developers to share for all your commits. Else choose the “Use user attributes for username and password” radio button. 
  8. . First specify that single generic team-wide account with at least read access, that Looker will use to pull the production version. 
  9. Next, click the “Use user attributes for username and password” and specify the credentials for each individual developer account. 
GitHub to Looker - Configure Git
  1. Once setup is done, Looker allows you to use GIT commands from inside Looker, via the Git menu, on the top left. 
GitHub to Looker - Git Menu

For SSH access:

  1. To use SSH instead, copy the SSH ( not HTTPS) URL of your GitHub repo. 
  2. Paste this URL into the “configure GIT” or “Reset GIT connection” dialogue in your Looker settings. 
  3. Next, Looker will automatically detect your GIT provider and generate an SSH-RSA deploy key, copy this key. 
  4. Go to your repo’s settings, click the “Add Deploy Key” button, and Paste it in your repo. 
  5. Give it a suitable name, in future, you might be working on multiple Looker projects committing on different Git repos; thus, giving a meaningful name here will help in isolating the correct repo later. 
  6. Finally, select the “Allow write access” option, this will give write access to Looker, on your repo. 
  7. After clicking “Test and Finalize setup”, you must be ready for committing your LookerML code in your designated Git repo. 

Happy coding!

Conclusion

To conclude, this article tries to discuss how to connect your GIT repo to your Looker instance, to commit your LookML code. These methods, however, can be challenging especially for a beginner & this is where Hevo saves the day.

 Hevo Data, a No-code Data Pipeline helps you transfer data from GitHub to a source of your choice in a fully-automated and secure manner without having to write the code repeatedly for free. Hevo with its strong integration with 100+ sources and BI tools, allows you to not only export and load data but also transform and enrich your data, making it analysis-ready in a jiffy.

visit our website to explore hevo[/hevoButton]

SIGN UP for a 14-day free trial and see the difference!

Have any further queries? Let us know in the comments section below.

Pratik Dwivedi
Technical Content Writer, Hevo Data

Pratik Dwivedi is a seasoned author specializing in data industry topics, including data analytics, machine learning, AI, big data, and business intelligence. With over 18 years of experience in system analysis, design, and implementation, including 8 years in a Techno-Managerial role, Pratik has successfully managed international clients and led small to medium-sized teams and projects. He excels in creating engaging content that informs and inspires.

No-Code Data Pipeline for GitHub