I am using the SDK to export and schedule reports ...
# gd-beginners
a
I am using the SDK to export and schedule reports the export part works fine however the export via the sdk does not apply the filters within the dashboard to visuals and is returning the values as if the filters were all set to all, i dont know if this has something to do filter configuration etc but when i export manual it works perfectly value wise. What are some work arounds? was thinking maybe a meta data issue but i am not sure. When the filters are hardcoded in the visualization on the dashboard the export vis sdk works for them but not the ones that are using a global dashboard filters. Edit: Its not the context filters
j
Hi Anthony, before we proceed further I would like to ask few more questions. So you are testing the Python dashboard export from the below documentation? https://www.gooddata.com/docs/python-sdk/latest/execution/exports/ Also I understand, that normally exporting Dashboard via UI saves the global filter values but while exporting via above feature they default to “all” can you pls confirm if I understand this correctly? Could you please confirm the SDK version you are currently using?
a
Yes that correct, it is exporting as expected however the visualizations are not listening to the filters on the dashboards. For example I have a filter for lets say Spend and then on the dashboard i have a filter that contains all the areas i can filter for, lets say i 10 areas when i select one and then try to export the dashboard via the SDK it is returning the value for the total of all 10 areas, i hope that makes sense. The configurations for visualisations are on to listen to the dashboard filters.
I believe it in relation to metadata potentially but there is no clear instructions on how to format within
j
Hi Anthony, thanks for the details provided. I will notify our technical team about this and somebody will reach otu to you once available.
a
Thank you
r
Heya Anthony, Radek from the Technical team here, just letting you know I'm checking into this and will update you shortly 🙂
Hi again Anthony, so for the filters, these need to be specified manually on the SDK export call, since the export gets the Dashboard from the API and not necessarily the state in the UI itself. This is possible to do in multiple ways, depending on your desired format. • for a tabular export, there's a "filters" array • for PDF, this needs to be using the metadata parameter in the same way as if it were via the API call