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.6.3.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

dbt2looker-0.6.3-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dbt2looker-0.6.3.tar.gz
  • Upload date:
  • Size: 13.9 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.6.3.tar.gz
Algorithm Hash digest
SHA256 d42a007c7d05d439a49246ced0baa329211c94fcd37778a6c39de26eb9906bfd
MD5 f87f18341860d361e6a26ce5a7fc2604
BLAKE2b-256 92e5b313cf3b9aea33ff1c67649ed81f0ecf981833560abaad02a90b8a3524e1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dbt2looker-0.6.3-py3-none-any.whl
  • Upload date:
  • Size: 14.6 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.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 34fe41bbdd6592c96e192ceaeae19e9fbb1017c2c3689c99de4f609f29eb3d37
MD5 3a28d7fd92dd1dcf8419b0aa415c315a
BLAKE2b-256 24d65325fc0f5c7503373d76a6ab7f3d1e0166e3e86ed52ebb77bdc923ee17e6

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