Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add top-level dbt asset descriptions #203

Merged
merged 46 commits into from
Nov 1, 2023
Merged

Conversation

dfsnow
Copy link
Member

@dfsnow dfsnow commented Oct 31, 2023

This PR adds a top-level description to every table and view in the CCAO's dbt catalog that doesn't already have one. This is a first-pass to simply get basic descriptions and metadata added to all tables. Later we can add caveats, nuanced, and more documentation organically.

In order to make this PR more manageable, let's split the reviewing into sections according to who has adequate domain knowledge in each area. Review, comment, and approval is only needed on your section, but feel free to skim the rest.

@wrridgeway please review:

  • All ccao assets
  • All views and tables under default
  • All iasworld tables
  • All reporting assets
  • All rpie assets
  • All other assets

@jeancochrane please review:

  • All census assets
  • All location assets
  • All proximity assets
  • All model assets (useful here since these are the model output tables and you'll need to know their structure soon anyways)
  • All spatial assets

@ccao-jardine if you have time, would be excellent if you could review the following, since you use them the most. If not, @wrridgeway can review them.

  • All reporting assets (views and tables)
  • All tax assets (the source tables for PTAXSIM)

I apologize in advance for this absolutely horrendous merge.

Related to #113.

dfsnow and others added 21 commits October 27, 2023 21:46
* Add initial shared column definitions

* Add more Cook column definitions to views

* Add spatial column definitions

* Add initial iasWorld column comment dump

* Add separate column definition file

* Replace static column names with ones filled from mardown file

* Cleanup syntax errors

* Cleanup column descriptions

* Fix superlinter email spelling

* Fix line ending

* Rename top-level column prefix to shared_column

* Alphabetize doc blocks

* Changed CDU description

* Split iasWorld schema file into tables

* Fix freshness check formatting

* Alphabetize source tests

* Move exposures to their own yaml + alphabetize them

* Split default schema.yml into separate files

* Add prefix to default schema files

* Add prefix to iasworld schema files

* Drop version: top-level key

* Drop extra linebreak from exposures

* Move loaded_at_field key to each iasworld schema file

* Move char columns to shared_columns.md

* Reoganize char columns

* Fix missing chunk of shared_columns

* Move all card_res_char descriptions to shared_columns.md

* Add definitions for all other res char_ cols

* Add missing card_res_char columns

* Move address columns to shared_columns.md

* Add address shared columns

* Add defs for PIN history and appeals

* Fix missing cols in vw_pin_appeal

* Add condo shared defs

* Fix doc block typo

* Wrap adding descriptions to condo view

* Add exempt view descriptions

* Add land view defs

* Add defs for vw_pin_value

* Add sale table column defs

* Add initial PIN universe defs

* Fix col name typos

* Fix spacing issue

* Fix even more spacing

* Fix column def typo

* Update dbt/models/default/schema/default.vw_pin_condo_char.yml

Co-authored-by: Jean Cochrane <jeancochrane@users.noreply.github.com>

* Add location column definitions

* Add location column definitions

* Fix tax column names

* Add location columns to vw_pin_universe

* Fix YAML anchor

* Fix YAML anchor even more

* Fix YAML anchor again

* Fix yaml array anchor

* Add proximity column definitions

* Fix missing line breaks

* Add initial census column defs

* Add all Census table definitions

* Add geography shared col

* Fix markdown line breaks

* Fix geometry col def typos

* Fix missing start curly brance

* Add data year column def

* Fix typo in data_year col def

* Add initial model cols

* Add vw_pin_shared_input col defs

* Add anchor defs for vw_pin_condo input

* Define model views after shared input

* Fix misnamed cols

* Test YAML anchor setup

* Revert "Test YAML anchor setup"

This reverts commit ca697df.

* Fixup proximity columns

* Fix column def inheritance

* Fix typo

* Finalize model view features

* Sort shared model columns

* Remove unnecessary col defs

* Add nearest neighbor back to condo input view

---------

Co-authored-by: Jean Cochrane <jeancochrane@users.noreply.github.com>
* Drop sales val outputs from legacy sale view

* Drop max_version_flag CTE
@dfsnow dfsnow requested a review from a team as a code owner October 31, 2023 03:10
@dfsnow dfsnow marked this pull request as draft October 31, 2023 03:10
@dfsnow dfsnow marked this pull request as ready for review November 1, 2023 06:08
Comment on lines +66 to +80
exposures:
- name: commercial_valuation_data
label: Commercial Valuation Data
type: dashboard
url: https://datacatalog.cookcountyil.gov/Property-Taxation/Assessor-Commercial-Valuation-Data/csik-bsws
depends_on:
- source('ccao', 'commercial_valuation')
owner:
name: Data Department
description: |
Commercial valuation data collected and maintained by the Cook County Assessor's Office, from 2021 to present.

Notes: Refreshed annually, as data is made available by the commercial team.

Use cases: Can be used to look up the number of units in a multi-unit apartment building.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this exposure since we have it as an Open Data asset. Not sure why it wasn't included before.

Copy link
Contributor

@jeancochrane jeancochrane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed census, location, proximity, model, and spatial table descriptions, and all look great!

dbt/models/proximity/docs.md Outdated Show resolved Hide resolved
dbt/models/spatial/docs.md Outdated Show resolved Hide resolved
dbt/models/spatial/docs.md Outdated Show resolved Hide resolved
dfsnow and others added 3 commits November 1, 2023 14:08
Co-authored-by: Jean Cochrane <jeancochrane@users.noreply.github.com>
Co-authored-by: Jean Cochrane <jeancochrane@users.noreply.github.com>
dbt/models/default/docs.md Outdated Show resolved Hide resolved
dbt/models/default/docs.md Outdated Show resolved Hide resolved
Copy link
Member

@ccao-jardine ccao-jardine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

dbt/models/reporting/docs.md Outdated Show resolved Hide resolved
dbt/models/reporting/docs.md Show resolved Hide resolved
dbt/models/reporting/docs.md Outdated Show resolved Hide resolved
dbt/models/reporting/docs.md Show resolved Hide resolved
@dfsnow dfsnow merged commit 7bf8317 into master Nov 1, 2023
7 checks passed
@dfsnow dfsnow deleted the dansnow/add-top-level-dbt-docs branch November 1, 2023 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants