3 Replies Latest reply on Jan 16, 2019 11:46 AM by Jeff Strauss

    API vs Database

    Kary K

      Hello Experts,

       

      I have never tried pulling data using API. I always connected Tableau to database.

       

      Now that I have a requirement where i can connect either to database or an API, I wanted to know what are the pros and cons of connecting Tableau to API vs Connecting tableau to database.

       

      Are there any concerns when connected to API, about the performance or calculations or anything else?

       

      I would like to know connecting to which one is better API or database?

       

      Thanks in Advance,

      Kary!

        • 1. Re: API vs Database
          Jeff Strauss

          Hi Kary.  Generally speaking, connecting to the API is best practice as it's conceptually best practice to shield us practitioners from underlying database changes that Tableau may choose to implement as part of newer releases of the software.  This being said, we are migrating toward using the API more and more, though not all options are available via the API, so in some cases we are forced to continue to query the db directly.  So my vote is API all the way, and it keeps getting feature improvements with each new release. 

          1 of 1 people found this helpful
          • 2. Re: API vs Database
            Kary K

            Thanks so much for your response Jeff!

             

            I would like to know the challenges when connected to API, something like you mentioned, about not all options being available via the API.

             

            Can you give me few examples of what options are not available via API? I tried to search for these challenges. I couldn't find anything online.

             

            Please let me know if there are any available documents or urls for the above.

             

            Thank You,

            kary.

            • 3. Re: API vs Database
              Jeff Strauss

              The core functionality is there within the API, but there are some edge cases.

               

              One example that comes to the top for an internal custom portal we created was to expose a list of custom saved views that users have previously bookmarked.  It's not available within the API's to do this, so we had to query the database.

               

              Another example of one that is available now within the API, but we haven't converted to it yet is the ability to query user favorites.  It wasn't there when we wrote our custom portal, but now it is and we haven't gotten around to converting to it yet.  Reference-Tableau Server REST API - Tableau