Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I've been struggling with this API for a few days, where it needs to be executed in two steps:
When I run it in the Desktop, I have no problems getting the results. However, when I try to turn it into a Data Flow, I start receiving the following error:
(
It's not possible to save the data flow.
One or more tables reference a dynamic data source)
.
When building it step by step, for the 1st step, the Service allows me to save. But when I execute the second step, that's where my problem lies. Below, I'll insert the codes.
Step 1
let
urltk = url_,
cabecalhotk = [
#"Accept"= "application/x-www-form-urlencoded",
#"Content-Type"="application/x-www-form-urlencoded"
],
corpotk = [
grant_type = "password",
client_id = client_id_,
client_secret = client_secret_,
username = username_,
password = password_
],
corpoString = Uri.BuildQueryString(corpotk),
corpoBinario = Text.ToBinary(corpoString),
tokenResponse = Json.Document(
Web.Contents(
urltk,
[Headers = cabecalhotk, Content = corpoBinario]
)
),
Token1 = tokenResponse[access_token]
in
Token1
Step 2
let
url = url_api,
tokentexto = Json.FromValue(Token),
tokenconverte = Json.Document(tokentexto),
cabecalho = [
Accept = "application/json",
Authorization = "Bearer " & Token
],
FilterCriteriaAPI = [
page = "1",
pub_date_after = "2023-07-24",
pub_date_before = "2023-07-24"
],
queryStringAPI = Uri.BuildQueryString(FilterCriteriaAPI),
urlCompletaAPI = url & "?" & queryStringAPI,
responseAPI = Json.Document(Web.Contents(urlCompletaAPI, [Headers = cabecalho])),
resultado = responseAPI[results],
tabela = Table.FromRecords(resultado)
in
tabela
I don't know what else to do, I tried to apply the RelativePath, but for some reason, it cannot be accepted in Header's parameter.
Thanks
User | Count |
---|---|
47 | |
32 | |
30 | |
27 | |
25 |
User | Count |
---|---|
56 | |
55 | |
36 | |
33 | |
28 |