Can you limit array_agg
in AWS athena? In postgres you can use this syntax, see this question.
SELECT
key
, array_agg(value LIMIT 100) as values
FROM table
You can actually use slice to do it:
SELECT
key
, slice(array_agg(value),1,100) as values
FROM table
Please note that the array index starts at 1