6 Replies Latest reply: May 21, 2015 10:51 AM by Sunny Talwar RSS

    Merging data from multiple API connections & Adding new column

    Jes Lee

      I am trying to merge data from two API connections.   The code looks like this - 

       

      LOAD

          Date#("date",'YYYY-MM-DD') AS DATE,

          value as "REAL GDP WISCONSIN"

      FROM [lib://Real Total Gross Domestic Product by State for Wisconsin]

      (XmlSimple, table is [observations/observation]);

       

      LOAD

          Date#("date",'YYYY-MM-DD') AS DATE,

          value as "REAL GDP WYOMING"

      FROM [lib://Real Total Gross Domestic Product by State for Wyoming]

      (XmlSimple, table is [observations/observation]);

       

      LOAD

          Date#("date",'YYYY-MM-DD') AS DATE,

          value as "REAL GDP WEST VIRGINIA"

      FROM [lib://Real Total Gross Domestic Product by State for West Virginia]

      (XmlSimple, table is [observations/observation]);

       

      As it stands, these are three separate time series data names Real GDP Wisconsin, Real GDP Wyoming, and Real GDP Virginia. 

       

      I would like to merge them into a single dataset with a different name.

       

       

      Once I do this, I would like to add a new column for the State name (to add a location dimension for mapping). 

       

       

      Thank you,

      Jessica