Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi all,
I am trying to create a step-by-step operation btw Power BI and Oracle Eloqua.
The operation requires 3 steps:
1- POST request to Eloqua (creates a URL for export)
2- POST request to Eloqua (creates a sync URL based on the export URL in the first step)
3- GET request to Eloqua (calls the data from the URL in the second step.
The first step, I already completed. Below is the code:
let
Query1 = let
strBody = "[{""Text"":""" & Text.Replace(varInputText,"""","'") & """}]",
body = "{
""filter"": ""'{{Activity.Type}}'='EmailOpen'"",
""name"": ""Bulk Activity Export - Email Open"",
""fields"": {
""ActivityId"": ""{{Activity.Id}}"",
""ActivityType"": ""{{Activity.Type}}"",
""ActivityDate"": ""{{Activity.CreatedAt}}"",
""ContactId"": ""{{Activity.Contact.Id}}"",
""IpAddress"": ""{{Activity.Field(IpAddress)}}"",
""VisitorId"": ""{{Activity.Visitor.Id}}"",
""VisitorExternalId"": ""{{Activity.Visitor.ExternalId}}"",
""EmailRecipientId"": ""{{Activity.Field(EmailRecipientId)}}"",
""AssetType"": ""{{Activity.Asset.Type}}"",
""AssetName"": ""{{Activity.Asset.Name}}"",
""AssetId"": ""{{Activity.Asset.Id}}"",
""SubjectLine"": ""{{Activity.Field(SubjectLine)}}"",
""EmailWebLink"": ""{{Activity.Field(EmailWebLink)}}"",
""CampaignId"": ""{{Activity.Campaign.Id}}"",
""ExternalId"": ""{{Activity.ExternalId}}"",
""DeploymentId"": ""{{Activity.Field(EmailDeploymentId)}}"",
""EmailSendType"": ""{{Activity.Field(EmailSendType)}}"",
""EmailAddress"": ""{{Activity.Field(EmailAddress)}}"",
""ContactIdExt"": ""{{Activity.Contact.Field(ContactIDExt)}}""
}
}",
Source = Json.Document(Web.Contents("WebURL", [Headers=[Authorization="Basic", #"Content-type"="application/json"], Content=Text.ToBinary(body)])),
#"Converted to Table" = Record.ToTable(Source)
in
Source,
#"Converted to Table" = Record.ToTable(Query1)
in
#"Converted to Table"
This works just fine and creates the export URL which is someting like "/activities/exports/1111", but I am stuck in the 2nd step.
Here is the code I am trying to use in the second step:
let
strBody = "[{""Text"":""" & Text.Replace(varInputText,"""","'") & """}]",
body = "{
""syncedInstanceUri"": ""& I should include here the URL (dynamic) from the first step &""
}",
Sourcetwo = Web.Contents("Web URL", [Headers=[#"Authorization"="Basic", #"Content-type"="application/json"], Content=Text.ToBinary(body)])
in
SourcetwoWhen I use the hard URL from the first step, the second step also works fine, but I couldn't figure out how to make a dynamic call in the 2nd step.
Can you please support me on this? Executing both steps in a single query would be perfect, but if not seperate queries are also fine as long as they are dynamic.
Best regards,
Ugur Gulluev
hi, @Anonymous
You may refer to this post:
https://community.powerbi.com/t5/Desktop/Dynamic-Nested-API-Calls/td-p/250267
Best Regards,
Lin
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 67 | |
| 63 | |
| 30 | |
| 30 | |
| 23 |