适用于Python的Tableau和R Server

时间:2014-08-12 09:54:50

标签: python r tableau tableau-server

我最近发现你可以在Tableau中使用R来返回bool,int,long等。这可以通过以下方式发生:

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

然后在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

但是我想用Python做同样的事情,所以Python可以用作Tableau中的脚本(不是在Python中使用Tableau的api) - 任何人都知道这是否可行?上面的代码段取自here

2 个答案:

答案 0 :(得分:1)

对于Tableau 8.2中的R以外的语言,没有Script()调用。

您可以尝试使用R作为中间人通过rPython或RSPython包调用Python函数。不知道它会有多高效,但如果你有一个在R中没有的重要Python库,那么可能值得麻烦。

答案 1 :(得分:1)

从Tableau-10.1开始,引入了一个新的包/库,它是TabPy,它的行为类似于Rserver,用于' R'与Tableau集成。

值得查看这篇文章:https://www.tableau.com/about/blog/2017/1/building-advanced-analytics-applications-tabpy-64916