redrubia redrubia - 3 years ago 251
Python Question

Tableau and R Server for Python

I have recently discovered you can use R within Tableau, to return bool, int, long etc. This happens by the following:

install.packages("Rserve")
library(Rserve)
Rserve()
// Should say "Starting RServe..."


Then in Tableau:

// For Tableau under 'Help' > 'Settings and Performance' > 'Manage R Connections'
// Server: 127.0.0.1 and Port:6311
// Make sure that 'RStudio' with 'RServer' is installed and running prior to Tableau connection


However I would like to do the same thing with Python, so Python can be used as a script in Tableau (not using Tableau's api in Python) - anyone know if this is possible? The snippet above was taken from here

Answer Source

There isn't a Script() call for languages other than R as of Tableau 8.2.

You could try using R as a middleman to invoke Python functions via the rPython or RSPython packages. No idea how performant it would be, but might be worth the hassle if you have a significant Python library that isn't available in R.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download