Conversation
|
thoughts so far from looking at
|
AmandaDoyle
left a comment
There was a problem hiding this comment.
See comments for detailed feedback.
| @@ -0,0 +1,45 @@ | |||
| -- Create qaqc table All PLUTO records where there is a match in Housing Database | |||
There was a problem hiding this comment.
Missing "of"
I think this need to be " Create qaqc table of all PLUTO records where there is a match in Housing Database"
| -- Create qaqc table All PLUTO records where there is a match in Housing Database | ||
| -- and the PLUTO residential units value does not match the housing database certificates | ||
| -- of occupancy value. Have flag indicating if bbl has residential unit correction in manual corrections table. | ||
| -- select PLUTO records that have a match in the HousingDB subset where unitsres does not equal units co |
There was a problem hiding this comment.
Is this last sentence repetitive of the first 3 lines?
| -- Data Dictionary | ||
| -- bbl - billing BBL | ||
| -- job_number - The DOB job application number assigned when the applicant begins the application. This is the unique identifier for the application submitted to the Department of Buildings (DOB). | ||
| -- units_res - The number of residential units as reported by dcp_housing database |
There was a problem hiding this comment.
unitsres is coming from PLUTO
| -- units_res - The number of residential units as reported by dcp_housing database | ||
| -- units_co - The number of units listed on the DOB issued Certificate of Occupancy | ||
| -- new_value | ||
| -- old_value |
There was a problem hiding this comment.
Would adding definitions of what these fields are be useful?
| old_value text | ||
| ); | ||
|
|
||
| INSERT INTO qaqc_housing_units |
There was a problem hiding this comment.
There are duplicate records in the output table in DO. This may have to do with the CREATE TABLE IF NOT EXISTS and INSERT INTO statements. I confirmed that the duplicates do not appear when querying the database directly.
pluto_build/sql/qaqc_pts_condo.sql
Outdated
| -- primebbl - Billing BBL | ||
| -- bbl - Unit level BBl | ||
| -- units - The number of units listed by Department of Finance for the property (compare to units_co in dcp_housing) | ||
| -- coop_apts - The number of coop apartments listed for the property |
There was a problem hiding this comment.
This is the number of residential units
| -- old_value - The previous number of units as reported by the pluto_correction file | ||
|
|
||
|
|
||
| CREATE TABLE IF NOT EXISTS qaqc_pts_condo( |
There was a problem hiding this comment.
There are duplicate records in the output table in DO. This may have to do with the CREATE TABLE IF NOT EXISTS and INSERT INTO statements. I confirmed that the duplicates do not appear when querying the database directly.
| -- select only corrections to unitsres field | ||
| corrections_subset as ( | ||
| SELECT * | ||
| FROM pluto_corrections |
There was a problem hiding this comment.
We're no longer pulling in pluto_corrections per PR #425 so this needs to be changed.
| -- select only corrections to unitsres field | ||
| corrections_subset as ( | ||
| SELECT * | ||
| FROM pluto_corrections |
There was a problem hiding this comment.
We're no longer pulling in pluto_corrections per PR #425 so this needs to be changed.
|
@AmandaDoyle @damonmcc let's check in on this pr this afternoon? |
Addresses issue #414.
Changes
dcp_housingas in input data source to compare the Certificate of Occupancy # of units residential (most accurate units residential number) in the Housing DB to PLUTO datasource_data_version.csv