1 Reply Latest reply on Apr 2, 2013 10:13 AM by Justin Rockwood

    Tableau.v8 JS API Data from View

    P Kos

      Hello,

       

      I've been using the Tableau JS API and been meaning to get data from a view.

      Looking through the API Documentation, I don't see a way to directly get the data.

      As it is now I load a Viz (with width and height 0px), select marks and get the data from those marks.

       

      So I've two questions:

      1. Is there a way I can get the data without loading a View in iframe? Like some kind of JSON request

      2. If question above is not possible can I load a View (Viz) without all the css and images?

       

      I've looked into the Tableau Data Extract API but it doesn't seem a viable solution.

       

      Thanks in advance.

        • 1. Re: Tableau.v8 JS API Data from View
          Justin Rockwood

          Great questions. Let me see if I can clarify a little bit for you.

           

          1) No, there is currently not a way to get the data other than through the Tableau Viz JavaScript API object. Furthermore, the only way to get the data is to select all of the marks via selectMarksAsync() and then getting the data via getSelectedMarksAsync(). I hear your pain, though, and getting data from the viz is probably the biggest customer request for the JavaScript API.

           

          2) I think if I understand you correctly, you are wanting to basically create a non-visible Viz so that you can use it to just extract data from your view. In that case, the best advice is to create a <div> element that is positioned off-screen or maybe stacked below something else in the z-order. The Viz has to be visible, though, so you can't just use "display: none".

           

          Thanks for using the JavaScript API and Tableau!