2 of 2 people found this helpful
I think that what you are after is to be able to query Tableau Server as to whether an extract is incremental or full, and then get TABCMD to run that extract based on this information.
The REST API gives you the ability to query information about a Refresh Task to find out whether as Task is incremental or Full.
You can then run the tabcmd refreshextract command based on this information
Hope this helps
Thanks to the respondents. I think Glen was offering the closest to a technically correct answer, although I opted not to go that route since it would have required a fair amount of drilling into API calls to get things working.
What I eventually did was to alter the batch file that executes the TABCMD command that performs the extract refresh, adding the --incremental switch. I pipe the result to a text file which I can then inspect. If the text file contains error code 80030, then I know the error is related to the --incremental switch being invalid for a Full extract. So I re-issue the TABCMD without the --incremental switch, and perform a Full refresh.
Not the most elegant solution I suppose, but it seems to work fine. No background task is submitted to Tableau for any extract activity unless the TABCMD switches are valid, so the net impact of the two calls is that the datasource needs to be checked by Tableau for its Full/Incremental type.
"e:\Tableau Server\10.0\bin\tabcmd" refreshextracts --no-certcheck --project Myproject --datasource MyFullDataSource --incremental 2> result.txt
:: Use your tool of choice to examine result.txt
findstr "80030" result.txt >nul 2>&1
if %ERRORLEVEL% == 0 (
"e:\Tableau Server\10.0\bin\tabcmd" refreshextracts --no-certcheck --project Myproject --datasource MyFullDataSource 2> result.txt