Skip to content

Commit

Permalink
feature: measure description falls back to column description
Browse files Browse the repository at this point in the history
  • Loading branch information
owlas committed Sep 22, 2021
1 parent 28976ff commit d26ee4f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Recent and upcoming changes to dbt2looker

## 0.8.2
### Changed
- Measures with missing descriptions fall back to coloumn descriptions. If there is no column description it falls back to "{measure_type} of {column_name}".

## 0.8.1
### Added
- Dimensions have an `enabled` flag that can be used to switch off generated dimensions for certain columns with `enabled: false`
Expand Down
2 changes: 1 addition & 1 deletion dbt2looker/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def lookml_measure(measure_name: str, column: models.DbtModelColumn, measure: mo
'name': measure_name,
'type': measure.type.value,
'sql': measure.sql or f'${{TABLE}}.{column.name}',
'description': measure.description or f'{measure.type.value.capitalize()} of {column.description}',
'description': measure.description or column.description or f'{measure.type.value.capitalize()} of {column.name}',
}
if measure.filters:
m['filters'] = lookml_measure_filters(measure, model)
Expand Down

0 comments on commit d26ee4f

Please sign in to comment.