Forum Discussion
Web.Contents with more than one URL
- 3 years ago
Just follow the same pattern as before, something like this:
let Source1 = Json.Document(Web.Contents("https://www.jsonkeeper.com/12345")), convToTable1 = Table.FromList(Source1, Splitter.SplitByNothing(), null, null, ExtraValues.Error), Source2 = Json.Document(Web.Contents("https://www.thisisafunnyurl.com")), convToTable2 = Table.FromList(Source2, Splitter.SplitByNothing(), null, null, ExtraValues.Error), combineQueries = Table.Combine({convToTable1, convToTable2}) in combineQueriesIf you're feeling particularly brave, you can combine the code into single steps for each source:
let Source1 = Table.FromList( Json.Document(Web.Contents("https://www.jsonkeeper.com/12345")), Splitter.SplitByNothing(), null, null, ExtraValues.Error ), Source2 = Table.FromList( Json.Document(Web.Contents("https://www.thisisafunnyurl.com")), Splitter.SplitByNothing(), null, null, ExtraValues.Error ), combineQueries = Table.Combine({Source1, Source2}) in combineQueriesPete
Hi Steph,
Two options:
-1- Duplicate your original source line in Advanced Editor. Rename the original Source step to Source1, and the new one to Source2. Amend the URL in Source2 to point to the new endpoint. You now have both sources loading into the same query that can be individually referenced, such as Table.Combine({Source1, Source2}) if you want to append them, and so on.
-2- Duplicate your original query and adjust the URL in the second one to the new endpoint. Same usage as above, but now you will just reference query names instead of step names, such as Table.Combine({oldQuery, newQuery}).
Pete