Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLAM avoid scientific notation for big sample counts #4647

Merged
merged 2 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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' %}
SUM(value) * MAX(sample_mult) as total_sample
CAST(SUM(value) * MAX(sample_mult) as numeric) as total_sample
{% else %}
SUM(value) as total_sample
CAST(SUM(value) as numeric) as total_sample
{% endif %}
FROM
all_combos
Expand All @@ -98,9 +98,9 @@ SELECT
key,
agg_type,
{% if channel == 'release' %}
SUM(value) * MAX(sample_mult) as total_sample
CAST(SUM(value) * MAX(sample_mult) as numeric) as total_sample
{% else %}
SUM(value) as total_sample
CAST(SUM(value) as numeric) 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
total_sample
CAST(total_sample as numeric)
END
AS total_sample,
non_norm_histogram,
Expand Down