Closed bbassett-tibco closed 4 months ago
Data functions now have information about their inputs exposed to the data function in their global namespace as __spotfire_inputs__
(which is typed as collections.abc.Sequence[spotfire.data_function.AnalyticInput]
). Outputs are also exposed in the global namespace as __spotfire_outputs__
(typed as a Sequence of AnalyticOutput objects),
Unless you can guarantee that data functions using this functionality are limited to versions of Spotfire with this version of the spotfire
package, I recommend using a try
/except NameError
block to handle running on earlier versions where the dunder-names are not available.
Please expose information about the inputs (names and table/column/value) of a data function to the script at runtime. It is not reliable to pick through the globals passed to the data function's script at runtime (since all of Python's globals are mixed in).
Note: This is a request to me via internal chat from a non-engineering Spotfire staffer.