Created
August 4, 2020 13:59
-
-
Save bplmp/d22b82ee3d038cf24891083966691916 to your computer and use it in GitHub Desktop.
Sample LookML test for descriptions in dimensions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def test_descriptions_in_dimensions(): | |
| """All dimensions must have descriptions | |
| """ | |
| errors = [] | |
| for lkml_file in LKML_DIMENSIONS: | |
| dimensions_with_errors = [] | |
| for dimension in lkml_file['dimensions']: | |
| if 'description' not in dimension: | |
| dimensions_with_errors.append(dimension['name']) | |
| if dimensions_with_errors: | |
| errors.append({'file': lkml_file['path'], 'dimensions': dimensions_with_errors}) | |
| if errors: | |
| assert False, errors |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment