Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<div class="row">
<hr class="footer-hr">
<p>This site is open source. Suggestions and pull requests are welcome on our <a href="https://github.com/tableau/extensions-api">GitHub page</a>.</p>
<p>(c) Copyright 2018 Tableau</p>
<p><a href="https://www.tableau.com/en-us/legal" class="aLegal">Legal</a> <a href="https://www.tableau.com/en-us/privacy" class="aLegal">Privacy</a> &copy;Copyright 2003&ndash;<script>document.write(new Date().getFullYear())</script> Tableau</p>
<sub>Documentation last generated on: {{ site.time }}</sub>
</div>
</footer>
5 changes: 5 additions & 0 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,8 @@ html {
.size-1of3 { width: 33.333%; }


/* Legal and Privacy Links */
.aLegal {
word-spacing: 8px;
padding-right: 8px;
}
51 changes: 28 additions & 23 deletions docs/trex_data_access.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ layout: docs

<!--Keep this intro short -->

The Extensions API provides several methods that can access the underlying data in a dashboard. The underlying data can include information about the data sources, such as the names of the connection, fields, and tables. Collectively, this information is sometimes called *full data*. Because of the potentially sensitive nature of this data, dashboard authors and people who use extensions need to know if the extension can access their data, and based upon this knowledge they might want to restrict this access.
The Extensions API provides several methods that can access the underlying data in a dashboard. The underlying data can include information about the data sources, such as the names of the connection, fields, and tables. Collectively, this information is sometimes called *full data*. Because of the potentially sensitive nature of this data, dashboard authors and people who use extensions need to know if the extension can access their data, and based upon this knowledge they might want to restrict this access.

To help ensure transparency and to give the users of extensions control, if your extension uses any of these methods that can access full data, you need to configure your extension to require **full-data** permission. The following section describes how you need to set up the permissions for your extension to run.
To help ensure transparency and to give the users of extensions control, if your extension uses any of these methods that can access full data, you need to configure your extension to require **full-data** permission. The following section describes how you need to set up the permissions for your extension to run.

---
---



Expand All @@ -19,11 +19,17 @@ To help ensure transparency and to give the users of extensions control, if your
{:toc}


---
---

Starting in Tableau 2020.2, Tableau introduced a data model that supports flexible table relationships. To support this new model, the Extensions API version 1.4 provides new APIs that support the data model.
Because the data model changes the way the underlying data can be stored, some of the existing APIs will no longer work.
For more information about the data model in Tableau, see [The Tableau Data Model](https://help.tableau.com/current/pro/desktop/en-us/datasource_datamodel.htm){:target="_blank"}{:ref="noopener"}.



## What happens when extensions access full data

As a developer, you can choose the features and capabilities to implement using the Extensions API. One of these is the ability of the extension to access the underlying data in the dashboard or workbook. The `Worksheet` and `Datasource` interfaces have methods called `getUnderlyingDataAsync()` that return (as a promise) data tables containing the underlying data of the workbook or data source. The `Datasource` interface has two additional methods, `getActiveTablesAsync()` and `getConnectionSummariesAsync()` that return the names of the active tables and fields in the data source, and the summary descriptions of the data source connections.
As a developer, you can choose the features and capabilities to implement using the Extensions API. One of these is the ability of the extension to access the underlying data in the dashboard or workbook. The `Worksheet` and `Datasource` interfaces have methods that return (as a promise) data tables containing the underlying data of the workbook or data source. The `Datasource` interface has additional methods, `getLogicalTablesAsync()`, `getActiveTablesAsync()` (Deprecated), and `getConnectionSummariesAsync()` that return the names of the active tables and fields in the data source, and the summary descriptions of the data source connections.

There are many cases where you need access to this underlying data so that your extension can perform a useful function. The only requirement for access is that the users of your extension are aware of it.
If the extension uses any of the four methods, they are considered privileged, in that they require access to underlying data and data source information. To use any one of them, you need to add a declaration to your extension's manifest file (`.trex`) that states the extension requires **full-data** permission. Tableau uses this declaration to provide a prompt to users at run time that gives them the option of allowing this access or not.
Expand All @@ -33,15 +39,18 @@ If the extension uses any of the four methods, they are considered privileged, i

#### Extensions API methods that access full data

If your extension uses any one of the following methods, without declaring **full-data** permission in the manifest file, the extension will load but the method call will fail. If you have debugging enabled, Tableau will report an error in the JavaScript console and the error is also written to the Tableau log file.

`Worksheet.getUnderlyingDataAsync()`

`Datasource.getUnderlyingDataAsync()`
If your extension uses any one of the following methods, without declaring **full-data** permission in the manifest file, the extension will load but the method call will fail. If you have debugging enabled, Tableau will report an error in the JavaScript console and the error is also written to the Tableau log file.

`Datasource.getActiveTablesAsync()`

`Datasource.getConnectionSummariesAsync()`
| Method | Current Status |
|------------------------------------------|-------------------------------------|
|`Worksheet.getUnderlyingTablesAsync()` | |
|`Worksheet.getUnderlyingTableDataAsync()` | |
|`Worksheet.getUnderlyingDataAsync()` | Deprecated starting with the v1.4 library |
|`Datasource.getLogicalTables()` | |
|`Datasource.getLogicalTableData()` | |
|`Datasource.getUnderlyingDataAsync()` | Deprecated starting with the v1.4 library |
|`Datasource.getActiveTablesAsync()` | Deprecated starting with the v1.4 library |
|`Datasource.getConnectionSummariesAsync()`| |


If you use any of these APIs, you need to add a `<permissions>` element to the manifest file (`.trex`) and specify **full-data** permission. The declaration will allow the extension to pass validation. Depending upon the situation, for example, the first time a user adds the extension, Tableau will prompt the user to allow or deny the extension to run.
Expand Down Expand Up @@ -88,9 +97,7 @@ When users add an extension that requires full-data access, Tableau displays a p

The name of the extension and its URL come from the values you add to the manifest file for the extension. These are the values you add for `<name>` and the `<url>` element under `<source-location>`.


---

---

## What happens when users open a workbook that uses an extension

Expand All @@ -99,20 +106,18 @@ When users open a dashboard that has an extension that requires full-data access

![]({{site.baseurl}}/assets/Load_Extensions_Dialog.png){:height="50%" width="50%"}

The **Allow an Extension** dialog box provides users information about your extension. This information includes links to the your website, as specified by the `website` attribute in manifest file (in the `<author>` element). Users can click on the link under **Created By** to find out more about your extension.
The dialog box also indicates whether or not the extension requires full-data access and provides the URL of the extension.
The **Allow an Extension** dialog box provides users information about your extension. This information includes links to your website, as specified by the `website` attribute in manifest file (in the `<author>` element). Users can click on the link under **Created By** to find out more about your extension.
The dialog box also indicates whether or not the extension requires full-data access and provides the URL of the extension.


If a user clicks **Cancel**, the workbook is opened, but the extension is not loaded. In the layout container where the extension would normally appear, the following message appears:

```
Extension was denied the required permission to run.
Permissions approval can be reset through the contect menu.
Extension was denied the required permission to run.
Permissions approval can be reset through the context menu.

```

Users can use choose to allow the extension to run by using the clicking **Reset Permissions** from the **More Options** drop-down menu of the layout container. This opens up the **Allow Extensions** dialog box where the user can change permissions for the extension.

![]({{site.baseurl}}/assets/reset_perms.png){:height="50%" width="50%"}



2 changes: 1 addition & 1 deletion docs/trex_debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Tableau Desktop version | Chromium version | Chrome version
* [Chromium for macOS (`chrome-mac.zip`) (79.0.3945.0)](https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Mac/706915/)


<div class="alert alert-info"><b>Note </b> If you are using Tableau 2019.1 or later, you can debug extensions in Tableau Desktop using the certain versions of Chrome (versions prior to 80). Currently, you can't use Chrome version 80 (or later) for debugging your extension.</div>
<div class="alert alert-info"><b>Note </b> If you are using Tableau 2019.1 or later, you can debug extensions in Tableau Desktop using certain versions of Chrome (versions prior to 80). Currently, you can't use Chrome version 80 (or later) for debugging your extension.</div>


---
Expand Down
Loading