Hello! I'm hoping this is the correct channel but ...
# gooddata-ui
m
Hello! I'm hoping this is the correct channel but feel free to redirect me if there is a better place. We have a custom execution that we are running in our React app and the data that it is returning is old compared what I see in gooddata cloud for the same metrics. We clear our datasource cache on a regular basis, and I did a manual one just to make sure. Is there another caching layer that we need to refresh? Let me know what other information would be helpful. Thanks!
πŸ‘€ 1
Here is an example of the call being made
Copy code
<https://prophia.cloud.gooddata.com/api/v1/actions/workspaces/platform-workspace-b/execution/afm/execute/result/7702157bdcf29acf877a221a8523dfb33f37e4d1%3Acf24050f52796186a9fe5df1d8732bb9b1e9d43c8dd4ce08f24e0f92bc43e00d>
m
Hi Mitchell, my initial thinking here is the same resultId being reused in your app. The URL you shared is the result endpoint:
/execute/result/{resultId}
A resultId is a returned by a previous POST to:
/execution/afm/execute
Could it be that your app is reusing an old
resultId
so you are getting the old execution, even if data in the warehouse changed? I would recommend that you verify your app is always re-executing before reading results. So before it’s calling:
/execute/result/{resultId}
Your app is always before calling the POST:
execution/afm/execute
Could this be the case?
m
Hi Michael, I may not be following but I'm pretty sure we executing it correctly. Here is part of our code
Copy code
const result = await gooddataBackend
                        .workspace(GOODDATA_WORKSPACE)
                        .execution()
                        .forItems([ buildingCount, Md.CurrentActiveTenantCount, Md.RentableSFByAllProperty, Md.LeasedSFByAllProperty, Md.OccupiedSquareFeet_1.Sum, Md.VacantSqFt ], permissionsFilters)
                        .execute();
                    const dataWrapper = await result.readAll()
This is in a useEffect that is going to run when the relevant properties change and it needs to be reloaded
m
My apologies for the confusion, I just meant that you can check that your app is not reading an old result: For example, you can open the browser Network tab and confirm you see a fresh POST to
/execution/afm/execute
each time your app runs and verify that the following GET goes to
/execute/result/<new-resultId>
However, I will need to discuss this case with our team and we will get back to you with more details as soon as possible.
πŸ‘ 1
d
Hi Mitchell, I wouldn't suspect a cache - if a cache was involved it would apply to all calls to
afm/execute
wherever they come from (GD cloud or your React app). Can you help me run a test, please? Can you call the same metric from GoodData cloud app and from your React app and send me the exact times when the calls were made? I would like to have a look in the system logs to see what was happening in the calls' processing and whether there was some difference. Ideally, it would be great if you could do this outside the usual business hours. Your organization tends to be quite busy between 1300 and 2300 UTC - your activity will be easier for me to trace outside this time, if it's convenient for you. Also, please, mention the time-zone of the times you provide. Finally, please confirm you did get different results in the two calls before sending them to me. Thanks.
m
Hi Daniel, thanks for the response and I’ll get that to you this evening when things slow down
πŸ‘ 1
Hi Daniel, sorry for the delay. Here is the info you asked for:
Copy code
GoodData cloud: Mon, 01 Sep 2025 17:49:02 GMT
<https://prophia.cloud.gooddata.com/api/v1/actions/workspaces/platform-workspace-b/execution/afm/execute/result/deb3fcbd1868aa826a4d81c23511b63beb1c1c51%3Ad4a3db460062a42ed7a7bbaa31e09bc0226ef661156715aad6c85ecc2d3a29f0?offset=0%2C0&limit=100%2C1000>


{"data":[[10,16,1332176,879480,685130,647046]],"dimensionHeaders":[{"headerGroups":[]},{"headerGroups":[{"headers":[{"measureHeader":{"measureIndex":0}},{"measureHeader":{"measureIndex":1}},{"measureHeader":{"measureIndex":2}},{"measureHeader":{"measureIndex":3}},{"measureHeader":{"measureIndex":4}},{"measureHeader":{"measureIndex":5}}]}]}],"grandTotals":[],"paging":{"count":[1,6],"offset":[0,0],"total":[1,6]},"metadata":{"dataSourceMessages":[]}}

React SDK: Mon, 01 Sep 2025 17:50:51 GMT
<https://prophia.cloud.gooddata.com/api/v1/actions/workspaces/platform-workspace-b/execution/afm/execute/result/f9cede5dd1b3a27f203bcd1ef0e65210c333f649%3Af3b90967746541b4ad5e41571ba7424ac02c0333e703998102256dcb9fb890db>

{"data":[[7],[12],[917144],[761220],[685130],[232014]],"dimensionHeaders":[{"headerGroups":[{"headers":[{"measureHeader":{"measureIndex":0}},{"measureHeader":{"measureIndex":1}},{"measureHeader":{"measureIndex":2}},{"measureHeader":{"measureIndex":3}},{"measureHeader":{"measureIndex":4}},{"measureHeader":{"measureIndex":5}}]}]},{"headerGroups":[]}],"grandTotals":[],"paging":{"count":[6,1],"offset":[0,0],"total":[6,1]},"metadata":{"dataSourceMessages":[]}}
Please let me know if there is anything else I can provide that will help and thanks again for looking into this!
d
Thanks for that, Mitchell. Exactly what I was after! πŸ‘ Let me examine the logs tomorrow and come back with findings.
βœ… 1
Hi Mitchell, Thanks for running the test and sending the IDs. That was really useful. 1. Having looked at the two queries, they are NOT the same: β€’ One filters by
account_id
the other by
account_name
. These may actually filter the same object - I can't tell. (I don't see your data.) β€’ One also filters by
lease_status
. Five values are listed. Are these all values? Can the status be null (empty) for some objects? β€’ Measures: one query counts the attribute
buildingid
while the other one counts
building.prophiabuildingid
. These may (or may not) produce different numbers. I can't see your data, so I can't say which of these are relevant. But looking at the query results you've provided, I would suspect that the filter on
lease_status
filters out some of the results
. This is why:
current_active_tenant_count
differs (12 vs 16) and so does the count of
buildingid
(7 vs 10). On the other hand,
occupiedsquarefeet_sum
is the same for both queries. So my best guess is that the filter on
lease_status
filters out some properties which are not occupied. Can you please verify if this (or some of the other differences) may lead to different results? 2. If the above didn't solve the issue, can you please clarify why you suspect the system is giving you old data? Specifically, why you suspect old as opposed to just incorrect? 3. Looking at my text above, if we want to continue the investigation, we should move to DMs to avoid accidentally leaking some of your internal know-how.
m
Hi Daniel, Thank you for looking into this in depth. My apologies, I did not realize that there was a lease_status filter being applied; it was kind of obscure in our code. You are absolutely correct that that is indeed the difference -- there are buildings without any leases at all which, of course, are getting removed. Thanks again for digging into this.
πŸ‘ 1
d
Hi Mitchell, No problem at all simple smile I'm glad we got to the bottom of it together! Good luck with your React app πŸ’ͺ