Pete Lorenz
10/09/2023, 10:06 PM{
"detail": "The MAQL query='SELECT SUM(TRANSACTION.TRANSACTION_UNITS) WHERE TRANSACTION.CLIENT_ORG_KEY = \"4e947d2f-8a21-43fa-a905-397fa2a4c1c5\"' could not be parsed. Character on position 13 in line 1: extraneous input 'SELECT' expecting {'bottom', 'case', 'cume_dist', 'dense_rank', 'false', 'first_value', 'if', 'last_value', 'next', 'not', 'null', 'percent_rank', 'previous', 'rank', 'report', 'row_number', 'runavg', 'runmax', 'runmin', 'runsum', 'runstdev', 'runstdevp', 'runvar', 'runvarp', 'this', 'top', 'true', 'day', 'dayofweek', 'dayofmonth', 'dayofyear', 'hour', 'hourofday', 'minute', 'minuteofhour', 'month', 'monthofyear', 'quarter', 'quarterofyear', 'year', 'week', 'weekofyear', String, '{', '(', '-', '+', ZERO, Natural, Real, Identifier}",
"status": 400,
"title": "Bad Request",
"traceId": "13ab3b531fc24a86"
}
The request body looks like this:
{
"data": {
"type": "userDataFilter",
"id": "ca-sco-transaction-units",
"attributes": {
"maql": "SELECT SUM(TRANSACTION.TRANSACTION_UNITS) WHERE TRANSACTION.CLIENT_ORG_KEY = \"4e947d2f-8a21-43fa-a905-397fa2a4c1c5\"",
"title": "CA SCO Transaction Units"
},
"relationships": {
"user": {
"data": {
"id": "ca_test1",
"type": "user"
}
}
}
}
}
I've tried several variations of the MAQL but can't seem to make the MAQL validator happy (error is the same each time). Can someone suggest what I'm doing wrong or provide an example of the valid MAQL in this case? A snapshot of my model is attached.Michal Hauzírek
10/09/2023, 10:24 PM"{label/l_linestatus} = \"O\"",
Also, in the MAQL condition I believe you should use the identifiers of GoodData objects (facts/attributes/labels) as they are used in the metric editor - that is in the {}
brackets and with some prefix.based on the type of the object i.e. {label/transaction.client_org_key}
The UDFs once set for a user are applied to the whole workspace, not just a particular metric. So if you apply the filter to the user, any query which they execute (and will be compatible in the LDM with the condition) will get filtered. Different users can then look at the same insight and see different data based on what UDFs they have.Pete Lorenz
10/09/2023, 10:29 PM