Skip to content
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

Replace all aggregate land calculations with pulls from agg land view #77

Conversation

wrridgeway
Copy link
Member

@wrridgeway wrridgeway commented Aug 17, 2023

Aggregating land square footage needs to incorporate the influ column in iasworld.land and some land line heuristics, rather than just summing by parcel.

We need to make sure every view that aggregates land sf uses this new view for consistency and accuracy.

@wrridgeway wrridgeway requested a review from a team as a code owner August 17, 2023 18:11
@dfsnow dfsnow marked this pull request as draft August 17, 2023 18:14
@wrridgeway wrridgeway marked this pull request as ready for review August 18, 2023 17:55
@dfsnow dfsnow marked this pull request as draft August 18, 2023 19:18
@wrridgeway wrridgeway marked this pull request as ready for review August 29, 2023 18:02
@dfsnow dfsnow self-requested a review August 29, 2023 19:43
Copy link
Member

@dfsnow dfsnow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wrridgeway I'm seeing some differences between the original aggregate_land CTE total row count and the new default.vw_pin_land total row count. Here's an example:

SELECT COUNT(*)
FROM "default"."vw_pin_land"
WHERE year = '2022';

Row count: 1,864,776

SELECT COUNT(*)
FROM (
    SELECT parid
    FROM "iasworld"."land"
    WHERE taxyr = '2022'
        AND land.cur = 'Y'
        AND land.deactivat IS NULL
    GROUP BY parid, taxyr
)

Row count: 1,864,932

Can you look into the difference between these two?

@wrridgeway
Copy link
Member Author

Good catch. Should be sorted now, can't use lline = 1 since that row can be deactivated in some cases.

@dfsnow dfsnow self-requested a review August 30, 2023 22:10
Copy link
Member

@dfsnow dfsnow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Looks good now @wrridgeway. I'll go ahead and merge this.

@dfsnow dfsnow merged commit 8e7a22f into master Aug 30, 2023
3 checks passed
@dfsnow dfsnow deleted the 76-replace-aggregated-land-calculation-in-all-views-with-defaultvw_pin_land branch August 30, 2023 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace aggregated land calculation in all views with default.vw_pin_land
2 participants