#203 Data governance 5.6 min
A Business Glossary in YAML With Four Python Checks
A glossary in a file, and four checks that find its four faults in a second.
Fix the thin entry
Copy the code folder first. In glossary.yaml give the Refund term an owner line and a definition of at least six words. Predict what the thin line of python run.py will print now, then run it. Did the other lines change?
A hint
The thin check looks for a missing owner or a definition under six words.
Remove the shared synonym
In glossary.yaml remove client from the synonyms of Active customer. Predict which line of output disappears, then run python run.py. Why is it better for a word to belong to only one term?
A hint
shared_words counts how many terms list each synonym and keeps those with more than one.
Repair the broken link in two ways
First add vat_gbp to the orders columns in schema.py and run python run.py. Predict whether the broken line disappears and whether the unlinked count changes. Then undo that, and instead change the link in glossary.yaml to a column that already exists. Which fix is right depends on what the column should be.
A hint
broken_links checks every linked column against all_columns. unlinked subtracts the linked columns from all columns.
Change the thin threshold
In check.py change the number 6 in the thin function to 12. Count the words in each definition in glossary.yaml and predict which terms will now be listed as thin. Run python run.py to check. Is a longer definition always a better one?
A hint
Python splits a definition on spaces to count words. Only definitions with fewer words than the limit are thin.
These tasks are for you to try on your own machine. Nothing is checked or saved.
What this does not show
Made-up shop and glossary with planted faults; the checks test the file's shape, not whether a definition is right.
