I do not have a ton of experience triggering refreshes using the Tableau SDK. But the functionality that you are attempting to create with the Python code should be a built in feature of Tableau.
Tableau Server can perform incremental refreshes based on a field in the data.
More information can be found here: Quick Start: Incremental Extract Updates
Hope this helps!
Cheers, Byrne, Patrick
thank you for your answer!
I'll probabily did not explain myself the best way
We can do incremental refresh of the Tableau Datasource from within Tableau Server web interface.
But since we developed and end-to-end batch process that download data from a website and populate a datamart, we would be able to also trigger an incremental refresh using API.
Using Tableau Server Client API, we can use Refresh method (from Datasource endpoint).
But this method does not provide a parameter to tell the server which type of refresh we want to trigger (incremental vs. full).
So, my question can be reformulated as: do Tableau Server Client API (Python) give an option to trigger a specific type of extract refresh?
If yes, how do you do that?
If no, does the Refresh method (from Datasource endpoint) decides which type of refresh to trigger based on the datasource definition (if the datasource was configured for incremental refresh --> then always trigger an incremental refresh).
Yes, when the data source is published the refresh schedule is set, given the refresh schedule is set to be incremental, there is the ability to force a full refresh as well if that is desired.
I hope this helps!