Hello team! I'd like to report an issue I encounte...
# gooddata-cloud
e
Hello team! I'd like to report an issue I encountered with the PATCH operation for a UDF filter in one of our workspaces. Here's a brief overview: • Workspaces: We have a root workspace (
W1
) and a child workspace (
W2
), where
W2
is a child of
W1
. • UDF Filter: The UDF filter (
F1
) is set up in
W2
for a specific user. • Operations: While creation (POST) and deletion (DELETE) processes are functioning correctly, attempting to replace
F1
(PATCH) with a different definition results in the error below:
Copy code
{
  "detail": "Some of given referenced 'labels' entities do not exist. Not existing IDs: [Identifier(TABLE_NAME.COLUMN_NAME)/Workspace(W2)]",
  "status": 400,
  "title": "Bad Request",
  "traceId": "871d31999981119188f5b2f971941fb9"
}
When I apply the same exact setup with
F1
(for the same user) in
W1
, the PATCH operation works as expected without any issues. Could someone please assist in resolving this? Thanks!
f
Hi Evangelos, could you tell us a bit more about the change you are applying via the PATCH? I’m especially interested in what is in the
"maql"
object - from our logs, the errors is related to a Label that doesn’t exist in the workspace - so there’s a possibility of a typo, for example. Another possibility: do you have any other Filters on the Parent Workspace
W1
that would remove this label from child
W2
? It could definitely cause this issue and explain why the filter works on the Parent (because it exists there, but another filter, or the same one, makes it not be available on the Child, leading to the issue).
e
Hey @Francisco Antunes, I have created a UDF
F1
at the child workspace
W2
with the following request body:
Copy code
{
  "data": {
    "type": "userDataFilter",
    "id": "udf_evangelos.malandrakis.sales_ws_dev.sme",
    "attributes": {
      "maql": "{label/D_CHARGE_POINT_OUTLETS.SITE_ID} IN (\"297929e1-f724-4963-bfae-4e988d2c5229\", \"-1\", \"577703a0-40e7-46cc-82e9-c4938ec7428a\", \"a2b89f9e-58be-43cf-8bd6-5802a3ff37b0\") AND {label/D_CHARGING_AGREEMENTS.SITE_ID} IN (\"297929e1-f724-4963-bfae-4e988d2c5229\", \"-1\", \"577703a0-40e7-46cc-82e9-c4938ec7428a\", \"a2b89f9e-58be-43cf-8bd6-5802a3ff37b0\") AND {label/D_SITES.SITE_ID} IN (\"297929e1-f724-4963-bfae-4e988d2c5229\", \"-1\", \"577703a0-40e7-46cc-82e9-c4938ec7428a\", \"a2b89f9e-58be-43cf-8bd6-5802a3ff37b0\") AND {label/D_SPOTS.SITE_ID} IN (\"297929e1-f724-4963-bfae-4e988d2c5229\", \"-1\", \"577703a0-40e7-46cc-82e9-c4938ec7428a\", \"a2b89f9e-58be-43cf-8bd6-5802a3ff37b0\") AND {label/D_AGREEMENTS.SITE_ID} IN (\"297929e1-f724-4963-bfae-4e988d2c5229\", \"-1\", \"577703a0-40e7-46cc-82e9-c4938ec7428a\", \"a2b89f9e-58be-43cf-8bd6-5802a3ff37b0\") AND {label/D_DEBTORS_SCD.SITE_ID} IN (\"297929e1-f724-4963-bfae-4e988d2c5229\", \"-1\", \"577703a0-40e7-46cc-82e9-c4938ec7428a\", \"a2b89f9e-58be-43cf-8bd6-5802a3ff37b0\")"
    },
    "relationships": {
      "user": {
        "data": {
          "id": "evangelos.malandrakis.sales",
          "type": "user"
        }
      }
    }
  }
}
For the sake of simplicity, I reduced the MAQL to a smaller subset and applied only this change:
Copy code
{
  "data": {
    "type": "userDataFilter",
    "id": "udf_evangelos.malandrakis.sales_ws_dev.sme",
    "attributes": {
      "maql": "{label/D_CHARGE_POINT_OUTLETS.SITE_ID} IN (\"297929e1-f724-4963-bfae-4e988d2c5229\")"
    }
  }
}
The simplified MAQL includes only a part of the previous MAQL. However, I received the following error:
Copy code
{
  "detail": "Some of given referenced 'labels' entities do not exist. Not existing IDs: [Identifier(D_CHARGE_POINT_OUTLETS.SITE_ID)/Workspace(dev.sme)]",
  "status": 400,
  "title": "Bad Request",
  "traceId": "a41ca6482d5d6460d3178b416de3f7d3"
}
When I apply the same procedure to the parent workspace
W1
, the PATCH operation works as expected. Since the filter in the parent workspace
W1
doesn't affect these labels, and given that the initial UDF was created successfully, shouldn't a "subset" of it also work without issues?
f
Thank you for the details, Nachi! I was able to reproduce this exact behavior: I’m unable to perform PATCH calls on UDFs created on a Child Workspace. I’ve tried several things, and it doesn’t matter what label I select, the same error you received pops up. I can still update them via PUTs, so I would suggest using that as a workaround for now. In the meantime, I will investigate further and highlight this for internal discussion.
e
Thank you for confirming the issue and suggesting the workaround with PUT requests. I’ll use that method for now and look forward to any updates on a fix.