Check out the first Dataiku 8 Deep Dive focusing on Productivity on October 29th Read More

Custom aggregations examples

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
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.

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
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
Level 1
I'm actually using PostgreSQL 9.6.3 😕
0 Kudos
Level 1
Do you have any idea why I can't access PostgreSQL aggregate functions from that dashboard? Thx
0 Kudos
Level 1
Ok my bad, the output database was PG but the input was filebased... Works like a charm thanks
0 Kudos