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)
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
Release history Release notifications | RSS feed
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.0.tar.gz
(13.6 kB
view details)
Built Distribution
File details
Details for the file dbt2looker-0.6.0.tar.gz
.
File metadata
- Download URL: dbt2looker-0.6.0.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.5 CPython/3.9.4 Darwin/20.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a56d023dacb03898dd31cea038b90feb7cbe5cf27812e4ad9ea71421af54f72 |
|
MD5 | ba4ad54aec525c6812ff3ec07d5ef11d |
|
BLAKE2b-256 | a45c046af5ec35292d70075e381d789373bc09553cefc2629d560a10e073fb2d |
File details
Details for the file dbt2looker-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: dbt2looker-0.6.0-py3-none-any.whl
- Upload date:
- Size: 14.2 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5df58f496339a953c5d4ae90cd6f0654790ce3375eaa8cfcd2efe37ca40ce01 |
|
MD5 | 5a16fb98e6a2af3b7392e37cad01a250 |
|
BLAKE2b-256 | ae74ce1c7beb5fbaa109c28044cf4396060314ff99f093ebe4ea4633d8a89802 |