Skip to content

Commit

Permalink
try nullif
Browse files Browse the repository at this point in the history
  • Loading branch information
fivetran-jamie committed Jun 4, 2024
1 parent 700589f commit f6ada0c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions models/intermediate/int_zendesk__schedule_history.sql
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ split_times as (

select
schedule_id,
cast({{ dbt.split_part('start_time', "':'", 1) }} as {{ dbt.type_int() }}) as start_time_hh,
cast({{ dbt.split_part('start_time', "':'", 2) }} as {{ dbt.type_int() }}) as start_time_mm,
cast({{ dbt.split_part('end_time', "':'", 1) }} as {{ dbt.type_int() }}) as end_time_hh,
cast({{ dbt.split_part('end_time', "':'", 2) }} as {{ dbt.type_int() }}) as end_time_mm,
cast(nullif({{ dbt.split_part('start_time', "':'", 1) }}, ' ') as {{ dbt.type_int() }}) as start_time_hh,
cast(nullif({{ dbt.split_part('start_time', "':'", 2) }}, ' ') as {{ dbt.type_int() }}) as start_time_mm,
cast(nullif({{ dbt.split_part('end_time', "':'", 1) }}, ' ') as {{ dbt.type_int() }}) as end_time_hh,
cast(nullif({{ dbt.split_part('end_time', "':'", 2) }}, ' ') as {{ dbt.type_int() }}) as end_time_mm,
start_time,
end_time,
dow,
Expand Down

0 comments on commit f6ada0c

Please sign in to comment.