
Announcements
Hi,
I am using Power Query in Excel (Mac) and I want to pull in some CSV data from a web API and from one of these columns I want to then run another web API call to return CSV data that I can then bring in.
My first query looks something like this:
let
Source = Csv.Document(Web.Contents("https://someapi/..."), [Delimiter = ",", Columns = 30, Encoding = 65001, CsvStyle = CsvStyle.QuoteAlways, QuoteStyle = QuoteStyle.Csv]),
#"Promoted headers" = Table.PromoteHeaders(Source, [PromoteAllScalars = true])
in
#"Promoted headers"
In the last column, there is some text in each row like 'ACME1', I then want to call another query with ACME1 as its parameter on the URL like so:
let
Source = Csv.Document(Web.Contents("https://secondapi.mydomain/API/param=ACME1"), [Delimiter = ",", Columns = 90, Encoding = 65001, CsvStyle = CsvStyle.QuoteAlways, QuoteStyle = QuoteStyle.Csv]),
#"Promoted headers" = Table.PromoteHeaders(Source, [PromoteAllScalars = true])
in
#"Promoted headers"
I then want to 'Expand' the table brought in so they appear as extra columns for each row from the first table.
Basically I think I want an equivalent to a SQL LEFT JOIN like:
SELECT *
FROM messages m
LEFT JOIN (SELECT *
FROM attachments a
WHERE a.messageID = m.messageID)
Any help is greatly appreciated.