Power BIte: Creating dataflows by importing model.json

This week’s Power BIte is the third in a series of videos[1] that present different ways to create new Power BI dataflows, and the results of each approach.

When creating a dataflow by importing a model.json file previously exported from Power BI, the dataflow will have the following characteristics:

Attribute Value
Data ingress path Ingress via the mashup engine hosted in the Power BI service.
Data location Data stored in the CDM folder defined for the newly created dataflow
Data refresh The dataflow is refreshed based on the schedule and policies defined in the workspace.

Let’s look at the dataflow’s model.json metadata to see some of the details.

2019-11-06-14-50-53-981--Code

At the top of the file we can see the dataflow name on line 2…

…and that’s pretty much all that’s important here. The rest of the model.json file will exactly match what was exported from the Power BI portal, and will look a lot like this or this. Boom.

For a little more detail (and more pictures, in case you don’t want to watch a four minute video) check out this post from last month, when this capability was introduced.

If this information doesn’t make sense yet, please hold on. We still have one more incoming Power BIte in this series, and then we’ll have the big picture view.

I guarantee[3] it will make as much sense as anything on this blog.


[1] New videos every Monday morning![2]

[2] Did you notice that I just copied the previous post and made some small edits to it? That seemed very appropriate given the topic…

[3] Or your money back.

8 thoughts on “Power BIte: Creating dataflows by importing model.json

  1. Steven Bengtson

    Hi Matthew, i have a “stupid question” for you ! When I export the dataflow JSON file and try and view it in notepad ++ as an example (and turn on JSON language mode) – its just not formatting correctly. Even notepad normally shows JSON in a readable format – but the file produced seems to be just one loooonnngg string. What JSON viewer do you use ?

    Like

  2. Jackie

    Hi Matthew, I can successfully export a json dataflow but get a “Can’t publish dataflow” error when I go to import.

    Invalid dataflow parameter value. Exception details: The AllowNativeQueries attribute of the mashup is set to true for this definition. For security reasons, AllowNativeQueries should be set to false on import (can be set to true after import from the Power BI Services). Please set AllowNativeQueries to false and try again.

    Have you seen this error? I can’t find where the set AllowNativeQueries in dataflows.

    Thank you!

    Like

    1. I have not seen this, and the scenario doesn’t make sense to me. You’re exporting the JSON for a dataflow that includes native queries, but you’re getting this error when importing that JSON back into Power BI?

      My educated guess (emphasis on “guess”) is that the “import json” path doesn’t include the necessary validation for native queries, and that for this you would need to go through Power Query Online. With that said, if you want an authoritative response and not a guess, I’d recommend opening a support ticket or asking a question on community.powerbi.com…

      Like

    1. I’m not aware of wrappers for any of the Power BI REST APIs.

      The dataflows API docs are here: https://docs.microsoft.com/en-us/rest/api/power-bi/dataflows

      The API to create a dataflow is the Post Import in Group API, documented with example here: https://docs.microsoft.com/en-us/rest/api/power-bi/imports/postimportingroup

      There are mechanisms on each doc page to provide feedback, and the folks who own the documentation actively monitor that feedback.

      Like

Leave a Reply to Steven Bengtson Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s