Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
Hello everyone
I have some data that i get from a API call, name, id, domain... and i need take that id and call to another API. Im following that video https://www.thebiccountant.com/2018/03/22/web-scraping-2-scrape-multiple-pages-power-bi-power-query/
thats how my query looks
let
content = "{
""method"": ""post"",
""body"": {}
}",
Origen = Json.Document(Web.Contents("https://website/data/730214/runs/3246632/", [Headers=[#"content-type"="application/json", Authorization="Bearer ZnIzY3UzM2w1YXQ2ZDM0Mm9nMWxkYWRta2dtYTI0aWNtaDdmMmZvYTNiZ3E0MzVjbGhiZ3ZrczBuMCYzNzI5NCYxNjYwMjA1MDM5Nzc0"], Content=Text.ToBinary(content)],
[Query = "website/data/" & main_id &"/runs/" & lastrun_id ])),
#"Convertido en tabla" = Record.ToTable(Origen)
in
#"Convertido en tabla"
When i try to do that i get the next error
Expression.Error: Se han pasado 3 argumentos a una función que espera entre 1 y 2.
Detalles:
Pattern=
Arguments=[List]
How can i solve it?
Thanks u
Hi @yebenesPW ,
you need to include the Query as another record field in the first record. So removing some brackets should do the job here:
let
content = "{
""method"": ""post"",
""body"": {}
}",
Origen = Json.Document(Web.Contents("https://website/data/730214/runs/3246632/", [Headers=[#"content-type"="application/json", Authorization="Bearer ZnIzY3UzM2w1YXQ2ZDM0Mm9nMWxkYWRta2dtYTI0aWNtaDdmMmZvYTNiZ3E0MzVjbGhiZ3ZrczBuMCYzNzI5NCYxNjYwMjA1MDM5Nzc0"], Content=Text.ToBinary(content), Query = "website/data/" & main_id &"/runs/" & lastrun_id ])),
#"Convertido en tabla" = Record.ToTable(Origen)
in
#"Convertido en tabla"
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 7 | |
| 4 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 12 | |
| 11 | |
| 11 | |
| 7 | |
| 6 |