Skip to content

Commit

Permalink
fixing data type for redshift
Browse files Browse the repository at this point in the history
  • Loading branch information
thutuva committed Jun 6, 2024
1 parent 0684b5b commit af891de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions models/_models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ models:
config:
schema: elation_stage
alias: lab_result
materialized: table

- name: elation_stage__medication_fill
config:
Expand Down
6 changes: 5 additions & 1 deletion models/stage/elation_stage__lab_result.sql
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ select
, result.reference_max as source_reference_range_high
, cast(null as {{ dbt.type_string() }} ) as normalized_reference_range_low
, cast(null as {{ dbt.type_string() }} ) as normalized_reference_range_high
, cast(result.is_abnormal as {{ dbt.type_string() }} ) as source_abnormal_flag
, cast(
case
when result.is_abnormal = true then '1'
when result.is_abnormal = false then '0'
end as {{ dbt.type_string() }} ) as source_abnormal_flag
, cast(null as {{ dbt.type_string() }} ) as normalized_abnormal_flag
, ord.ordering_provider as ordering_practitioner_id
, cast(null as {{ dbt.type_string() }} ) as specimen
Expand Down

0 comments on commit af891de

Please sign in to comment.