Hi there. New to this community and Good Data. I'm...
# gd-beginners
d
Hi there. New to this community and Good Data. I'm trying to build an Export to CSV feature in our platform using this guide: https://www.gooddata.com/docs/cloud/api-and-sdk/api/tabular_export/#ExportDataInTabularFormat-CreateaTabularExport, but when doing the request on the Download a Tabular Export section, I'm getting a 500 error. Which channel is the best place to ask such questions? And also, who can I send the traceID I get from the response to root out the problem? Thanks!
Error 500 response:
Copy code
{
  "detail": "Server-side problem. Contact support.",
  "status": 500,
  "title": "Internal Server Error",
  "traceId": "a73e39ba9eff96a1680b5933d1d2e68d"
}
m
Hi Dean, thank you for the details. You are in the correct channel, you can also use #C04S1MSLEAW for product specific questions. I have looked into the error and unfortunately I have not been able to spot the exact root cause; I did find that it is in fact originating on your side, but currently the log wrongly shows the server side error, we have filed an internal ticket to fix this. In order to take a deeper look here, please provide details of the API call and let us know whether you can export the same tabular insight from the UI. If you are still having the same issue in the UI, feel free to DM me a link to the insight.
d
Ah. I might be passing a wrong executionResult object on the first request. Is there a way for me to fetch that once the Insight has been rendered in the page already inside an iFrame?
I was able to make this work by using visualizationObject parameter instead of the executionResult. I was wondering though, what's the desired interval between the requests for export request and export retrieval? At the moment, I'm doing it in sequence but on the first try, I'm getting an empty file with a 202 status response. I'm assuming the file was still being generated on your end.
m
I am glad to hear this is now working. If you are exporting a visualization, you will always need to use visualizationObject. The executionResult is for the data pulled in the background and that is ready to be exported when accessing data through the API.
Regarding the desired interval between the requests is not possible as some visualizations may take longer than others to compute, meaning that you always get uri where you can download exported insight or visualization, but the insight may be ready or not. If it is ready you get http status 200 and the insight is downloaded, if it is not, you get http status 202 and you get the uri where you can downloaded again (also explained here). It is standard way how asynchronous resources works. If you are doing this via a script, you may run into issues if it does not count that the insight may not be ready yet. With this said, you have 2 options how to resolve it. 1. Implement polling to the uri where you can download the insight (the recommended approach). 2. Add some delay between you calling the API and downloading insight.