Skip to content

Commit

Permalink
add measure descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
owlas committed Apr 17, 2021
1 parent e4b6d93 commit 0f52768
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions dbt2looker/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ def lookml_measures_from_model(model: models.DbtModel):
'name': measure.name,
'type': measure.type.value,
'sql': f'${{TABLE}}.{column.name}',
'description': f'{measure.type.value.capitalize()} of {column.description}',
}
for column in model.columns.values()
for measure in column.meta.looker.measures
Expand Down
1 change: 1 addition & 0 deletions example/lookml/views/pages.view
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,6 @@ view: pages {
measure: Page views {
type: count
sql: ${TABLE}.id ;;
description: "Count of The primary key for this table"
}
}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dbt2looker"
version = "0.6.0"
version = "0.6.1"
description = "Generate lookml view files from dbt models"
authors = ["oliverlaslett <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 0f52768

Please sign in to comment.