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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugFabric_Carousel

Fabric Monthly Update - August 2024

Check out the August 2024 Fabric update to learn about new features.

August Carousel

Fabric Community Update - August 2024

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