Lightdash

Overview

Lightdash is an open-source BI tool built on top of dbt. It reads your dbt models and metrics directly, turning them into dashboards without duplicating transformation logic. If you are already using dbt with Decode GA4, Lightdash is the natural next step for self-serve analytics.

Requirements

  • A dbt project with the Decode GA4 events table declared as a source (see the dbt integration)
  • Lightdash Cloud or a self-hosted Lightdash instance
  • A Google Cloud service account with BigQuery Data Viewer and BigQuery Job User roles on the project
  • The BigQuery service account must have Storage Object Viewer access to the GCS bucket where Decode GA4 stores its Parquet files

Setup

1. Connect Lightdash to your dbt project

In Lightdash, create a new project and connect it to the Git repository containing your dbt project. Lightdash reads your dbt_project.yml, models, and sources directly from the repo.

2. Configure the BigQuery connection

In your Lightdash project settings, add a BigQuery warehouse connection:

  • Project — your GCP project ID
  • Dataset — your dbt output dataset
  • Authentication — upload your service account JSON key, or use OAuth

3. Add a dbt model over the events table

If you don't already have one, create a dbt model referencing the Decode GA4 source (e.g. models/pageviews.sql):

select
    partition_date AS event_date,
    event_name,
    event_param.page_location,
    count(*) as pageviews
from {{ source('decode_ga4', 'events') }}
where event_name = 'page_view'
group by partition_date, event_name, page_location

4. Add Lightdash metadata

Add a .yml file alongside your model to define dimensions and metrics for Lightdash (e.g. models/pageviews.yml):

version: 2
models:
  - name: pageviews
    meta:
      label: Pageviews
    columns:
      - name: event_date
        meta:
          dimension:
            type: date
      - name: page_location
        meta:
          dimension:
            type: string
      - name: pageviews
        meta:
          metrics:
            total_pageviews:
              type: sum

5. Refresh and explore

In Lightdash, trigger a dbt project refresh to pick up your models and metadata. Your dimensions and metrics will appear in the Explore view, ready to build charts and dashboards.

Further Reading