Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External Call Dynamic Response Body #125303

Open
bryangateley opened this issue Dec 21, 2024 · 1 comment
Open

External Call Dynamic Response Body #125303

bryangateley opened this issue Dec 21, 2024 · 1 comment

Comments

@bryangateley
Copy link

bryangateley commented Dec 21, 2024

There is not any documentation surrounding dynamic content within the response body of external call.

External call transformation in mapping data flows

I would imagine a common use case is using a dataflow to pass dynamic variables associated with different endpoints for an API service (ie orders, payments, customers, etc...) to take advantage of schema drift. However the documentation for External Call only shows a single "hard coded" example (See below) of how to create the body structure for the response body but this would only work when your response is identical every single time. The example does show a hint of dynamic content being viable via the use of '{@context}' syntax but gives no mention of what the @ syntax is referring to, which you would assume would be a column however when trying to reproduce this result myself by using a column with the @syntax it just reads the value as a string ie @columnName => (Header Value) '@columnName'. When attempting to add dynamic content myself the activity throws a syntax error, despite the dynamic example below working in other activities like derived column

Example Use Case of Dynamic Content within Response Body:
"( {$pathName} as ( {trim(reduce(map(cachedTypes#outputs(), #item.shop + " as " + #item.datatype), "", #acc + toString(#item) + ",", #result))} )[])"

MS Documentation External Call Response Body Structure
({@context} as string[], geometry as (coordinates as string[][][], type as string), properties as (elevation as (unitCode as string, value as string), forecastGenerator as string, generatedAt as string, periods as (detailedForecast as string, endTime as string, icon as string, isDaytime as string, name as string, number as string, shortForecast as string, startTime as string, temperature as string, temperatureTrend as string, temperatureUnit as string, windDirection as string, windSpeed as string)[], units as string, updateTime as string, updated as string, validTimes as string), type as string)

Not of great importance, but it would be nice if in cases like the example MS provided above, they would show the actual JSON object which this body structure is derived from.

title: External call data transformation in mapping data flows
author: kromerm
ms.author: makromer
ms.subservice: data-flows
@PesalaPavan
Copy link
Contributor

@bryangateley
Thanks for your feedback! We will investigate and update as appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants