Skip to main content
Showing results for 
Search instead for 
Did you mean: 

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now


Power BI Dataflow Import API – How to deal with special characters?

I have worked on an interesting dataflow API issue recently. Customer was automating the dataflows movement from one workspace to another using Dataflows Import API.

  1. The script used by customer: SCRIPT
  2. The explanation of usage provided HERE
  3. The dataflow import API: Microsoft API

You must be thinking, with all the necessary information what can go wrong here. In this case, JSON files were imported to the destination workspace successfully as expected. However, some of the dataflow refreshes started failing.

After checking the dataflow in edit mode, the user identified that, post import, if the column name has "€" (euro character) in the column name, it gets converted to “?”. Ex: Column Name – “Sales €” becomes “Sales ?”

The exported model.json file also contained ? instead of € as well.

After analyzing the Invoke method, we identified the append for content-type.

One with the issue: Invoke-RestMethod -Uri $url -ContentType 'multipart/form-data' -Method POST -Headers $headers -Body $body;

We made the below change:
Invoke-RestMethod -Uri $url -ContentType 'multipart/form-data;charset=utf-8' -Method POST -Headers $headers -Body $body;

After making this change, we observed that the dataflows were imported as expected and the refreshes were successful.

Please remember to add this part if you are dealing with special characters within dataflows.


Author: Sheetal Shetty

Reviewer: Mounika Narayana Reddy