Skip to content

Commit

Permalink
Cast to bignumeric instead of numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
edugfilho committed Dec 4, 2023
1 parent 932c2cf commit 5bfc6b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions bigquery_etl/glam/templates/view_sample_counts_v1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ SELECT
'' AS key,
agg_type,
{% if channel == 'release' %}
CAST(SUM(value) * MAX(sample_mult) as numeric) as total_sample
CAST(SUM(value) * MAX(sample_mult) as BIGNUMERIC) as total_sample
{% else %}
CAST(SUM(value) as numeric) as total_sample
CAST(SUM(value) as BIGNUMERIC) as total_sample
{% endif %}
FROM
all_combos
Expand All @@ -98,9 +98,9 @@ SELECT
key,
agg_type,
{% if channel == 'release' %}
CAST(SUM(value) * MAX(sample_mult) as numeric) as total_sample
CAST(SUM(value) * MAX(sample_mult) as BIGNUMERIC) as total_sample
{% else %}
CAST(SUM(value) as numeric) as total_sample
CAST(SUM(value) as BIGNUMERIC) as total_sample
{% endif %}
FROM
all_combos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ SELECT
CASE
WHEN client_agg_type = '' THEN 0
ELSE
CAST(total_sample as numeric)
CAST(total_sample as BIGNUMERIC)
END
AS total_sample,
non_norm_histogram,
Expand Down

0 comments on commit 5bfc6b0

Please sign in to comment.