The Simplest Way to Make Gitlab and Looker Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Teams pair gitlab and looker to track changes to data models in version control. This link lets analysts test, review, and deploy dashboard code through standard merge workflows. In practice, Looker stores its data model files inside a dedicated GitLab repo. Each analyst works on a personal branch, tests queries, and opens a merge request. When a reviewer approves the change, GitLab merges the code and updates the live charts. This setup stops broken SQL logic from reaching executive dashboards

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Teams pair gitlab and looker to track changes to data models in version control. This link lets analysts test, review, and deploy dashboard code through standard merge workflows.

In practice, Looker stores its data model files inside a dedicated GitLab repo. Each analyst works on a personal branch, tests queries, and opens a merge request. When a reviewer approves the change, GitLab merges the code and updates the live charts. This setup stops broken SQL logic from reaching executive dashboards without a peer review.

How keys and data flow between gitlab and looker

The link between gitlab and looker relies on deploy keys or personal access tokens. Looker uses an SSH key or HTTPS token to read and write repo files. Meanwhile, GitLab uses webhooks to tell Looker when a branch merge happens in production.

Two distinct paths carry data during this daily workflow. The first path moves model files between the Looker app and the GitLab server. The second path runs SQL queries from Looker against your main data warehouse. You must guard both paths so that no single token holds excessive power.

When an analyst edits a metric, Looker commits that text change to a branch. A pipeline in GitLab can then check the syntax and test the model logic. Once the pipeline passes, the team merges the branch to update the live state. Every step leaves a clear git history showing who changed a metric and why.

Common failure modes and how to scope roles

Many teams set up this integration with a single admin token that never expires. If a personal token belongs to one engineer, the link breaks when they leave. Worse, a broad token might grant write rights to unrelated code repos in GitLab. Shared database accounts in Looker also hide which specific user ran a heavy query.

To fix the GitLab link, use a dedicated project deploy key with scoped permissions. That key should only read and write to the single analytics repo it needs. Rotate this deploy key on a regular schedule and remove personal tokens from production. Lock the main branch in GitLab so that every change requires an approved merge.

GitLab CI Security + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

On the database side, create a specific read-only role for your reporting queries. Do not let the business intelligence tool use a database owner account for dashboards. Limit network paths so only trusted app servers can talk to your warehouse port. When queries return sensitive records, data masking rewrites matched fields in results like emails, phone numbers, card numbers, or national IDs.

Testing data models in automated pipelines

A strong workflow runs automated checks on every merge request before code goes live. GitLab pipelines can run lint tools to catch broken references across your model files. These checks make sure that renaming a column does not break ten downstream dashboards.

Keep pipeline secrets safe by storing them in protected variables inside your project settings. Scope the pipeline runner so it only tests metadata and schema definitions, not raw customer tables. When the automated check finishes, reviewers can focus on business logic instead of syntax errors. This habit keeps your reporting layer clean, fast, and reliable for the whole company.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Use an SSH deploy key scoped to the single repo for your data models. Deploy keys do not fail when an individual team member leaves the company.

How do we stop broken model changes from reaching live dashboards?

Protect the main branch in GitLab and require merge request approvals before merging code. Run an automated pipeline check on every branch to catch broken field references early.

How can we protect sensitive columns in dashboard query results?

Scope the database role to read-only tables and apply dynamic data masking rules. Masking rewrites matched fields in results such as emails, phone numbers, and card numbers.

The query runs. The emails stay hidden.