Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Execute IronPython script after data table is loaded in Spotfire

I have a use case where i need to render data table(set to on-demand) in text area using python scripting in Spotfire.

The problem at hand is data table is loaded Asynchronously and python script is executed and html turns out to be empty as it takes some 5 sec to load data, i tried using sleep function of 5 secs but that is not appropriate as PROD data load time will vary.

I need to execute the python script in the below manner:

-------Script--------

if table.IsRefreshable and table.NeedsRefresh: table.Refresh()

//#Execute next steps when data is loaded //#Render data table to dynamic html to be displayed in text area


like image 813
Ezio Avatar asked Jul 01 '26 07:07

Ezio


1 Answers

If you are lucky enough to have Spotfire 7.5, they've added a method:

DataTableCollection.RefreshAsync Method (IEnumerable< DataTable> , Action< Exception> )

in which you can write a callback function to execute after the table(s) finish loading. I've never used it because I only have 6.5 and also need some way to do this (and haven't found one)

https://docs.tibco.com/pub/doc_remote/sfire_dev/area/doc/api/tib_sfire-analyst_api/?topic=html/Overload_Spotfire_Dxp_Data_DataTableCollection_RefreshAsync.htm

like image 107
Henry Bigelow Avatar answered Jul 02 '26 19:07

Henry Bigelow