Skip to main content

dbt2looker

Use dbt2looker to generate Looker view files automatically from dbt models.

Want a deeper integration between dbt and your BI tool? You should also checkout Lightdash - the open source alternative to Looker

Features

  • Column descriptions synced to looker
  • Dimension for each column in dbt model
  • Dimension groups for datetime/timestamp/date columns
  • Measures defined through dbt column metadata see below
  • Looker types
  • Warehouses: BigQuery, Snowflake, Redshift (postgres to come)

demo

Quickstart

Run dbt2looker in the root of your dbt project after compiling looker docs.

Generate Looker view files for all models:

dbt docs generate
dbt2looker

Generate Looker view files for all models tagged prod

dbt2looker --tag prod

Install

Install from PyPi repository

Install from pypi into a fresh virtual environment.

# Create virtual env
python3.7 -m venv dbt2looker-venv
source dbt2looker-venv/bin/activate

# Install
pip install dbt2looker

# Run
dbt2looker

Build from source

Requires poetry and python >=3.7

For development, it is recommended to use python 3.7:

# Ensure you're using 3.7
poetry env use 3.7  
# alternative: poetry env use /usr/local/opt/python@3.7/bin/python3

# Install dependencies and main package
poetry install

# Run dbtlooker in poetry environment
poetry run dbt2looker

Defining measures

You can define looker measures in your dbt schema.yml files. For example:

models:
  - name: pages
    columns:
      - name: url
        description: "Page url"
      - name: event_id
        description: unique event id for page view
        meta:
           measures:
             page_views:
               type: count

Metadata

Release files for dbt2looker 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dbt2looker 0.11.0
File Size Uploaded
dbt2looker-0.11.0.tar.gz 10.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dbt2looker 0.11.0
File Interpreter ABI Platform
dbt2looker-0.11.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.4 kB

Release files / dbt2looker-0.11.0.tar.gz

Download URL dbt2looker-0.11.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fa5987ad4a8062f05b6d2bc5eb336be0357efb2891ded6b0822ccd2bbaa79157
BLAKE2b-256 checksum
How to use checksums
9ee930e36510fc149b5b92d44809e80f33fbdfebe2742ecd1b3ad839c4f7b48d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.9.15 Darwin/21.5.0

Release files / dbt2looker-0.11.0-py3-none-any.whl

Download URL dbt2looker-0.11.0-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
454e9d58ecdbc7134d11dd03c91a59ef55689449f483fc4edf8711cf5f67beb9
BLAKE2b-256 checksum
How to use checksums
4cf3a07aa1d7994bc136d3cd483e9fc448a28f31cec2d0ee5aad1757dbdcd407
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.9.15 Darwin/21.5.0

Release history Release notifications | RSS feed

This release

0.11.0 This release

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page