Parameterize Parameter in API Body in dataflow

Nandan Hegde 36,716 Reputation points MVP Volunteer Moderator
2022-10-17T09:46:24.173+00:00

Hello All,
Good day!

@AnnuKumari-MSFT @Nasreen Akter @MarkKromer-MSFT @MartinJaffer-MSFT

below is the image of the dynamic body in Web activity wherein I am leveraging a pipeline parameter
251048-image.png
and the parameter value is
250994-image.png

With the above set of configuration and values, the web activity is successfully getting executed.

Now for the same REST API, I am trying to use it as source in dataflow :

with the same aspect of configuration and it is failing with below error :

Dataflow param:
251009-image.png

Dataflow body config:
250995-image.png

Error:
ailure to read most recent page request: DF-REST_001 - Error response from server: Some({"error":{"code":"DatasetExecuteQueriesError","pbi.error":{"code":"DatasetExecuteQueriesError","parameters":{},"details":[{"code":"DetailsMessage","detail":{"type":1,"value":"The JSON DDL request failed with the following error: Invalid JavaScript property identifier character: }. Path '', line 1, position 7.."}},{"code":"AnalysisServicesErrorCode","detail":{"type":1,"value":"3239182519"}}]}}}), Status code: 400. Please check your request url and body.

Can someone please help what I am doing Wrong?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
0 comments No comments
{count} votes

Answer accepted by question author
  1. KranthiPakala-MSFT 46,737 Reputation points Microsoft Employee Moderator
    2022-10-18T01:48:35.223+00:00

    Hello @Nandan Hegde ,

    Thanks for the question and using MS Q&A platform.

    In mapping data flow, you will have to concatenate in order to form a request body using dataflow parameters.

    Please try concatenating the request body as below and it should help achieve your requirement:

    '{"queries": [{"query":' + $df_param_requestBody + '}],"serializerSettings": {"includeNulls": true}}'  
    

    251336-image.png

    Please note I have tested the expression in derived column so that I can be able to see what request body is being generated after the expression has been evaluated at runtime. (Nothing but similar to our set variable activity to play around with dynamic expressions ;) ). But it should be same behavior with Request body expression builder as well.

    Hope this helps. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.