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

Created array_distinct function to easily get only the unique values from an array #101

Merged
merged 5 commits into from
Mar 1, 2024

Conversation

cleentfaar
Copy link
Contributor

@cleentfaar cleentfaar commented Mar 1, 2024

Why?

Needed a quick and easy way to only get unique values from an array.

How?

BigQuery does not really provide with an easy of doing this without using UNNEST which is costly especially on larger datasets which is what I'm going to use it on.

source: https://feralcat.xyz/blog/2022/03/16/removing-duplicate-elements-from-an-array-in-bigquery/

JIRA

n/a

@cleentfaar cleentfaar marked this pull request as ready for review March 1, 2024 13:51
@cleentfaar cleentfaar requested a review from a team as a code owner March 1, 2024 13:51
@cleentfaar cleentfaar merged commit 4c0bca6 into main Mar 1, 2024
2 checks passed
@cleentfaar cleentfaar deleted the arraydistinct branch March 1, 2024 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants