Skip to content

Commit

Permalink
Merge pull request #711 from ccao-data/remove-null-from-recheck-year-…
Browse files Browse the repository at this point in the history
…column

Ensure `recheck_year` has no non-numeric values
  • Loading branch information
wrridgeway authored Jan 21, 2025
2 parents 2de1e22 + 26e79e1 commit 56a72f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dbt/models/default/default.vw_pin_permit.sql
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ SELECT
COALESCE(permit.udate3, permit.wen) AS date_updated,
permit.udate2 AS estimated_date_of_completion,
permit.user31 AS assessment_year,
permit.user11 AS recheck_year,
CAST(NULLIF(REGEXP_REPLACE(permit.user11, '([^0-9])', ''), '') AS INT)
AS recheck_year,
permit.flag AS status,
permit.user18 AS assessable,
permit.amount,
Expand Down

0 comments on commit 56a72f7

Please sign in to comment.