0

below is the image of the dynamic body in Web activity wherein I am leveraging a pipeline parameter

enter image description here 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: enter image description here

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?

8
  • Why do you need {} around $Query? Is it not passing those to your API? Commented Oct 23, 2022 at 17:04
  • Are you able to successfully pass the body without any parameters? i.e., give body as {"queries":[{"query":"EVALUATE VALUES(Date)"}],"serializerSettings":{"includeNulls":true}}? Commented Oct 28, 2022 at 9:46
  • @SaideepArikontham, yes it is working without parameterizing. Commented Oct 28, 2022 at 10:10
  • Can you try to concat instead? like '{"queries":[{"query":"'+$query+'"}],"serializerSettings":{"includeNulls":true}} in the dataflow expression builder? Commented Oct 28, 2022 at 10:18
  • Hey @SaideepArikontham, I tried using concat and it worked. It means that string interpolation doesnt work in dataflows. but now there is another issue : learn.microsoft.com/en-us/answers/questions/1068265/… Commented Oct 30, 2022 at 15:37

1 Answer 1

1

To use dataflow parameter within the expression builder, we have to concatenate the parameter with our data. Look at the following demonstration.

  • I am using derived column to show how to use parameters within expression builder. Using the dynamic content same as yours, I get the following output:
'{"queries":[{"query":"{$query}"}],"serializerSettings":{"includeNulls":true}}'

enter image description here

  • String interpolation does not work in the dataflow expression builder. To get it correctly, you can concatenate the parameter using + to get desired result.
'{"queries":[{"query":"'+$query+'"}],"serializerSettings":{"includeNulls":true}}'

enter image description here

  • Using the following content in expression builder also works (using concat() function).
concat('{"queries":[{"query":"',$query,'"}],"serializerSettings":{"includeNulls":true}}')
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.