Forum Discussion
Formula.firewall
I'm getting this error: "Formula.Firewall: ...(not important).. references other queries or steps, so it may not directly access a data source"
I've read about others having the same issue but I can't wrap my head around how to solve the issue in my case. My query looks like this with only one step:
let
Source = Table.AddColumn(Query1, "Custom", each Json.Document(Web.Contents("https://path-to-api/", [RelativePath=Text.Combine({Number.ToText([pages.id]), "/tickets"}), Headers=[Authorization=Bearer tokenid"]])))
in
Source
My guess is that the error occurs because i reference the api endpoint and "pages.id" in the same query? But I can't figure out how to do instead since I'm using "each" and looping through the table. Any ideas?
- Anonymous4 years ago
I'm referencing another query that's also doing an API call, when I moved that call into this query as well the issue was solved.
3 Replies
- amitchandakSuper User
Anonymous , Are trying pagination?
refer old solution, if they can help
https://community.powerbi.com/t5/Power-Query/Formula-Firewall-error/m-p/919550
https://community.powerbi.com/t5/Power-Query/Formula-Firewall-Error/m-p/1061155
https://community.powerbi.com/t5/Developer/Formula-Firewall-bug/m-p/1576612
refer
https://medium.com/@marktiedemann/how-to-do-pagination-in-power-query-430460c17c78
- AnonymousNot applicable
Thanks for the answer, I tried to use a function instead as suggested in the first article so my function looks like this:
(ticketId) => let Source = Web.Contents("https://path-to-api/", [RelativePath=Text.Combine({NumberToText(ticketId, "/tickets"}), Headers=[Authorization="Bearer-token"]]) in SourceAnd then the original query changed to this
let Source = Table.AddColumn(Query2, "Custom", each JsonDocument(GetConnectedTicket([pages.id]))) in Sourcebut I'm still getting the same error, any idea why?
- AnonymousNot applicable
I'm referencing another query that's also doing an API call, when I moved that call into this query as well the issue was solved.