Add maildat columns to default.vw_pin_address#980
Conversation
|
@ccao-jardine Are you okay with the taxpayer/owner dichotomy I've gone with here? |
|
@wrridgeway, yes! This is much clearer, provides frequently requested data, and provides more information while also remaining transparent about ongoing data quality issues. |
jeancochrane
left a comment
There was a problem hiding this comment.
Looking great! A few small suggestions, plus one request to clean up the docs. I'll give this a final look once that's done.
|
|
||
| columns: | ||
| - name : addrtype | ||
| description: Address type code (N, S, F, R, C) |
There was a problem hiding this comment.
[Suggestion, required] It seems like many of these columns are shared with owndat, and they already have docs definitions in dbt/models/iasworld/columns.md. Do you mind taking a minute to replace these descriptions with {{ docs() }} calls wherever documentation already exists in columns.md, or wherever a column exists on owndat such that its description can be moved to columns.md?
Co-authored-by: Jean Cochrane <jeancochrane@users.noreply.github.com>
Co-authored-by: Jean Cochrane <jeancochrane@users.noreply.github.com>
Co-authored-by: Jean Cochrane <jeancochrane@users.noreply.github.com>
jeancochrane
left a comment
There was a problem hiding this comment.
Thanks so much for the docs cleanup! A few tiny suggested tweaks, but otherwise this is good to go.
This PR adds
iasworld.maildattodefault.vw_pin_addressas the new source ofmail_columns. We keep columns fromiasworld.owndat, but we rename these columns with anowner_prefix. This allows us to avoid committing entirely to one table or the other and provide as much information to users as possible while being clear about the limitations of both sources of address data.The only real nuance here is that
maildatis not unique by pin and year whencur = 'Y' and deactivat is nulllike most iasworld tables. Instead we also need to depend onmailseqand choosing which value ofmailseqto privilege in order to makemaildatunique by pin and year (we take the max value) boiled down to trying to match up with what's displayed on the treasurer's website. Two example pins are below:Updates have not changed row count, as expected:
returns nothing. and
mail_address_fullis largely non-null: