Connect GitHub to Looker: An Easy to Follow Guide

By: Published: July 24, 2020

github to looker

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. 

For further information on Looker, you can click here.

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. Also, check Git export.

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.

Simplify your Data Analysis with Hevo’s No-Code Data Pipelines

Hevo Data, a No-Code Data Pipeline helps transfer data from GitHub (among 100+ sources) to your desired data warehouse and visualize it in Looker for free. Hevo is fully-managed and completely automates the process of not only exporting data from your desired source but also enriching the data and transforming it into an analysis-ready form without having to write a single line of code. Its fault-tolerant architecture ensures that the data is handled in a secure, consistent manner with zero data loss.

GET STARTED WITH HEVO FOR FREE[/hevoButton]

Check out some amazing features of Hevo:

  • Completely Managed Platform: Hevo is fully managed. You need not invest time and effort to maintain or monitor the infrastructure involved in executing codes.
  • Live Monitoring: Hevo allows you to monitor the data flow and check where your data is at a particular point in time.
  • Data Transformation: It provides a simple interface to perfect, modify, and enrich the data you want to export. 
  • Secure: Hevo has a fault-tolerant architecture that ensures that the data is handled in a secure, consistent manner with zero data loss.
  • Schema Management: Hevo takes away the tedious task of schema management & automatically detects schema of incoming data and maps it to the destination schema.
  • Minimal Learning: Hevo with its simple and interactive UI, is extremely simple for new customers to work on and perform operations.
SIGN UP HERE FOR A 14-DAY FREE TRIAL

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
Freelance Technical Content Writer, Hevo Data

Pratik writes about various topics related to data industry who loves creating engaging content on topics like data analytics, machine learning, AI, big data, and business intelligence.

No-Code Data Pipeline for GitHub