Introduction

When working with complex data, you often come across nested JSON structures that are stored in a single column. These nested structures can be difficult to analyze in their raw form, so flattening the JSON column becomes essential for data preparation. Dataflows in Microsoft Fabric provide a powerful way to transform your data, including flattening JSON columns into a structured table format. In this tutorial, we will explain step-by-step how to flatten a column that contain JSON data using a Dataflow.

Goal

A delta table in the lakehouse has a columns that contains JSON data. The column should be flattened with a dataflow.

Source

The source data is the delta table student in the lakehouse.

Prequestisies

☑️ Dataflow created

We have already created the dataflow "dlnerds_parse_json_student". Check out the following post if you want to know how to create a dataflow.

How to create a Dataflow in Microsoft Fabric: A Step-by-Step Guide
Introduction Microsoft Fabric is a powerful All-in-One Data Platform (SaaS) in the Azure Cloud that combines various Azure components to cover the fields of Data Integration, Data Engineering, Data Science and Business Intelligence. One key component of the Microsoft Fabric architecture is the Dataflow. In this tutorial, we will explain

☑️ Source data loaded into Dataflow

The data has been already loaded into the dataflow. Check out the following post if you want to load data into a dataflow.

How to ingest Data into a Fabric Warehouse using a Dataflow
Introduction In order to work with data in Microsoft Fabric, you first need to get data into it. There are several ways to do this. One way is to use a dataflow. In this tutorial, we will explain step-by-step how to ingest data into a Fabric warehouse using a dataflow.

Data

Let's have a look at the data within the Dataflow.

As you can see, the column properties contains data in JSON format.

Flatten JSON column

Now, let's flatten the column properties.

You can view this post with the tier: Academy Membership

Join academy now to read the post and get access to the full library of premium posts for academy members only.

Join Academy Already have an account? Sign In