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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
chriklev
Regular Visitor

Normalising nested json data

Hello!

I have som nested json example data like this:

[
  {
    "Father": "F1",
    "Age": 50,
    "Mother": "M1",
    "MAge": 49,
    "Children": [
      {
        "Name": "C1"
      },
      {
        "Name": "C2"
      }
    ]
  },
  {
    "Father": "F2",
    "Age": 55,
    "Mother": "M2",
    "MAge": 53,
    "Children": [
      {
        "Name": "Cc1"
      },
      {
        "Name": "Cc2"
      }
    ]
  }
]

 
I want to normalise the data in a Dataflow Gen2 so i can put it in one or more tables. This is my Power query:

let
  Source = Lakehouse.Contents(null){[workspaceId = "f1800595-f6c8-4c3d-ac95-11412027b5db"]}[Data]{[lakehouseId = "b14fd83c-651e-4c46-8a29-927271b4d567"]}[Data],
  Navigation = Source{[Id = "Files", ItemKind = "Folder"]}[Data]{[Name = "raw"]}[Content],
  #"Navigation 4" = Navigation{[Name = "example.json "]}[Content],
  #"Imported JSON" = Json.Document(#"Navigation 4"),
  #"Converted to table" = Table.FromList(#"Imported JSON", Splitter.SplitByNothing(), null, null, ExtraValues.Error)
in
  #"Converted to table"

 

I expect this query to give me a Table with one column of records and two rows.
This works as expected in the preview while building the Dataflow:
Screenshot 2023-11-06 at 12.37.25.png

 

But when i publish my Dataflow to Fabric it gives me this error:

Error Code: 999999, Error Details: Couldn't refresh the entity because of an issue with the mashup document MashupException.Error: Expression.Error: Failed to insert a table., InnerException: We cannot convert a value of type Record to type Text., Underlying error: We cannot convert a value of type Record to type Text. Details: Reason = Expression.Error;Message = We cannot convert a value of type Record to type Text.;Detail = [Value = [...], Type = text];Message.Format = We cannot convert a value of type #{0} to type #{1}.;Message.Parameters = {"Record", "Text"};Microsoft.Data.Mashup.Error.Context = User (Request ID: e0134b83-e583-483c-bb21-a8ebf9d61875).

 
Why does the function Table.FromList work differently when publishing to when building the dataflow?
Is there a different way to normalise nested JSON data that works with Fabric?

1 ACCEPTED SOLUTION

If you enable load the query becomes a partition and must be a flat table of simple column types. You need to disable load for the query "without destination". That will then be an expression rather than a partition.

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

Eventually your Power Query needs to produce a flat table with only basic column types. In Power BI Desktop columns containing records and lists and tables etc are ignored, but in the service they throw errors.

I see, but even if they dont have a destination?

There is a one to two relation in that im creating two tables from one json source.
So i have three queries in the power query. One query, without a destination, that reads in the json. Then two other queries that reference the first query to further flatten the data into the two seperate tables.

I figured this would be more efficient because the file is only read and parsed once for both destinations.

So each query in the power query needs to be flattened and type cast even if they dont have a destination?

If you enable load the query becomes a partition and must be a flat table of simple column types. You need to disable load for the query "without destination". That will then be an expression rather than a partition.

A little late, but thank you!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors