Forum Discussion
Multiple API URL
- 4 years ago
Hi KimRexh
Another method is that you can create an empty table with only column names which are the same as columns from that API. Then append this empty table with the table queried from API. When API doesn't return any data, the table after appending is still an empty table with column names. It will not return error "could not find column..." because it has that column although there is no data there.
let Source = APItable, emptyTable = #table({"Name","ID","Date"},{}), #"Appended Query" = Table.Combine({Source, emptyTable}) in #"Appended Query"Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi KimRexh
Another method is that you can create an empty table with only column names which are the same as columns from that API. Then append this empty table with the table queried from API. When API doesn't return any data, the table after appending is still an empty table with column names. It will not return error "could not find column..." because it has that column although there is no data there.
let
Source = APItable,
emptyTable = #table({"Name","ID","Date"},{}),
#"Appended Query" = Table.Combine({Source, emptyTable})
in
#"Appended Query"
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.