Is there a way to create a Tableau session via Python which will open a workbook and refresh extracts, then publish workbook to the server?

时间:2015-10-30 21:22:51

标签: performance python-2.7 extract tableau tableau-server

I am looking everywhere for this and not having much luck. I am using Python 2.7 and Tableau 9.0. If you(reader) know of any other viable options, I'm open to anything, but more proficient with Python. Can anyone please give me direction as to where this can be found? Or if it is even possible?

Thank you, Phil

1 个答案:

答案 0 :(得分:0)

您好,您可以使用tabcmd来实现此功能。 以下是命令列表:http://onlinehelp.tableau.com/current/server/en-us/tabcmd_cmd.htm

1)画面登录

tabcmd login -s https://<YourServerName> -u <YourUsername> -p <YourPassword> 

2)刷新

tabcmd refreshextracts --url "<workbook_name>"

3)获取本地副本:

 Tabcmd get https://<YourServerName>/workbooks/workbook_name?format=twb&errfmt=html" -f "<new_name.twbx>"

4)发布

tabcmd publish "<localpath>" -n "<new_name>"

它对我有用。如果它对你有帮助,请告诉我。