Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dbt/models/sale/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This is the primary sales validation output table. Flags within this table
should be possible to reconstruct using the other sales validation tables:
`sale.group_mean`, `sale.parameter`, and `sale.metadata`.

**Primary Key**: `meta_sale_document_number`, `run_id`, `version`
**Primary Key**: `meta_sale_document_num`, `run_id`, `version`
{% enddocs %}

# foreclosure
Expand Down
24 changes: 24 additions & 0 deletions dbt/models/sale/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,20 @@ sources:
- load_auto

columns:
- name: group
description: |
Group string used as a unique identifier for the statistical flagging
group this sale belongs to. An example is township code, class, and
rolling window. You can join this field onto the `group_mean` table to
see more details about the group statistics.
- name: meta_sale_document_number
description: '{{ doc("shared_column_document_number") }}'
- name: meta_sale_price_original
description: |
This is the original sale price pulled from default.vw_pin_sale. This is
the original sale price. We log the sale price prior to assigning flags
so this column holds a historical record of the original sale price at the
snapshot in time that we ran the flagging pipeline.
- name: ptax_flag_original
description: |
Whether or not this sale was flagged on Q10 of the
Expand Down Expand Up @@ -39,6 +51,18 @@ sources:
description: '{{ doc("shared_column_sv_outlier_reason") }}'
- name: sv_outlier_reason3
description: '{{ doc("shared_column_sv_outlier_reason") }}'
- name: sv_price_deviation
description: |
The number of standard deviations this sale price is away from
the mean price of its group (township, class, rolling window).
This is used to determine whether or not the sale is an outlier
based on statistical deviation. We persist this column for ease in
understanding why a sale was or was not flagged as an outlier.
- name: sv_price_per_sqft_deviation
description: |
Same as sv_price_deviation, but calculated using price per sqft.
Will only be populated for res classes, since we don't have sqft
data for condos.
- name: version
description: '{{ doc("shared_column_sv_version") }}'

Expand Down
Loading