Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hey guys!
Could someone help me?
I'm trying to extract data from a platform through API to bring me, for example, the products table. I built the code below, however, it only brings me the specific product according to the "pesquisa" parameter.
How could I build this dynamically?
Another doubt is that there is a limit of requests, is there any solution?
let
Source =
Json.Document(
Web.Contents(
"https://api.com.br",
[
RelativePath = "api/custumers.php",
Query =
[
token = "tokentokentokentokentokentokentokentokentokentokentoken",
formato = "json",
pesquisa = "EWD-ME3"
]
]
)
),
retorno = Source[retorno],
produtos = retorno[produtos],
produtos1 = produtos{0},
produto = produtos1[produto],
#"Converted to Table" = Record.ToTable(produto),
#"Transposed Table" = Table.Transpose(#"Converted to Table"),
#"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table", [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"id", Int64.Type}, {"nome", type text}, {"codigo", type text}, {"preco", Int64.Type}, {"preco_promocional", Int64.Type}, {"unidade", type text}, {"gtin", Int64.Type}, {"tipoVariacao", type text}, {"localizacao", type text}, {"preco_custo", Int64.Type}, {"preco_custo_medio", Int64.Type}, {"situacao", type text}})
in
#"Changed Type"
Thanks
Hi @kafreitass ,
Not very clear. You may take a look at this post.
https://stackoverflow.com/questions/16194034/sending-json-and-using-a-dynamic-data-parameter .
Best Regards,
Jay
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
116 | |
101 | |
71 | |
61 |