Unable to load data from Dynamics 365 CRM sales table to MS-SQL

Advait Bhujbal 0 Reputation points

I was trying to load data from Dynamics 365 Sales to MS-SQL using Using Azure Data Factory Copy data tool, Metadata-driven copy task. The type of load I am using is Delta Load/Incremental Load.
Facing this issue:

Failure happened on 'Source' side. ErrorCode=DynamicsOperationFailed,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Dynamics operation failed with error code: DynamicsOperationFailed, error message: The Fetch Xml query specified is invalid..,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,''Type=System.Xml.XmlException,Message=Data at the root level is invalid. Line 1, position 1.,Source=System.Xml,'

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,457 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Amira Bedhiafi 14,416 Reputation points

    The error The Fetch Xml query specified is invalid indicates that the fetch query is invalid.


  2. ShaikMaheer-MSFT 37,656 Reputation points Microsoft Employee

    Hi Advait Bhujbal,

    Thank you for posting query in Microsoft Q&A Platform.

    The error message you are receiving indicates that the FetchXML query specified in the Dynamics 365 Sales source is invalid. This error can occur if the FetchXML query is not properly formatted or if it contains invalid characters.

    To resolve this issue, you can try the following steps:

    Check the FetchXML query. Make sure that the FetchXML query is properly formatted and that it does not contain any invalid characters. You can use the FetchXML Builder tool in Dynamics 365 Sales to create and test the FetchXML query.

    Check the connection to Dynamics 365 Sales. Make sure that the connection to Dynamics 365 Sales is properly configured and that you have the necessary permissions to access the data.

    Check the metadata-driven copy task. Make sure that the metadata-driven copy task is properly configured and that it is using the correct FetchXML query.

    Check the data type mapping. Make sure that the data type mapping between Dynamics 365 Sales and MS-SQL is correct and that it can handle the data being transferred.

    Check the incremental load settings. Make sure that the incremental load settings are properly configured and that they are using the correct FetchXML query.

    If none of the above steps resolve the issue, you can try to recreate the metadata-driven copy task or contact Microsoft support for further assistance.