What is Python_Data_Function?

Have you seen this line of code before? What is Python_Data_Function?

from Python_data_function import *

It appears after clicking the Register New button in the data functions dialog. You won’t see it if you have selected the TERR or R engine. It only appears when the script type is Python Script Executor. Now, you might be wondering what “Python_Data_Function” is and whether it’s necessary.

What Is It?

Python_Data_Function is a custom extension. TIBCO’s Professional Services Group developed it to employ the Python language in data functions. Customers and partners may use it for free under the TIBCO Component Exchange License.

Like other custom extensions, it must be deployed on the Spotfire Server. If you have admin rights, the extension will be visible in the deployment area as shown here.

How Important Is It?

Hint, it’s really important. It enables Python data functions. They will fail without it. You can read up on the finer details on the extension in this TIBCO Community article.

Spotfire Version

Content created with Spotfire 10.2.

If You Are Just Getting Started…

Check out the other articles I’ve written on how to set up your machine to run Python data functions. I’ve also explanations on how to install Python packages to really take advantage of this great functionality.

2 thoughts on “What is Python_Data_Function?”

  1. Thank you Julie. This is very helpful. Have you run into an error message when calling the Python data function that says the type ‘System.Single’ of the property does not match the expected ‘System.Double’ type when using a real variable? I am inputting and outputting to a document property. The code works for an integer value.

Leave a Reply

Your email address will not be published. Required fields are marked *