Automatically re-append data to fully refreshed extract

Version 1
    QuestionAfter appending data to an extract, a FULL refresh of the extract will remove all appended data, how to fully refresh an appended extract without losing the appended data?

    Environment

    • Tableau Server
    • Tableau Desktop
    Answer

    The Tableau Data Extract Command-Line Utility can be used to refresh an extract and then re-append data from a flat file. The data sources need to be published to Tableau Server and the commands are scheduled from the computer hosting Tableau Desktop.

     

     

    1. From Tableau Desktop, connect to the data base via an Extract Connection. Publish the extracted data source to Tableau Server. Please make note of the published data source's name, Site, and Project.
    2. On the computer hosting Tableau Server, save the flat file (csv or txt file) and make note of the file path, such as "C:\Users\user1\Documents\DataUploadFiles\AprMay.csv".
    3. On the computer hosting Tableau Desktop, Schedule a Windows Task to refresh the published extract.
      • For more information, see How to Schedule a Windows Task
      • Sample command for refreshing an extract:
        • C:\Program Files\Tableau\Tableau 9.0\bin>tableau refreshextract --server https://our_server_name --username OurServerSignIn --password OurServerPwd --project "New Animations" --datasource "CurrentYrOverYrStats" --source-username OurDatabaseSignIn --source-password OurDatabasePassword
    4. On the computer hosting Tableau Desktop, schedule a Windows Task to append data to the published extract.
      • For more information, see How to Schedule a Windows Task.  
      • Sample command for appending data to a published extract:
        • C:\Program Files\Tableau\Tableau 9.2\bin>tableau addfiletoextract --server https://our_server_name --username OurServerSignIn --password OurServerPwd --project “New Animations” --datasource "CurrentYrOverYrStats" --file "C:\Users\user1\Documents\DataUploadFiles\AprMay.csv"
    5. From Tableau Desktop, connect to the published data source and then create the workbook view. The published extract will be refreshed and re-appended based on the Windows Task schedule.

     

    Additional Information

    Full refresh pushes a full synchronization with the data source. Any data that has been removed from the data source will be removed from the extract.

     

     

    The append data from data source/file does not mark the appended data as special, therefore, the appended data will be viewed as "removed from data source" and removed as well.

     

    Please read: feel free to update this article as needed.