Jhonatan Teixeira
04/30/2025, 2:37 PMIN
with a huge collection of User IDs, the performance would usually degrade in this scenario but we want to better understand it, in case there are any internal mechanism to improve this already in place, as the data filter only allows a MAQL string. Also, can we consider that this IN clause is directly passed to the SQL statement?Julius Kos
04/30/2025, 6:00 PMJulius Kos
04/30/2025, 6:05 PMJhonatan Teixeira
05/01/2025, 10:07 AMJulius Kos
05/01/2025, 12:08 PM{
"data": {
"type": "userDataFilter",
"id": "<data-filter-id>",
"attributes": {
"maql": "<maql-expression>",
"title": "<data-filter-name>"
},
"relationships": {
"user": {
"data": {
"id": "<user-id>",
"type": "user"
}
}
}
}
}
You can either use “type”: “user” or “type”: “userGroup”Julius Kos
05/01/2025, 12:09 PMJhonatan Teixeira
05/01/2025, 12:17 PMJhonatan Teixeira
05/01/2025, 12:18 PMJhonatan Teixeira
05/01/2025, 12:18 PMJulius Kos
05/01/2025, 12:18 PMJhonatan Teixeira
05/01/2025, 12:19 PMJhonatan Teixeira
05/01/2025, 12:20 PMJulius Kos
05/01/2025, 1:48 PMWHERE
clause isn’t supported in UDF MAQL in this context because UDFs only allow flat, row-level filters. You can use AND
, OR
, or IN (...)
with static values like:
"maql": "{label/user.id} IN (\"user1\", \"user2\", \"user3\")"
But expressions like:
{label/user.id} IN ({label/user_manager.user_id} WHERE {label/user_manager.manager_id} = "mgr123")
won’t work, since UDFs can’t evaluate filtered sets or subqueries. To achieve that logic, you’d need to precompute the list of users for each manager and apply it statically in the UDF.Jhonatan Teixeira
05/01/2025, 3:41 PMJhonatan Teixeira
05/01/2025, 5:09 PMJulius Kos
05/01/2025, 5:37 PMJulius Kos
05/01/2025, 5:41 PMUserManager
dataset with user_id
and manager_id
. Connect user_id
to your User dataset, and manager_id
to the GoodData user (or a Manager dataset). Then, assign a single UDF to each manager:
{label/user.id} IN ({label/user_manager.user_id})
Julius Kos
05/01/2025, 5:43 PMJhonatan Teixeira
05/02/2025, 9:30 AMlabel/user_manager.user_id
would contain all the users associated with their managersJhonatan Teixeira
05/02/2025, 9:30 AMJhonatan Teixeira
05/02/2025, 9:31 AMJhonatan Teixeira
05/02/2025, 9:53 AMuserid IN (user_ids collection)
, do they work as an OR or AND? If they work as an OR when having multiple filters I could split the user IDs between many filters for the same manager.Jhonatan Teixeira
05/02/2025, 11:04 AMJulius Kos
05/02/2025, 11:24 AMJulius Kos
05/02/2025, 11:25 AMJulius Kos
05/02/2025, 11:27 AMRaffaella Gozzini
05/02/2025, 12:02 PMProductboard
05/02/2025, 12:06 PM