Stay organized with collections
Save and categorize content based on your preferences.
Set up a Looker project
MDE provides a Looker Project Template git
repository
to help you bootstrap a new MDE Looker project.
We also provide a library that includes MDE-specific LookML
base components and starter configuration packages
to reduce the time it takes to model your MDE data in LookML.
Before you begin
To complete this guide, you need the following prerequisites:
An active Looker instance.
A Looker user account with the Admin role.
An active MDE deployment in a Google Cloud project with
the default MDE configuration package applied.
A user account with at least the following Identity and Access Management (IAM) roles
for the Google Cloud project referenced:
roles/iam.serviceAccountCreator
roles/iam.serviceAccountKeyAdmin
roles/resourcemanager.projectIamAdmin
roles/source.admin
Workstation with a local installation of:
git
Google Cloud CLI
How to bootstrap a new LookML project
Set the default gcloud project to your MDE deployment
project.
All gcloud commands in this guide assume that the default project is set
to the MDE deployment project. You can set the default
project using the following command:
gcloudconfigsetprojectPROJECT_ID
Replace the following:
PROJECT_ID with the MDE deployment project ID.
Create a service account that Looker uses to read data from
BigQuery, and generate a JSON key for the created service
account using the following commands:
Connect
the project you created in Step 6 with the git repository you created in
Step 4, and
register
the SSH key that Looker generates with Cloud Source.
Configure access to the MDE LookML Library.
The MDE Project Template declares the
MDE LookML Library as a dependency. Since the
MDE LookML Library is hosted in a private
GitHub repository,
the public SSH key of your Looker project must be allow
before you can access it:
Obtain the SSH key of your Looker project.
Configure
authentication for the MDE LookML Library
using the SSH method and obtain the public SSH key of your
Looker project.
Request access to the MDE LookML Library.
Once you have obtained an SSH
key, fill out the MDE LookML Library Access
Form
for allowlisting. Your Looker project will have access
to the library after the SSH key has been allow.
Test access.
After the SSH key of your Looker project has been allow,
you can test
that your Looker project can connect to the GitHub
repository where the MDE LookML Library is hosted.
Open the manifest.lkml file in Looker, and supply the
required values:
Replace <TAG_METADATA_BUCKET_NUMBER> with the tag metadata bucket
number.
Replace <SOURCE_METADATA_BUCKET_NUMBER> with the tag metadata bucket
number.
You can look up the bucket numbers in the MDE web interface or by
calling the GET/metadata/v1/buckets/tag and GET /metadata/v1/buckets/source
API endpoints. Alternatively, you can look up the bucket numbers in the
MDE UI or Manufacturing Connect.
Congratulations, you have set up Looker for MDE.
The LookML model in MDE Looker Project Template
imports the LookML explore file and dashboards from the default
configuration package in the MDE LookML Library. The
default explore file contains an explore per default MDE
type. If you are using the default configuration package in MDE, you can
start analyzing your data right away. See the guide on
how to use the MDE LookML Library
for more details.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Set up a Looker project\n=======================\n\nMDE provides a *Looker Project Template* git\n[repository](https://github.com/GoogleCloudPlatform/mde-looker-project-template)\nto help you bootstrap a new MDE Looker project.\nWe also provide a library that includes MDE-specific LookML\nbase components and starter configuration packages\nto reduce the time it takes to model your MDE data in LookML.\n\n### Before you begin\n\nTo complete this guide, you need the following prerequisites:\n\n1. An active Looker instance.\n2. A Looker user account with the `Admin` role.\n3. An active MDE deployment in a Google Cloud project with the *default* MDE configuration package applied.\n4. A user account with at least the following Identity and Access Management (IAM) roles for the Google Cloud project referenced:\n - `roles/iam.serviceAccountCreator`\n - `roles/iam.serviceAccountKeyAdmin`\n - `roles/resourcemanager.projectIamAdmin`\n - `roles/source.admin`\n5. Workstation with a local installation of:\n - git\n - Google Cloud CLI\n\nHow to bootstrap a new LookML project\n-------------------------------------\n\n1. Set the default `gcloud` project to your MDE deployment\n project.\n\n All `gcloud` commands in this guide assume that the default project is set\n to the MDE deployment project. You can set the default\n project using the following command: \n\n gcloud config set project \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n\n Replace the following:\n\n `PROJECT_ID` with the MDE deployment project ID.\n2. Create a service account that Looker uses to read data from\n BigQuery, and generate a JSON key for the created service\n account using the following commands:\n\n export SA_LOOKER=\"mde-looker\"\n export PROJECT_ID=$(gcloud config get-value project)\n gcloud iam service-accounts create $SA_LOOKER --display-name \"MDE Looker account\"\n gcloud projects add-iam-policy-binding ${PROJECT_ID} --member serviceAccount:${SA_LOOKER}@${PROJECT_ID}.iam.gserviceaccount.com --role \"roles/bigquery.dataEditor\"\n gcloud projects add-iam-policy-binding ${PROJECT_ID} --member serviceAccount:${SA_LOOKER}@${PROJECT_ID}.iam.gserviceaccount.com --role \"roles/bigquery.jobUser\"\n\n export SA_LOOKER_KEY=~//mde-projects/$PROJECT_ID/${SA_LOOKER}_key.json\n gcloud iam service-accounts keys create $SA_LOOKER_KEY --iam-account ${SA_LOOKER}@${PROJECT_ID}.iam.gserviceaccount.com\n\n cat \u003c\u003cEOF\n ===========================================\n Connection credentials to be used in Looker\n ===========================================\n\n ConnectionName: mde-bigquery-connection\n ProjectName: ${PROJECT_ID}\n Dataset: mde_data\n ServiceAccount Email: ${SA_LOOKER}@${PROJECT_ID}.iam.gserviceaccount.com\n ServiceAccount JSON key location: ${SA_LOOKER_KEY}\n\n EOF\n\n3. [Create](https://docs.looker.com/setup-and-management/database-config/google-bigquery)\n a new BigQuery connection in Looker with the\n following specifications:\n\n - Name the connection as specified in the output of Step 2.\n - Set the dataset as specified in the output of Step 2.\n - Follow the [service account](/looker/docs/db-config-google-bigquery#authentication_with_bigquery_service_accounts) authentication path, and use the service account key available in the location specified in the output of Step 2.\n - Configuring PDTs for the purposes of this guide is unnecessary. You can always configure PDTs for this connection on a later stage.\n - Set the database timezone to UTC.\n4. Create a new git repository. This repository will host the LookML code of\n your Looker project.\n\n The following command creates a GitHub repository using the GitHub CLI.\n However, you can create a repository with any\n [supported](/looker/docs/setting-up-git-connection)\n git service. \n\n gh repo create mde-looker --private --clone\n\n5. Navigate to the newly created repository it using the following command:\n\n cd mde-looker\n\n6. Pull the *MDE Looker Project Template* files,\n and push them into your new Looker repository with the\n following commands:\n\n git checkout -b master\n git remote add project https://github.com/GoogleCloudPlatform/mde-looker-project-template.git\n git pull project master\n git push -u origin master\n\n7. [Create a blank Looker project](/looker/docs/create-projects#creating_a_blank_project).\n\n8. [Connect](/looker/docs/setting-up-git-connection#connecting_to_git_using_ssh)\n the project you created in Step 6 with the git repository you created in\n Step 4, and\n [register](https://www.googlecloudcommunity.com/gc/Technical-Tips-Tricks/Using-Cloud-Source-Repositories-for-Version-Control-in-Looker/ta-p/587473)\n the SSH key that Looker generates with Cloud Source.\n\n9. Configure access to the *MDE LookML Library*.\n\n The *MDE Project Template* declares the\n *MDE LookML Library* as a dependency. Since the\n *MDE LookML Library* is hosted in a private\n [GitHub repository](https://github.com/GoogleCloudPlatform/mde-lookml-lib),\n the public SSH key of your Looker project must be allow\n before you can access it:\n 1. Obtain the SSH key of your Looker project.\n\n [Configure](/looker/docs/importing-projects#configuring_authentication_credentials_for_private_remote_repositories)\n authentication for the *MDE LookML Library*\n using the SSH method and obtain the public SSH key of your\n Looker project.\n 2. Request access to the *MDE LookML Library* .\n Once you have obtained an SSH\n key, fill out the [MDE LookML Library Access\n Form](https://docs.google.com/forms/d/e/1FAIpQLSd08cF-SLty6ZjTac727XiEM2G2N_Vu_g_F9O5-c6UWrSYBow/viewform?usp=header_link)\n for allowlisting. Your Looker project will have access\n to the library after the SSH key has been allow.\n\n 3. Test access.\n\n After the SSH key of your Looker project has been allow,\n you can [test](/looker/docs/importing-projects#configuring_authentication_credentials_for_private_remote_repositories)\n that your Looker project can connect to the GitHub\n repository where the *MDE LookML Library* is hosted.\n10. Open the `manifest.lkml` file in Looker, and supply the\n required values:\n\n - Replace `\u003cTAG_METADATA_BUCKET_NUMBER\u003e` with the tag metadata bucket number.\n - Replace `\u003cSOURCE_METADATA_BUCKET_NUMBER\u003e` with the tag metadata bucket number.\n\n You can look up the bucket numbers in the MDE web interface or by\n calling the `GET/metadata/v1/buckets/tag` and `GET /metadata/v1/buckets/source`\n API endpoints. Alternatively, you can look up the bucket numbers in the\n MDE UI or Manufacturing Connect.\n11. Congratulations, you have set up Looker for MDE.\n\n The LookML model in *MDE Looker Project Template*\n imports the LookML explore file and dashboards from the default\n configuration package in the *MDE LookML Library* . The\n default explore file contains an explore per default MDE\n type. If you are using the default configuration package in MDE, you can\n start analyzing your data right away. See the guide on\n [how to use the MDE LookML Library](/manufacturing-data-engine/docs/guides/analyze/how-to-use-the-mde-lookml-lib)\n for more details."]]