Add description to docs for proximity views #958
Conversation
jeancochrane
left a comment
There was a problem hiding this comment.
A few small changes to make sure this is all buttoned up!
| - name: nearest_university_gnis_code | ||
| description: '{{ doc("column_nearest_university_gnis_code") }}' |
There was a problem hiding this comment.
[Suggestion, optional] As long as we're cleaning up these docs, I figure we might as well remove this column definition, since it doesn't seem to be part of either vw_pin10_proximity or vw_pin10_proximity_fill anymore.
| - name: airport_data_year | ||
| description: '{{ doc("column_airport_data_year") }}' | ||
| - name: airport_dnl_total | ||
| description: '{{ doc("column_airport_dnl_total") }}' | ||
| - name: airport_midway_dist_ft | ||
| description: '{{ doc("column_airport_midway_dist_ft") }}' | ||
| - name: airport_ohare_dist_ft | ||
| description: '{{ doc("column_airport_ohare_dist_ft") }}' |
There was a problem hiding this comment.
[Nitpick, required] It looks like these fields are defined in the vw_pin10_proximity_fill query:
But they're not defined in vw_pin10_proximity:
That means they end up with blank types in the vw_pin10_proximity docs, since those fields are not present in the table, meaning dbt can't infer types for them:
Maybe @wrridgeway knows why these airport metadata fields are missing from vw_pin10_proximity? If there's no good reason for the discrepancy, then the easiest fix here should just be to add these metadata fields to the vw_pin10_proximity query, which will automatically populate their data types in the dbt docs.
| - name: nearest_road_highway_data_year | ||
| description: '{{ doc("shared_column_data_year") }}' |
There was a problem hiding this comment.
[Nitpick, required] Similar to above, this field is defined in vw_pin10_proximity:
But it's missing from vw_pin10_proximity_fill:
data-architecture/dbt/models/proximity/proximity.vw_pin10_proximity_fill.sql
Lines 107 to 114 in 76a64f9
Which leads to an empty data type in the docs:
@wrridgeway Same as above: Are we good to add this data_year column to vw_pin10_proximity so that it matches vw_pin10_proximity_fill?
| - name: nearest_grocery_store_name | ||
| description: '{{ doc("column_nearest_grocery_store_name") }}' | ||
| - name: nearest_grocery_store_name | ||
| description: '{{ doc("column_nearest_grocery_store_name") }}' |
There was a problem hiding this comment.

Quick fix to add columns to the yaml file to produce the docs for missing proximity views.