Refresh Datasource
Refresh a datasource in the open workbook.
dataruns the toolbar Refresh Data Source action on the live data.extractrefreshes the extract. OmitisFullRefreshto use an incremental refresh when one is configured, and a full refresh otherwise.
A credential prompt keeps the refresh running until it is answered in Tableau Studio. A connection failure ends FAILED. A declined prompt ends CANCELLED.
APIs called
This tool asks the running Tableau Studio instance, through the local Tableau Studio External Client API, to refresh one datasource in the open workbook. There are no OAuth scopes.
refreshTypedatarefreshes the live data.refreshTypeextractrefreshes the extract, incrementally or in full.
Required arguments
datasourceId
Datasource id from get-datasources (already percent-encoded), not its name.
Example
{ "datasourceId": "Sales%20Extract" }
refreshType
What to refresh. One of data or extract.
Example
"extract"
Optional arguments
session
Session ID. Optional when a session is pinned or only one Tableau Studio instance is connected.
Example
"studio-1"
isFullRefresh
Extract only. Omit it to refresh incrementally when an incremental refresh is configured, and in full otherwise. Refused when refreshType is data.
Example
true
isFullRefresh applies only to refreshType extract. The tool refuses with isFullRefresh applies only to refreshType extract. Omit it for a data refresh.
Notes and caveats
datarefreshes live data. It does not rebuild an extract. UserefreshTypeextractfor that.- A datasource with nothing to refresh, and a datasource with no extract when
refreshTypeisextract, still completes. - When Tableau Studio accepts the request before the refresh has settled, the result says the refresh was requested and is still being applied.
Related
get-datasources— lists datasource ids.isExtractsays whether a datasource has an extract.