-
Notifications
You must be signed in to change notification settings - Fork 5
Refactor outlier columns in default.vw_pin_sale to incorporate human review
#977
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
Changes from all commits
988642b
13f850e
d66b74e
2b1362b
aae4e6d
db05fa8
9d16c80
408d606
eaf6287
530e5c0
634097c
36e49d1
7d4ade5
7b45684
4957812
2a7f67e
8f3615b
9fe8905
e14b451
cf1b1a3
27c75d6
e9bbaf1
abb4c08
786e5b9
d1d8371
642737b
34e3b37
e512f5a
b6562bc
4b0f4fe
e0da4d9
af0dcfc
79dd34d
4608468
220bcbd
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -66,14 +66,14 @@ SELECT | |||||
| vps.sale_price, | ||||||
| vps.sale_date, | ||||||
| vps.sale_filter_is_outlier, | ||||||
|
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. @jeancochrane should this become
Member
Author
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.
|
||||||
| vps.sv_is_outlier, | ||||||
| vps.flag_is_outlier AS sv_is_outlier, | ||||||
| vps.is_multisale, | ||||||
| vps.sale_filter_same_sale_within_365, | ||||||
| vps.sale_filter_less_than_10k, | ||||||
| vps.sale_filter_deed_type, | ||||||
| vps.sv_outlier_reason1, | ||||||
| vps.sv_outlier_reason2, | ||||||
| vps.sv_outlier_reason3, | ||||||
| vps.flag_outlier_reason1 AS sv_outlier_reason1, | ||||||
| vps.flag_outlier_reason2 AS sv_outlier_reason2, | ||||||
| vps.flag_outlier_reason3 AS sv_outlier_reason3, | ||||||
| -- Cards 1 and 2 are card numbers for the first two residential cards for a | ||||||
| -- parcel. They will not always be values of 1 and 2. | ||||||
| vrc1.card AS card1, | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| -- View that derives the most recent version of flags for each sale in the | ||
| -- `sale.flag` table, which uses its `version` column as a type 2 | ||
| -- slowly changing dimension | ||
jeancochrane marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| SELECT | ||
| sf.meta_sale_document_num AS doc_no, | ||
| sf.sv_is_outlier, | ||
| sf.sv_is_ptax_outlier, | ||
| sf.sv_is_heuristic_outlier, | ||
| sf.sv_outlier_reason1, | ||
| sf.sv_outlier_reason2, | ||
| sf.sv_outlier_reason3, | ||
| sf.run_id, | ||
| sf.version | ||
| FROM {{ source('sale', 'flag') }} AS sf | ||
| INNER JOIN ( | ||
| SELECT | ||
| meta_sale_document_num, | ||
| MAX(version) AS max_version | ||
| FROM {{ source('sale', 'flag') }} | ||
| GROUP BY meta_sale_document_num | ||
| ) AS mv | ||
| ON sf.meta_sale_document_num = mv.meta_sale_document_num | ||
| AND sf.version = mv.max_version | ||
Uh oh!
There was an error while loading. Please reload this page.