Skip to content

Commit

Permalink
Merge pull request #57 from datamade/bugfix/43-filing-date
Browse files Browse the repository at this point in the history
Normalize filing date on new case import
  • Loading branch information
antidipyramid authored May 3, 2024
2 parents 0dc2b64 + 6a04f99 commit a24352a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/new_cases.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ CREATE TEMPORARY TABLE raw_case (
.import /dev/stdin raw_case
-- noqa: enable=PRS

-- Normalize filing dates to ISO format
UPDATE raw_case
SET
filing_date
= substr(filing_date, -4, 4)
|| "-"
|| substr(filing_date, 1, 2)
|| "-"
|| substr(filing_date, 4, 2)
WHERE filing_date LIKE "__/__/____";

INSERT INTO
court_case(
case_number,
Expand Down

0 comments on commit a24352a

Please sign in to comment.