The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
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.
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Fabric update to learn about new features.