Share via

Convert Dataverse Table to JSON String in Synapse Pipeline

Ananya patil 105 Reputation points
2025-03-14T12:16:31.21+00:00

I am working on a pipeline in Azure Synapse Analytics, and I need to convert a Dataverse table to a JSON string. I want to know if it's possible to achieve this using a Web Activity within the pipeline. If so, could someone please explain how it can be done?

I appreciate any help or guidance on this!

Thanks in advance!

Azure Synapse Analytics
Azure Synapse Analytics

An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.


Answer accepted by question author

Ganesh Gurram 7,235 Reputation points Moderator
2025-03-14T13:34:23.6533333+00:00

Hi @Ananya patil

In a Synapse pipeline, use a Web activity to call the Dataverse Web API with your FetchXML query. This will retrieve the data. The API response will be JSON, but in a specific structure. You'll then need to process this response. Use a Data Flow (for visual transformation) or a Script activity (for more complex logic with languages like Python) to transform the API response into the exact JSON structure you need. This gives you full control over the final JSON output.

FetchXML is a proprietary query language used in Microsoft Dataverse to retrieve data. While FetchXML is primarily designed for querying data, it does not directly convert data into JSON format. Instead, you would typically retrieve the data using FetchXML and then convert the resulting data into JSON format in your application or pipeline.

This structured approach will help you effectively convert a Dataverse table object to a JSON string in your Synapse pipeline.

Reference: https://learn.microsoft.com/en-us/answers/questions/2141250/how-do-i-convert-a-dataverse-table-object-to-a-jso

For more detailed implementation, you may want to refer to the below documentation on how to use FetchXML with the SDK for .NET or the Dataverse Web API.

Use FetchXml to retrieve data

I hope this information helps. Please do let us know if you have any further queries.


If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.