Jump to content

Custom Python Datafunction not working


Gustavo Vargas 2

Recommended Posts

Hi,

I'm testing the Custom Datafunction to Execute Python Code (https://community.spotfire.com/modules/Custom-Data-Function-for-TIBCO-Spotf...), on Spotfire X, as @hitesh.ganger comments it should work just fine with this version (https://community.spotfire.com/wiki/python-data-function-tibco-spotfire), but I'm having two issues:

1) I am trying to run both demos shared as part of the download package, and I can see that the script executes without throwing any errors (or at least Spotfire behaves as if it is executing), but I don't see any actual results from the script. I have even removed the Output Table and requested the script to create a new table without success.

2) When removing the mentioned Output table from the "GroupBy.dxp" demo, the script gets automatically removed as well, which I don't think it should be the normal behavior.

Any ideas on what may be happening or how to troubleshoot the root cause is greatly appreciated.

Regards,

Link to comment
Share on other sites

  • 1 month later...

Hi Gustavo,

We're facing the same problem as you do. Weird thing is that our python data function is only executed when we open the data function again, and click on Edit Parameters. Once we do that, our output is finally added to our data table.

We use a script that should kick off the data function, but that doesn't work yet.

I'll have a look at the demo dashboards and see if we can leverage of that. I'll keep you posted whenever I have something usefull.

Kind regards,

David Boot-Olazabal

Link to comment
Share on other sites

I think the reason for (1) is that (at least in the first 'group_by' example) the output has already been run once and therefore running it with the same input parameters does not change anything.

The reason for (2) is that (and this is the same for TERR data functions) if you remove the output of a data function, the script goes with it. This is expected, although I am not sure why, and has always been this way. So removing the output table is always bad news.

I have modified the first example so it is more responsive, see attached. Basically I added a date filter to the page and use it to send different input data, so when you press the button you see a different output.

Gaia

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...