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 details)
Built Distribution
File details
Details for the file dbt2looker-0.6.1.tar.gz
.
File metadata
- Download URL: dbt2looker-0.6.1.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 | 535423bd388daf4c3530566b91715a7fbfdfbbda9716ec9d4722c2a3bc824612 |
|
MD5 | 36d9f60ef3aa8e491c923b673c0d96f3 |
|
BLAKE2b-256 | 7b8685358187292d93c9adcae36e555ac44c5315b3a251b4e0f59874cf26582d |
File details
Details for the file dbt2looker-0.6.1-py3-none-any.whl
.
File metadata
- Download URL: dbt2looker-0.6.1-py3-none-any.whl
- Upload date:
- Size: 14.3 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 | 9620e5f93dca952e9745e7c2dc123c860e40aba5daea0ea794c1a967cfdf84ff |
|
MD5 | 272d751f902236262fe951e0a710b0cb |
|
BLAKE2b-256 | 910770aff09f52611864201513cbce39dffcbc5742f89797ab76b14dac1c323d |