Skip to Main Content
Spotfire Ideas Portal
Status Future Consideration
Product Spotfire
Categories API
Created by Guest
Created on Dec 2, 2021

API to set table dependencies

SF10.10.x reloads/refreshes the data tables based on the table creation order. So the first created data table is the first one to be refreshed while the last created table is the last one to be refreshed. This sequential operation allowed us to created custom data sources that depends on other data tables without the need to update Spotfire graph of dependency (no need to tell SF that our table depends on another table) since the order of refresh is based on the order of creation.

SF11.4 parallel loading relies on the graph of dependencies between the data tables to decide the order of reloading/refreshing the data tables. Two data tables that are not dependent, are loaded in parallel! this breaks our custom data sources! SF11.4 does not know about the dependency between our table and the data table it depends on (to read marked rows). When such a template is opened in SF11.4, it tries to refresh both tables in parallel ==> our data table fails with the error listed below. This simply breaks most of our templates!

>> The data should already be loaded for producer with key be110c5a-ee61-439d-9c0d-7295b58a9890.

The solution is to request an API from SF11.4, that lets us tell Spotfire that our custom data source table depends on another table ... this should update the graph of dependency and thus solve our issue with parallel loading for newly created templates.

For existing templates (where dependency graph is not set correctly), we suggest having a way (may be via document property) to identify if the template can use parallel loading or not. Existing templates will have this set as 'no' while new templates we set this to 'yes'.

SF checks if the document property value is 'yes' then they enable parallel loading, otherwise it does sequential loading. This becomes a document-level flag that over-rides the application level flag to enable/disable parallel loading

The above should allow a smooth transition from SF10.10 to SF11.4.


  • Attach files
  • Admin
    Magnus Rylander
    Reply
    |
    Dec 3, 2021

    It is possible to enable / disable the parallel data loading, either at application level or per document.

    The following API can be used to enable / disable parallel data loading for a specific document:

    Document.Compatibility.UseLegacySerialDataLoading

    The same thing can be done in the UI: File > Document Properties > General > Compatibility Settings


    At application level, you can enable / disable parallel data loading using Tools > Options > Document > "Allow data to be loaded in parallel when opening documents"