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

Add row_id to default.vw_pin_universe #631

Merged
merged 1 commit into from
Oct 29, 2024
Merged
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
1 change: 1 addition & 0 deletions dbt/models/default/default.vw_pin_universe.sql
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ WITH pardat_adjusted_years AS (

SELECT
-- Main PIN-level attribute data from iasWorld
CONCAT(par.parid, par.taxyr) AS row_id,
Copy link
Contributor

@jeancochrane jeancochrane Oct 28, 2024

Choose a reason for hiding this comment

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

[Thought, non-blocking] I wonder if it's worth making this identifier slightly more human-readable by including a delimiter between the component parts? I don't have a good sense of how important this will be down the road, or how easy it'll be to change going forward; if you feel strongly that it won't be important (i.e. no one will ever read this identifier) or it'll be easy to change going forward (i.e. we'll be able to easily add delimiters to the prod data at a future point if we choose), then feel free to ignore for now! Just something to think about as we look forward to migrating the rest of the views to use this system too.

Suggested change
CONCAT(par.parid, par.taxyr) AS row_id,
CONCAT(par.parid, '-', par.taxyr) AS row_id,

Copy link
Member Author

Choose a reason for hiding this comment

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

My plan was for this column to not even be visible on socrata. And since it won't exist long term in this view (generation will be done on the fly by the upload script) I'm not too worried about.

par.parid AS pin,
SUBSTR(par.parid, 1, 10) AS pin10,
par.taxyr AS year,
Expand Down
Loading