1 Reply Latest reply on Feb 8, 2017 12:20 PM by Brendan Lee

    WDC: Multiple Inputs single output

    Matt Armstrong

      Hello,

       

      Brand new to Tableau and just getting started building WDC's to bring data into Tableau.  Thanks in advance for helping a rookie get started!

       

      Wondering if a WDC will support calls to different API's with different schemas to build a single table in Tableau.

       

      Use Case: Two API's (x, y) with different fields (x1, x2, x3, y1, y2, y3) with the desired output being a table (t) with columns, (t1, t2, t3) where x1 and y1 both writing to t1.

       

      Entryt1t2t3
      1.x1.x11.x21.x3
      2.x2.x12.x22.x3
      1.y1.y11.y21.y3
      2.y2.y12.y22.y3

       

      Cheers!

      Matt

        • 1. Re: WDC: Multiple Inputs single output
          Brendan Lee

          Hey Matt,

           

          This is absolutely doable through the WDC.  At a high level, a WDC is just a web page, so you have a ton of flexibility in how you get data.  If you are using version 2 of the WDC API, data fetching will take place in the getData() method.  In that method, for your scenario what you will want to do is:

           

          • Fetch data from the second API.
          • Fetch data from the second API.
          • Combine the results in your desired format and pass them back to tableau through the table.appendRows() call.  You can pass data as an array of arrays, representing your desired table format. 


          Let me know if that helps. 

           

          Thanks!
          Brendan

          1 of 1 people found this helpful