2 Replies Latest reply on Jan 11, 2018 1:46 PM by Scott Steesy

    Tableau SDK Extract API

    Wu Yaping

      Hi All,

           Here is error I am getting while using Tableau SDK Extract API to create tde files with multi-thread. Can anyone please help me on this ?


           tableau sdk.png

           Tableau SDK version:10.0.0




        • 1. Re: Tableau SDK Extract API
          Patrick Van Der Hyde

          Hello Wu


          Are you able to create .tde  files using the sample code - http://onlinehelp.tableau.com/current/api/sdk/en-us/help.htm#SDK/tableau_sdk_samples.htm  or are you unable to get just this instance working?



          • 2. Re: Tableau SDK Extract API
            Scott Steesy

            You don't specify what the multiple threads are doing.

            It is a bad idea to have multiple threads trying to write to the same TDE because I doubt the SDK is thread safe since it doesn't specifically say it is.


            I have successfully used multiple threads, from C, where each thread creates a separate TDE.

            If you don't call the optional methods to initialize the SDK yourself the creation of the extract does so, then when one thread exits it does a cleanup and causes another thread still using the SDK to blow up.

            So as each thread wants to begin, you need to have a lock to increment a counter, and if the value is 1 then use the "optional" method to initialize the SDK..

            Then create your TDE.

            Afterward, use the same lock to decrement the counter, and if the value is 0 then use the optional method to cleanup the SDK..