QBoard » Advanced Visualizations » Viz - Tableau » Tableau and R Server for Python

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

     
      November 12, 2021 2:18 PM IST
    0
  • 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.

      November 18, 2021 11:56 AM IST
    0
  • As of Tableau-10.1, there is a new package/library introduced which is TabPy which will act similar to Rserver for 'R' integration with Tableau.

    Worth checking this article : https://www.tableau.com/about/blog/2017/1/building-advanced-analytics-applications-tabpy-64916

      November 19, 2021 12:12 PM IST
    0