Skip to content

Commit

Permalink
cast certain values as floats instead of default string
Browse files Browse the repository at this point in the history
  • Loading branch information
fivetran-reneeli committed Jul 1, 2024
1 parent 4ddfb20 commit 01c8032
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions models/stg_twilio__call.sql
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ final as (
caller_name,
created_at,
direction,
duration,
cast(duration as {{ dbt.type_float() }}) as duration,
end_time,
forwarded_from,
call_from, -- renamed in the get_call_columns macro
Expand All @@ -40,7 +40,7 @@ final as (
parent_call_id,
cast(price as {{ dbt.type_float() }}) as price,
price_unit,
queue_time,
cast(queue_time as {{ dbt.type_float() }}) as queue_time,
start_time,
status,
call_to, -- renamed in the get_call_columns macro
Expand Down
4 changes: 2 additions & 2 deletions models/stg_twilio__message.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ final as (
message_from, -- renamed in the get_message_columns macro
id as message_id,
cast(messaging_service_sid as {{ dbt.type_string() }}) as messaging_service_id,
num_media,
num_segments,
cast(num_media as {{ dbt.type_float() }}) as num_media,
cast(num_segments as {{ dbt.type_float() }}) as num_segments,
cast(price as {{ dbt.type_float() }}) as price,
price_unit,
status,
Expand Down
2 changes: 1 addition & 1 deletion models/stg_twilio__usage_record.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final as (
account_id,
as_of,
category,
count,
cast(count as {{ dbt.type_float() }}) as count,
count_unit,
description,
end_date,
Expand Down

0 comments on commit 01c8032

Please sign in to comment.