InterWorks 在其 Workbook SDK 中使用了哪些 Tableau API? [英] What Tableau API does InterWorks uses in their Workbook SDK?

查看:21
本文介绍了InterWorks 在其 Workbook SDK 中使用了哪些 Tableau API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

InterWorks 将 Workbook SDK 作为其 Power Tools for Tableau 产品的一部分.有谁知道他们是如何做到这一点的?SDK 可以在没有 Tableau Server 的情况下访问工作簿,所以我认为它不是 JavaScript 或 REST API.

InterWorks has a Workbook SDK as part of its Power Tools for Tableau product. Does anyone know how they are able to do this? The SDK can access a workbook without Tableau Server so I don't think it's the JavaScript or REST API.

推荐答案

Tableau 工作簿 (.twb) 文件采用 XML 格式.版本之间的结构可能会有所不同,但遵循起来相对简单.大多数 Tableau 文件格式也是 XML.以 x 结尾的格式(如 .twbx)是包含 XML 文件和其他文件的压缩目录.

A Tableau workbook (.twb) file is in XML format. The structure may change between versions, but is relatively straight forward to follow. Most Tableau file formats are also XML. The formats ending in an x (like .twbx) are zipped directories that contain the XML file along with other files.

这意味着从这些 XML 文件中读取信息甚至修改它们都不是太难.我在极少数情况下手工编辑了它们.通常有比破解 XML 内部结构更好的选择,但您可以.只需先备份您的文件,如果它导致您的工作簿出现奇怪的行为,不要指望 Tableau 支持会帮助您.

This means it is not too tough to read information from these XML files, or even modify them. I've edited them by hand in rare cases. Usually there is a better choice than hacking the XML internals, but you can. Just backup your file first, and don't expect Tableau support to help you if it leads to strange behavior on your workbook.

除了 Interworks SDK(它是 COTS 产品)之外,Chris Gerrard 还发布了一个免费的 Ruby 库,用于访问 Tableau 工作簿https://rubygems.org/gems/twb(或 gem install twb)并在 github 上发布源代码 https://github.com/ChrisGerrard/TWB,以及他编写的一些(但不是全部)使用 twb 类的脚本 https://github.com/ChrisGerrard/TableauToolsRuby.

In addition to the Interworks SDK (which is a COTS product), Chris Gerrard published a free Ruby library for accessing Tableau workbooks https://rubygems.org/gems/twb (or gem install twb) and released the source on github https://github.com/ChrisGerrard/TWB, along with a few (but not all of) the scripts he's written that use the twb classes https://github.com/ChrisGerrard/TableauToolsRuby.

Chris 在他的博客 Tableau Friction 上提供了一些有用的示例和脚本,包括以下内容关于自动记录计算字段之间关系的聪明文章http://tableaufriction.blogspot.com/2015/02/more-calculated-field-analysis-fields.html

Chris gives some useful examples and scripts on his blog Tableau Friction, including this clever article on automatically documenting the relationships among calculated fields http://tableaufriction.blogspot.com/2015/02/more-calculated-field-analysis-fields.html

使用 twb,您可以轻松编写简单的 Ruby 脚本来查看工作簿结构.由于 Tableau 可以在发布新版本软件时更改格式,因此使用 SDK 或 twb Ruby gem 可以将您的脚本与格式更改隔离开来.

Using twb, you can write simple Ruby scripts easily to look at workbook structure. Since Tableau can change the format when they release new versions of the software, using the SDK or twb Ruby gem could isolate your scripts from changes to the format.

Tableau 还发布了一个文档 API,该 API 支持对工作簿进行少量常见更改 - 因此您可以编写脚本来更新一组工作簿上的连接字符串.

Tableau has also released a Document API that supports a modest number common changes to workbooks - so you can write a script to say, update the connection string on a set of workbooks.

所以你至少有四个选择:

So you have at least four choices:

  1. 使用随附支持、文档和价格标签的 Interworks SDK 和工具.
  2. 使用免费的开源 twb 库,并重用现有的 Ruby 脚本或开发您需要的脚本.如果您扩展,希望能贡献源代码.
  3. 滚动您自己的 XML 解析脚本.
  4. 如果 Tableau Document API 支持您的用例,请使用它.https://github.com/tableau/document-api-python

在所有情况下,当 Tableau 发布主要或次要版本更新时,请进行备份并做好一些调整的准备.补丁发布非常安全.

In all cases, do backups and be prepared for some adjustments when Tableau releases a major or minor version update. Patch releases are pretty safe.

这篇关于InterWorks 在其 Workbook SDK 中使用了哪些 Tableau API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆