Forum Discussion

MR2001's avatar
MR2001
Helper II
10 years ago
Solved

Combine data from two different sources in the same query?

 

Is it possible to merge data from two different data sources within the same query, something like:

Source1 = Json.Document(Web.Contents("https://rsq-tm.com/cqweb/oslc/repo/MYschema/db/CCP/query/40853228?&rcm.contentType=application/json&rcm.startIndex=1&oslc_cm.pageSize=5000")),
 
Source2= Json.Document(Web.Contents("https://rsq-tm.com/cqweb/oslc/repo/MYschema/db/CCP/query/38703771?&rcm.contentType=application/json&rcm.startIndex=1&oslc_cm.pageSize=5000")),

 

#"Converted to Table" = Record.ToTable(??? - Source1 union Source2 - ???)
Value = #"Converted to Table"{2}[Value]
etc......
 
thank you

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Sure, use a Merge or Append query, the M function is Table.Join.

    • ImkeF's avatar
      ImkeF
      Community Champion

      Table.Join is equivalent to SQL-JOINS (with all options as well!).

      What you need here is Table.Combine({Source1, Source2}) (or Append if you do it via the UI). This is the equivalent to the SQL-UNION.