Skip to main content

Generate lookml view files from dbt models

Project description

dbt2looker

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

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

# Install
poetry install

# Run
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:
          looker.com:  # looker config block for column
             measures:
               - name: Page views
                 type: count

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbt2looker-0.7.0.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

dbt2looker-0.7.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file dbt2looker-0.7.0.tar.gz.

File metadata

  • Download URL: dbt2looker-0.7.0.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.4 Darwin/20.3.0

File hashes

Hashes for dbt2looker-0.7.0.tar.gz
Algorithm Hash digest
SHA256 4281b5287d63f28d626cd7440baa3676740215cb9b1eb49a597b7a49467aad03
MD5 ad3eaa621adb8ee6da491fd0bb4f855a
BLAKE2b-256 c90cc4918e203d47ee6c47c509dadebe42f074f7ce2df7f23331053ab6d46780

See more details on using hashes here.

File details

Details for the file dbt2looker-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: dbt2looker-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.4 Darwin/20.3.0

File hashes

Hashes for dbt2looker-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8aff78b794d177f3237208e9a90ac3f7159e29af239c01f4334b5e50a8852693
MD5 2c1487de29bac925d764c1b9607cc667
BLAKE2b-256 d25533a1b781d931e872c710ef4d59736dcde8ee8def04bcd7d10ee69492b7e1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page