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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
KBD
Helper II
Helper II

pipeline Copy Activity JSON file with multiple documents - Mapping

Hello All:

 

I am making no progress on this issue so I will put out to you good folks.

We are in this situation because Data Factory has issues with attributes that start with special characters.  In this case @ (at sign)

My data comes in via a REST API and look like this:  {"@odata.context":"https://fifa.com/goalsAssist","value":[ { .......

 

sample file here:

{"@odata.context":"https://fifa.com/goalsAssist","value":[  {    "team": "BLUE",    "player": "ROBIN",    "yyyymm": 202201,    "goals": 1,    "assists": 0,    "minutes played": 20,    "games played": 1  },  {    "team": "BLUE",    "player": "ROBIN",    "yyyymm": 202202,    "goals": 0,    "assists": 0,    "minutes played": 20,    "games played": 1  },  {    "team": "BLUE",    "player": "ROBIN",    "yyyymm": 202203,    "goals": 0,    "assists": 0,    "minutes played": 20,    "games played": 1  },  {    "team": "BLUE",    "player": "ROBIN",    "yyyymm": 202204,    "goals": 2,    "assists": 0,    "minutes played": 45,    "games played": 1  },  {    "team": "BLUE",    "player": "ROBIN",    "yyyymm": 202205,    "goals": 0,    "assists": 0,    "minutes played": 45,    "games played": 2  },  {    "team": "BLUE",    "player": "ROBIN",    "yyyymm": 202206,    "goals": 3,    "assists": 1,    "minutes played": 90,    "games played": 3  },  {    "team": "BLUE",    "player": "ROBIN",    "yyyymm": 202207,    "goals": 1,    "assists": 1,    "minutes played": 30,    "games played": 1  },  {    "team": "BLUE",    "player": "ROBIN",    "yyyymm": 202208,    "goals": 4,    "assists": 2,    "minutes played": 110,    "games played": 3  },  {    "team": "BLUE",    "player": "ROBIN",    "yyyymm": 202209,    "goals": 6,    "assists": 2,    "minutes played": 110,    "games played": 3  } ] }
{"@odata.context":"https://fifa.com/goalsAssist","value":[  {    "team": "GREEN",    "player": "BOBBY",    "yyyymm": 202201,    "goals": 2,    "assists": 1,    "minutes played": 70,    "games played": 2  },  {    "team": "GREEN",    "player": "PATTSY",    "yyyymm": 202201,    "goals": 0,    "assists": 2,    "minutes played": 45,    "games played": 1  },  {    "team": "GREEN",    "player": "BOBBY",    "yyyymm": 202202,    "goals": 1,    "assists": 0,    "minutes played": 60,    "games played": 2  },  {    "team": "GREEN",    "player": "PATTSY",    "yyyymm": 202202,    "goals": 0,    "assists": 3,    "minutes played": 45,    "games played": 1  },  {    "team": "GREEN",    "player": "BOBBY",    "yyyymm": 202203,    "goals": 0,    "assists": 0,    "minutes played": 50,    "games played": 2  },  {    "team": "GREEN",    "player": "PATTSY",    "yyyymm": 202203,    "goals": 0,    "assists": 1,    "minutes played": 90,    "games played": 1  },  {    "team": "GREEN",    "player": "BOBBY",    "yyyymm": 202204,    "goals": 3,    "assists": 2,    "minutes played": 40,    "games played": 3  },  {    "team": "GREEN",    "player": "PATTSY",    "yyyymm": 202204,    "goals": 0,    "assists": 2,    "minutes played": 90,    "games played": 2  },  {    "team": "GREEN",    "player": "BOBBY",    "yyyymm": 202205,    "goals": 2,    "assists": 0,    "minutes played": 40,    "games played": 3  },  {    "team": "GREEN",    "player": "PATTSY",    "yyyymm": 202205,    "goals": 1,    "assists": 3,    "minutes played": 120,    "games played": 3  },  {    "team": "GREEN",    "player": "BOBBY",    "yyyymm": 202206,    "goals": 1,    "assists": 3,    "minutes played": 40,    "games played": 3  },  {    "team": "GREEN",    "player": "PATTSY",    "yyyymm": 202206,    "goals": 0,    "assists": 0,    "minutes played": 45,    "games played": 1  },  {    "team": "GREEN",    "player": "BOBBY",    "yyyymm": 202207,    "goals": 0,    "assists": 1,    "minutes played": 10,    "games played": 1  },  {    "team": "GREEN",    "player": "PATTSY",    "yyyymm": 202207,    "goals": 0,    "assists": 0,    "minutes played": 60,    "games played": 2  },  {    "team": "GREEN",    "player": "BOBBY",    "yyyymm": 202208,    "goals": 4,    "assists": 4,    "minutes played": 90,    "games played": 3  },  {    "team": "GREEN",    "player": "PATTSY",    "yyyymm": 202208,    "goals": 0,    "assists": 1,    "minutes played": 90,    "games played": 2  },  {    "team": "GREEN",    "player": "BOBBY",    "yyyymm": 202209,    "goals": 3,    "assists": 6,    "minutes played": 75,    "games played": 2  },  {    "team": "GREEN",    "player": "PATTSY",    "yyyymm": 202209,    "goals": 1,    "assists": 3,    "minutes played": 120,    "games played": 2  } ]  }
{"@odata.context":"https://fifa.com/goalsAssist","value":[]}

 

The Data Factory activities choke on the @odata.context

Please note there are multiple JSON docs in the file and there are mutliple JSON objects per line in the file.

I have been able to handle the  multiple JSON docs in the file and the mutliple JSON objects per file in

another Pipeline with the Flatten tool.

My thought is to use Mapping on the Copy activity to ignore the @odata.

I have tried many mappings with not luck .

 

KBD_0-1752869484648.png

 

This is one attempt. @odata.content is NOT included.   The rest of the data,  I want move over as is.

 

KD

 

3 REPLIES 3
BhaveshPatel
Community Champion
Community Champion

Then Write some code in python notebooks and rest UI/UX in Data Factory. This is how I should do:

Python --> Spark Dataframe --> Convert to Delta Table ( This part programmimg code ) and once delta table is ready, write copy activity in Fabric Data Factory. 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.
BhaveshPatel
Community Champion
Community Champion

Rather than Data Factory, I should start with Python Notebooks if you know how to do ETL REST APIs in Python. it is just JSON file.

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

I already have this working in Python with no issues.

But Corporate,  the powers that be, want a Data Factory solution because it is " No code"

 

KD

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June FBC25 Carousel

Fabric Monthly Update - June 2025

Check out the June 2025 Fabric update to learn about new features.