Extensions v1.10.0
In this release
- Updates to the input specification for
createVizImageAsync
. This release includes support for combination charts, charts with multiple mark types in the same visualization (requires Tableau 2022.4+). - Adds support for a
DataTableReader
to support pagination (requires Tableau 2022.4+). - Deprecated
Worksheet.getSummaryDataAsync
. UseWorksheet.getSummaryDataReaderAsync
. UI.displayDialogAsync
now supports different dialog styles (window, modal or modeless dialog boxes).- Adds support for annotating marks with
Worksheet.annotateMarkAsync
,Worksheet.getAnnotationsAsync
, andWorksheet.removeAnnotationAsync
. - Map file is now included for better debugging experience with minified library.
- See other details in https://tableau.github.io/extensions-api/docs/trex_release-notes.html.
DataTableReader Introduction
There has always been a 10k row limit on getUnderlyingTableDataAsync
and on
getLogicalTableDataAsync
, and for large worksheets, getSummaryDataAsync
can prove to be
unreliable.
Introducting DataTableReader
! Starting with Tableau 2022.4 and Extensions v1.10.0,
DataTableReader
provides an API to request data a page at a time.
Fetching a DataTableReader
To get a DataTableReader
use one of the new functions: getSummaryDataReaderAsync
,
getUnderlyingTableDataReaderAsync
, or getLogicalTableDataReaderAsync
. The parameters to these
functions include the GetSummaryDataOptions
or GetUnderlyingDataOptions
, but also include a page
row count. This parameter sets the size of pages that will be returned. The default, and maximum,
page size is 10,000 rows.
Using a DataTableReader
Converting your code to use a DataTableReader
is straightforward.
The following:
const dataTable = await this.worksheet.getSummaryDataAsync();
// ... use dataTable ...
becomes:
const dataTableReader = await this.worksheet.getSummaryDataReaderAsync();
const dataTable = await dataTableReader.getAllPagesAsync();
await dataTableReader.releaseAsync();
// ... use dataTable ...
Or alternatively:
const dataTableReader = await this.worksheet.getSummaryDataReaderAsync();
for (let currentPage = 0; currentPage < dataTableReader.pageCount; currentPage++) {
const currentPageDataTable = await dataTableReader.getPageAsync(currentPage);
// ... process currentPageDataTable ...
}
await dataTableReader.releaseAsync();
Limits on a DataTableReader
Unfortunately, we still live a a world with limited computing resources. A DataTableReader consumes
server resources. Therefore, there are still limits on the number of rows supported for underlying
and logical data table readers. The default limit is approximately 1 million rows of data for
getUnderlyingTableDataReaderAsync
, and approximately 32 million cells (rows * columns) for
getLogicalTableDataReaderAsync
. Server administrators (starting in 2023.1) may change these limits to better match
computing resources with the Tableau Server (Cloud) or Tableau Desktop options:
- ExtensionsAndEmbeddingReaderRowLimit for
getUnderlyingTableDataReaderAsync
or - ExtensionsAndEmbeddingReaderCellLimit for
getLogicalTableDataReaderAsync
.
Hints on using a DataTableReader
- If you are dealing with large amounts of data, set the columns to include, or the
IncludeDataValuesOption
to what you need. Fetching all columns, or requesting formatted data
when you don't need various column or formatted data take significantly more time and resources.
The optionIncludeDataValuesOption.OnlyNativeValues
is your friend for very large underlying or logical
table data. - Only one
DataTableReader
per logical table id is supported. - Call
DataTableReader.releaseAsync()
when you are done processing the data. You can always
request another one if you need to do more processing after some period of inactivity or user
action.