I am trying to do a export of data in GD via API c...
# gooddata-cloud
m
I am trying to do a export of data in GD via API calls and AFM. I am running these three API calls, execute with body: { “execution”: { “attributes”: [ { “label”: { “identifier”: { “id”: “day.day”, “type”: “label” } }, “localIdentifier”: “day”, “showAllValues”: false } ], “auxMeasures”: [], “filters”: [], “measures”: [ { “definition”: { “measure”: { “item”: { “identifier”: { “id”: “data_logs.views”, “type”: “fact” } }, “aggregation”: “SUM”, “filters”: [] } }, “localIdentifier”: “views” }, { “definition”: { “measure”: { “item”: { “identifier”: { “id”: “data_logs.clicks”, “type”: “fact” } }, “aggregation”: “SUM”, “filters”: [] } }, “localIdentifier”: “clicks” } ] }, “resultSpec”: { “dimensions”: [ { “itemIdentifiers”: [“day”,“measureGroup”], “localIdentifier”: “export” } ] }, “settings”: {} } then tabular export with body { “format”: “CSV”, “fileName”: “csv_export”, “executionResult”: “EXECUTE_EXECUTION_RESULT” } and in the end csv export with body and everything is working properly, but the problem is when I want to add one more measure. I tried to do export views, clicks and then views, impressions, and both variants works, but for views, clicks, impressions, I am still getting error: {“detail”:“Server-side problem. Contact support.“,”status”500,“title”“Internal Server Error”,“traceId”:“9ac7a61e8c2122f6cbf28f00b54c67b5"}
i
Hi Marketa, Sorry to hear so. May I know how do you add the additional measure, please? Are you able to execute such visualization via API or UI before the export attempt itself?
m
After adding the body looks like this: { “execution”: { “attributes”: [ { “label”: { “identifier”: { “id”: “day.day”, “type”: “label” } }, “localIdentifier”: “day”, “showAllValues”: false } ], “auxMeasures”: [], “filters”: [], “measures”: [ { “definition”: { “measure”: { “item”: { “identifier”: { “id”: “data_logs.views”, “type”: “fact” } }, “aggregation”: “SUM”, “filters”: [] } }, “localIdentifier”: “views” }, { “definition”: { “measure”: { “item”: { “identifier”: { “id”: “data_logs.clicks”, “type”: “fact” } }, “aggregation”: “SUM”, “filters”: [] } }, “localIdentifier”: “clicks” }, { “definition”: { “measure”: { “item”: { “identifier”: { “id”: “data_logs.impressions”, “type”: “fact” } }, “aggregation”: “SUM”, “filters”: [] } }, “localIdentifier”: “impressions” } ] }, “resultSpec”: { “dimensions”: [ { “itemIdentifiers”: [“day”,“measureGroup”], “localIdentifier”: “export” } ] }, “settings”: {} }
It looks like prepare of AFM works correctly, at least if I check the result, it looks like data are there, problem is next step - tabular export - body { “format”: “CSV”, “fileName”: “drmax_test_csv_export”, “executionResult”: “f6d8e06d88aa42ead3ac0bb202e83085f1fd17d0" } where after checking result from there - I got a server side error: {“detail”:“Server-side problem. Contact support.“,”status”500,“title”“Internal Server Error”,“traceId”:“935e334782326fb43fb21431004a535a”}
@Ivana Gasparekova Any hints on how to solve this, or is it possible to export data to csv in some other way?
i
Hi @Markéta Jedličková , thank you for the clarification. I am bit surprised that you are getting a 500 error status here and I am trying to dig into our LOG to find the reason. Were you able to build a visualization with mentioned attributes and measures/metrics also in UI? I just assume that you have built this report manually, but I might be wrong here.
m
I build it manually. My goal is to export data - I am open to export the whole report to csv via api call if possible some easy way, but last time I tryied it wasnt possible to this format by API call, so thats why I choosed AFM and then export.
I didnt got 500 error, just in this case, I got it for example once - the whole chain was working, next time I got repeatetly this error. But I tried to report just documented case.
i
Hey @Markéta Jedličková, The workflow is correct, unfortunately there’s no other option right now, except of the
OnExportReady
option available under the GD SDK. So, is it like intermittent issue, please? Or is it affecting this particular report only? I am asking this because both TraceIds that you’ve shared with us were resulting in status “500”. Could you kindly try to build the same report as a visualization in UI for me? I’d like to know if it works as expected in UI(no errors/limits hit). And if yes, we might really have some internal issue with the tabular export here.
m
@Ivana Gasparekova It is working in UI, I already tried, with same IDs, I will sent you screenshots.
👍 1
Here is UI visualization.
i
Thanks a lot, this is really helpful! Could you also confirm if the issue is intermittent and/or if it affects this particular report only, please?
m
It is persistent issue, and also happens on different report / data source as well. Is there any a number of data limitation?
@Ivana Gasparekova Any news/hints? 🙂
i
Hey @Markéta Jedličková, sorry for the delays in my responses and thanks again for the confirmation, appreciated. Honestly, the only limits that I am aware of are tied to the PDF format. I’ve already reached out to our Product team internally and I’ll let you know in case there are any other limitations in play. In the meanwhile, could you be so kind and save a testing version of your visualization in UI and share the link with me, please? Feel free to use a DM for sharing. 😉
m
Sure, I will send it in DM
🙌 1
i
Thank you very much! I can confirm my previous statement, there are no limits tied specifically to the CSV exports. Our engineers are concerned a bit, this might be an issue on our end. Thank you kindly for sharing all the details with me. I will demonstrate the misbehaviour to them and share our findings with you as soon as possible.
m
Thank you!