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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
kuldeepbhati
New Member

Parsing null value in array in an eventstream

Hi I have created a custom app and I am parsing json in managefield and my destination is kql or lakehouse. The below is the json structure I am parsing one with nulll in groups and one with array in groups

 

{"UserId":"78fb8374-b3fb-45d1-8932-e0ae1034cf68","SignInIdentifier":"name@microsoft.com","UserDisplayName":"name","Company":"001","Groups":["Client"]}

 

{"UserId":"78fb8374-b3fb-45d1-8931-e0ae1034cf68","SignInIdentifier":"name@microsoft.com","UserDisplayName":"name","Company":"001","Groups":null}

 

Null one is parsed in groups, but when groups field has an array it throws below error:

 

 

"value": "An error has occurred while processing events: '' [OutputSourceAlias:dst-crusage-sink;]\r\n- Cannot cast value of type 'array' to type 'record' in expression 'CAST ( [d4802f88-4f44-4109-a6e3-ab1500071f66] . [User] . [Groups] AS record )'.\r\n",
"type": "string"

 

Can anyone help me on solving this error and parsing json, I change data type to sting as well in managefields of eventstream, but it still exist.

 

 

2 REPLIES 2
kuldeepbhati
New Member

Hi Wenyang, I raised a Microsoft ticket for it. Microsoft suggested I have to create a eventstream again without enhanced feature and I was able to convert from array into string and that is working for me. Thanks for replying on this.

Wenyang
Microsoft Employee
Microsoft Employee

Hi @kuldeepbhati ,

There are certain rules for manage fields and converting data types (Learn more: Process event data with the event processor editor - Microsoft Fabric | Microsoft Learn). You need to ensure that the data type of the Groups field is consistent with your data model when sending data to the destination. If the Groups field should be an array, you may need to define it as an array type in your data model or use managed fields to convert it to a supported type.

 

Helpful resources

Announcements
FBCApril_Carousel

Fabric Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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