Refreshing Tableau Data Sources via Command Line
A popular way to refresh tdsx from a Tableau Server is running the following command line via a batch file or similar:
“<PathToTableauDesktop>\tableau" refreshextract -s TableauServerURL -u TableauServerUser -p "TableauServerPassword" --project ProjectName -t SiteName --datasource "tdsx Name" --source-username SourceUserWhenRequired --source-password "SourcePasswordWhenRequired"
E.g.: “C:\Program Files\Tableau\Tableau 2023.1\bin\tableau" refreshextract -s https://dataselfbi.com -u xxx -p "xxxx" --project myproject -t mycorp --datasource "_Sales_Invoice"
The computer where this command line runs must have:
Tableau Desktop installed.
Access to the Tableau Server and credentials with rights to download and publish data sources.
Access to the source data used by the Tableau data sources (usually a DataSelf MS SQL data warehouse) and credentials with reading rights.
See more options and information about the Tableau command line syntax here: https://help.tableau.com/current/pro/desktop/en-us/extracting_TDE.htm