ironpythonspotfire

How to Reload Individual Data Operations in TIBCO Spotfire Using IronPython Scripting


I am trying to reload an individual Data Operations in Spotfire Using IronPython Scripting but I can't. I found a solution on TIBCO community but i t doesn't work. it's this one:

from Spotfire.Dxp.Data import *
from Spotfire.Dxp.Data.DataOperations import *
from System import *

# Get the first data source from the Source View
op = table.GenerateSourceView().GetAllOperations[DataSourceOperation]()[0]

# Reload data source
op.Reload()

# Set current time as latest reload
Document.Properties["lastReload"] = DateTime.Now

Here the link https://community.tibco.com/s/article/How-to-Reload-Individual-Data-Operations-in-TIBCO-Spotfire-Using-IronPython-Scripting

Someone has any idea of what's wrong ?

Error message:

Error message


Solution

  • The error says that table needs to be defined. It needs to be added as an input parameter, of type Data Table to the Iron Python script, pointing to the data table you want to refer to.