-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Missed the DuckDB template for the Biostatistics flu cases download
- Loading branch information
sacundim
committed
Jun 30, 2024
1 parent
2a079cf
commit 69aaa21
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
downloader/src/covid_19_puerto_rico_downloader/templates/biostatistics/flu-cases.sql.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
COPY ( | ||
SELECT | ||
*, | ||
TIMESTAMP '{{ downloaded_at }}' AS downloadedAt | ||
FROM read_json( | ||
'{{ input_file }}', | ||
format='array', | ||
union_by_name=true, | ||
columns={ | ||
caseId: 'STRING', | ||
caseCategory: 'STRING', | ||
patientAgeRange: 'STRING', | ||
patientSex: 'STRING', | ||
patientPhysicalCity: 'STRING', | ||
identifyingTestSampleCollectedDate: 'DATE' | ||
} | ||
) | ||
ORDER BY | ||
identifyingTestSampleCollectedDate | ||
) | ||
TO '{{ output_parquet }}' ( | ||
FORMAT 'parquet', COMPRESSION 'GZIP' | ||
); |