2 Replies Latest reply on Apr 11, 2017 5:56 PM by Kruttik Aggarwal

    Detect Tableau version in WDC

    Rich Harvey



      I am looking to create a new WDC against a proprietary web application to allow users to consume the app data within Tableau.  I have previously written a WDC against Tableau 9.3 but that is using the old 1.1 WDC SDK.  I have started writing for Tableau 10.2 and that is using the latest WDC SDK, and I was wondering, rather than maintaining two WDC's would it be possible to put a detection in the code to see what version of Tableau is being used and then load the relevant SDK and logic?  That way I can have one WDC that fits multiple versions.


      Is that possible?





        • 1. Re: Detect Tableau version in WDC

          Hi Rich Harvey,


          I do not personally have a ton of experience with the Tableau Desktop WDC but our Tableau Community page has an excellent forum section specifically for the WDC: Web Data Connector 


          Maybe (I'm sure of it) the community could better help you on this one.





          Lénaïc RIÉDINGER, Global Community Engineer Tableau

          Tableau Community Forums | Knowledge Base

          If you see a Helpful or Correct response, please mark it thanks to the buttons below the targeted post!


          • 2. Re: Detect Tableau version in WDC
            Kruttik Aggarwal

            I have struggled with the exact same question recently. I don't think there is any straight forward way of doing this because-

            1. "tableau.platformVersion" was added in sdk 2.1 and later. So for 2.0, there is no way to find the version. One workaround is to do something like "tableau.platformVersion === undefined ? '10.0' : tableau.platformVersion".
            2. "tableau.platformVersion" is only accessible if you have 'tableau' object which itself needs to be loaded first. So you have a chicken and egg problem.
            3. Tableau WDC window will throw an error if the SDK is higher version that that of the tableau desktop.


            Having said that, you can probably do the following which is a really really dirty hack-

            1. load '2.1' sdk first, check tableau.platformVersion
            2. if tableau.platformVersion is undefined, then load 2.0 sdk
            3. otherwise, unload '2.1' sdk and then load appropriate tableau sdk