Hi Team, every time I try to export the insights u...
# gooddata-cn
p
Hi Team, every time I try to export the insights using Tiger backend, it gives the following error:
Error: Tiger backend does not support exports
Is there a way to export the insights as CSV and XLSX in Gooddata-CN using Tiger backend? cc: @Peter Plochan
m
I am sorry, it is not yet available feature.
j
You can try to utilize our (open sourced) python-sdk - https://github.com/gooddata/gooddata-python-sdk specifically I would utilize gooddata-pandas library. It is possible to "execute stored insight" and get Pandas data frame. Then it is very easy to transform it into CSV or XLSX.
👍 1
p
Thanks @Jan Soubusta. Is there a similar Node.js library available?
j
Not sure what capabilities are provided by our UI.SDK. @Dan Homola?
d
You could take a similar approach in the UI SDK, but it will not be very ergonomic. For a rough example:
Copy code
import { DataViewFacade } from "@gooddata/sdk-ui";
import { idRef } from "@gooddata/sdk-model";

// get the insight and create an execution for it
// the backend object is an instance of IAnalyticalBackend
const insight = await backend.workspace(WORKSPACE_ID).insights().getInsight(idRef(INSIGHT_ID));
const execution = backend.workspace(WORKSPACE_ID).execution().forInsight(insight);

// run the execution and read all the data
const result = await execution.execute();
const allData = await result.readAll();

// wrap it into a DataViewFacade and read the individual series
const dataViewFacade = DataViewFacade.for(allData);
const series = dataViewFacade.data().series().toArray();

// and do some conversion to CSV from the series data
this will get you an object with all the values you need, but you will need to implement the conversion to CSV/XLSX yourself.
p
Thanks @Dan Homola.
👍 1
j
Because I am a Python fan, let me propagate it here 😉
Copy code
from gooddata_pandas import GoodPandas

gdpd = GoodPandas(host=HOST, token=TOKEN)
gdf = gdpd.data_frames(WORKSPACE_ID)

# Execute insight, get data frame
df = gdf.for_insight(insight_id=INSIGHT_ID)

# Write result as CSV/XLSX
with open(INSIGHT_ID + '.csv', 'w') as fd:
    df.to_csv(fd, index=False)
with open(INSIGHT_ID + '.xlsx', 'w') as fd:
    df.to_excel(fd, index=False)
🙌 2
p
Hi Team, cc: @Martin Burian @Dan Homola @Jan Soubusta Is there any plan to implement this feature in Gooddata-CN? @Alex Kearns @Balamurali Ananthan @rohit mathur @Jitender Singh Regards, Prashant
j
@Martin Svadlenka @Ondrej Macek guys, please, share here the roadmap for exports. If I understand it well, you, @Prashant Sharma requests for tabular (CSV, XLSX) exports, not PDF/SVG/PNG exports, right?
👍 1
m
Hi all, we will start with manual PDF download in Q3 and then we will do the XLS and CSV in Q4
👍 1
p
Hi @Martin Svadlenka, are we on track for tabular (CSV, XLSX) exports in Q4? Also, is there a release notes page where we can track the same?
m
Hi, yes we are. This is not part of release notes as we do not share release notes for future releases.
👍 1
z
Hi @Martin Svadlenka, I would like to reiterate on this question. Do you know exact release dates when the export functionality (PDF/CSV) will be available in the GD.CN?
Hi @Martin Svadlenka @Ondrej Macek, could you please give us some update on the (PDF/CSV) export topic above? Thanks!
m
Hi Zoltan, let me loop in @Andrey Skripnikov, he know the best of current progress.
z
Thanks
a
Hi @Zoltan Mazula, We are finalizing the CSV Export feature, aiming to release it October. The API will come out on October 6th, the UI part (buttons to run the download from Analytical Designer and KPI Dashboards) should follow on October 20th. With the PDF export, I am hoping to release it before the end of the year in December.
z
Hi Andrey
thank you for the answer!