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.1.tar.gz
(13.6 kB
view hashes)
Built Distribution
dbt2looker-0.6.1-py3-none-any.whl
(14.3 kB
view hashes)
Close
Hashes for dbt2looker-0.6.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9620e5f93dca952e9745e7c2dc123c860e40aba5daea0ea794c1a967cfdf84ff |
|
MD5 | 272d751f902236262fe951e0a710b0cb |
|
BLAKE2b-256 | 910770aff09f52611864201513cbce39dffcbc5742f89797ab76b14dac1c323d |