Announcing the winners & finalists of the Dataiku Frontrunner Awards 2021! Read their inspiring stories

Custom aggregations examples

UserBird
Dataiker
Dataiker
Custom aggregations examples
Hello,

Could you provide some examples of custom aggregations involving an array or a map?

Thank you
0 Kudos
6 Replies
cperdigou
Dataiker
Dataiker

Here is an example using Postgres





 



For a complete reference see https://www.postgresql.org/docs/9.5/static/functions-aggregate.html or the reference of the database you use.

Francis
Level 1
Hey thanks for the answer, that helped me. However, I can't seem to use any of PG aggregate functions except group_concat:

https://pasteboard.co/GAjh6rZ.png

Is it normal ?
0 Kudos
cperdigou
Dataiker
Dataiker
You are probably using MySQL, in that case the answer is yes.
See this SO question:
https://stackoverflow.com/questions/39030090/mysql-array-aggregate-function-like-postgresql-array-agg
0 Kudos
Francis
Level 1
I'm actually using PostgreSQL 9.6.3 😕
0 Kudos
Francis
Level 1
Do you have any idea why I can't access PostgreSQL aggregate functions from that dashboard? Thx
0 Kudos
Francis
Level 1
Ok my bad, the output database was PG but the input was filebased... Works like a charm thanks
0 Kudos
Labels (2)
A banner prompting to get Dataiku DSS