-
Notifications
You must be signed in to change notification settings - Fork 113
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
feat: implement listagg macro #290
Conversation
{% set arr = "array_agg({})".format(measure) %} | ||
{% set arr = "arraySort({}, {})".format(arr, order_by_clause) if order_by_clause else arr %} | ||
{% if limit_num -%} | ||
arrayStringConcat('{{delimiter_text}}', arraySlice({{ arr }}, 1, {{ limit_num }})) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on the docs it seems that you need to pass the column name/array first, and only then the delimiter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, thanks a lot!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on docs singlequote also not needed. fixed that too
I created a different task (#301) for adjusting the tests to assert the results. |
Summary
Implement listagg macro, which is not supported at the moment