-
Notifications
You must be signed in to change notification settings - Fork 5
Add description to docs for proximity views #958
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
base: master
Are you sure you want to change the base?
Changes from all commits
a336a02
e0f6592
1d4c35d
28e4cb3
9f80b66
f1f1e72
d2c5d6a
30a5ec8
79c4e48
8193a2f
4bcf5f8
876a68b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -17,12 +17,12 @@ models: | |||||||||||||||||||
| meta: | ||||||||||||||||||||
| description: cnt_pin_num_bus_stop should match spatial_parcel | ||||||||||||||||||||
| - unique_combination_of_columns: | ||||||||||||||||||||
| name: proximity_cnt_pin_num_bus_stop_unique_by_pin10_and_year | ||||||||||||||||||||
| combination_of_columns: | ||||||||||||||||||||
| - pin10 | ||||||||||||||||||||
| - year | ||||||||||||||||||||
| meta: | ||||||||||||||||||||
| description: cnt_pin_num_bus_stop should be unique by pin10 and year | ||||||||||||||||||||
| name: proximity_cnt_pin_num_bus_stop_unique_by_pin10_and_year | ||||||||||||||||||||
| combination_of_columns: | ||||||||||||||||||||
| - pin10 | ||||||||||||||||||||
| - year | ||||||||||||||||||||
| meta: | ||||||||||||||||||||
| description: cnt_pin_num_bus_stop should be unique by pin10 and year | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: proximity.cnt_pin_num_foreclosure | ||||||||||||||||||||
| description: '{{ doc("table_cnt_pin_num_foreclosure") }}' | ||||||||||||||||||||
|
|
@@ -272,13 +272,13 @@ models: | |||||||||||||||||||
| - name: proximity.dist_pin_to_major_road | ||||||||||||||||||||
| description: '{{ doc("table_dist_pin_to_major_road") }}' | ||||||||||||||||||||
| data_tests: | ||||||||||||||||||||
| - unique_combination_of_columns: | ||||||||||||||||||||
| name: proximity_dist_pin_to_major_road_unique_by_pin10_and_year | ||||||||||||||||||||
| combination_of_columns: | ||||||||||||||||||||
| - pin10 | ||||||||||||||||||||
| - year | ||||||||||||||||||||
| meta: | ||||||||||||||||||||
| description: dist_pin_to_major_road should be unique by pin10 and year | ||||||||||||||||||||
| - unique_combination_of_columns: | ||||||||||||||||||||
| name: proximity_dist_pin_to_major_road_unique_by_pin10_and_year | ||||||||||||||||||||
| combination_of_columns: | ||||||||||||||||||||
| - pin10 | ||||||||||||||||||||
| - year | ||||||||||||||||||||
| meta: | ||||||||||||||||||||
| description: dist_pin_to_major_road should be unique by pin10 and year | ||||||||||||||||||||
|
|
||||||||||||||||||||
| - name: proximity.dist_pin_to_metra_route | ||||||||||||||||||||
| description: '{{ doc("table_dist_pin_to_metra_route") }}' | ||||||||||||||||||||
|
|
@@ -631,8 +631,14 @@ models: | |||||||||||||||||||
| meta: | ||||||||||||||||||||
| description: vw_pin10_proximity should be unique by pin10 and year | ||||||||||||||||||||
| columns: &vw_proximity_columns | ||||||||||||||||||||
| - 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") }}' | ||||||||||||||||||||
| - name: avg_school_rating_in_half_mile | ||||||||||||||||||||
| description: '{{ doc("column_avg_school_rating_in_half_mile") }}' | ||||||||||||||||||||
| - name: lake_michigan_data_year | ||||||||||||||||||||
|
|
@@ -677,12 +683,12 @@ models: | |||||||||||||||||||
| description: '{{ doc("column_nearest_golf_course_dist_ft") }}' | ||||||||||||||||||||
| - name: nearest_golf_course_id | ||||||||||||||||||||
| description: '{{ doc("column_nearest_golf_course_id") }}' | ||||||||||||||||||||
| - name: nearest_grocery_store_data_year | ||||||||||||||||||||
| description: '{{ doc("shared_column_data_year") }}' | ||||||||||||||||||||
| - name: nearest_grocery_store_dist_ft | ||||||||||||||||||||
| description: '{{ doc("column_nearest_grocery_store_dist_ft") }}' | ||||||||||||||||||||
| - name: nearest_grocery_store_name | ||||||||||||||||||||
| description: '{{ doc("column_nearest_grocery_store_name") }}' | ||||||||||||||||||||
| - name: nearest_grocery_store_name | ||||||||||||||||||||
| description: '{{ doc("column_nearest_grocery_store_name") }}' | ||||||||||||||||||||
| - name: nearest_hospital_data_year | ||||||||||||||||||||
| description: '{{ doc("shared_column_data_year") }}' | ||||||||||||||||||||
| - name: nearest_hospital_dist_ft | ||||||||||||||||||||
|
|
@@ -751,6 +757,48 @@ models: | |||||||||||||||||||
| description: '{{ doc("column_nearest_railroad_id") }}' | ||||||||||||||||||||
| - name: nearest_railroad_name | ||||||||||||||||||||
| description: '{{ doc("column_nearest_railroad_name") }}' | ||||||||||||||||||||
| - name: nearest_road_arterial_daily_traffic | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_arterial_daily_traffic") }}' | ||||||||||||||||||||
| - name: nearest_road_arterial_data_year | ||||||||||||||||||||
| description: '{{ doc("shared_column_data_year") }}' | ||||||||||||||||||||
| - name: nearest_road_arterial_dist_ft | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_arterial_dist_ft") }}' | ||||||||||||||||||||
| - name: nearest_road_arterial_lanes | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_arterial_lanes") }}' | ||||||||||||||||||||
| - name: nearest_road_arterial_name | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_arterial_name") }}' | ||||||||||||||||||||
| - name: nearest_road_arterial_speed_limit | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_arterial_speed_limit") }}' | ||||||||||||||||||||
| - name: nearest_road_arterial_surface_type | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_arterial_surface_type") }}' | ||||||||||||||||||||
| - name: nearest_road_collector_daily_traffic | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_collector_daily_traffic") }}' | ||||||||||||||||||||
| - name: nearest_road_collector_data_year | ||||||||||||||||||||
| description: '{{ doc("shared_column_data_year") }}' | ||||||||||||||||||||
| - name: nearest_road_collector_dist_ft | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_collector_dist_ft") }}' | ||||||||||||||||||||
| - name: nearest_road_collector_lanes | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_collector_lanes") }}' | ||||||||||||||||||||
| - name: nearest_road_collector_name | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_collector_name") }}' | ||||||||||||||||||||
| - name: nearest_road_collector_speed_limit | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_collector_speed_limit") }}' | ||||||||||||||||||||
| - name: nearest_road_collector_surface_type | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_collector_surface_type") }}' | ||||||||||||||||||||
| - name: nearest_road_highway_daily_traffic | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_highway_daily_traffic") }}' | ||||||||||||||||||||
| - name: nearest_road_highway_data_year | ||||||||||||||||||||
| description: '{{ doc("shared_column_data_year") }}' | ||||||||||||||||||||
|
Comment on lines
+790
to
+791
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Nitpick, required] Similar to above, this field is defined in
But it's missing from 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 |
||||||||||||||||||||
| - name: nearest_road_highway_dist_ft | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_highway_dist_ft") }}' | ||||||||||||||||||||
| - name: nearest_road_highway_lanes | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_highway_lanes") }}' | ||||||||||||||||||||
| - name: nearest_road_highway_name | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_highway_name") }}' | ||||||||||||||||||||
| - name: nearest_road_highway_speed_limit | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_highway_speed_limit") }}' | ||||||||||||||||||||
| - name: nearest_road_highway_surface_type | ||||||||||||||||||||
| description: '{{ doc("column_nearest_road_highway_surface_type") }}' | ||||||||||||||||||||
| - name: nearest_secondary_road_data_year | ||||||||||||||||||||
| description: '{{ doc("shared_column_data_year") }}' | ||||||||||||||||||||
| - name: nearest_secondary_road_dist_ft | ||||||||||||||||||||
|
|
@@ -769,8 +817,6 @@ models: | |||||||||||||||||||
| description: '{{ doc("shared_column_data_year") }}' | ||||||||||||||||||||
| - name: nearest_university_dist_ft | ||||||||||||||||||||
| description: '{{ doc("column_nearest_university_dist_ft") }}' | ||||||||||||||||||||
| - name: nearest_university_gnis_code | ||||||||||||||||||||
| description: '{{ doc("column_nearest_university_gnis_code") }}' | ||||||||||||||||||||
| - name: nearest_university_name | ||||||||||||||||||||
| description: '{{ doc("column_nearest_university_name") }}' | ||||||||||||||||||||
| - name: nearest_vacant_land_data_year | ||||||||||||||||||||
|
|
||||||||||||||||||||

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Nitpick, required] It looks like these fields are defined in the
vw_pin10_proximity_fillquery:data-architecture/dbt/models/proximity/proximity.vw_pin10_proximity_fill.sql
Lines 20 to 25 in 76a64f9
But they're not defined in
vw_pin10_proximity:data-architecture/dbt/models/proximity/proximity.vw_pin10_proximity.sql
Lines 20 to 22 in 76a64f9
That means they end up with blank types in the
vw_pin10_proximitydocs, 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 thevw_pin10_proximityquery, which will automatically populate their data types in the dbt docs.