FetchXml query in ADF Copy Activity with count and page fails

Anonymous
2021-08-18T22:34:46.733+00:00

I have the following Fetch XML in my copy activity Source query:

<fetch count="5000" page="39" >
<entity name="contact" >
<all-attributes/>
<filter>
<condition attribute="modifiedon" operator="gt" value="2021-08-16 9:45:33 PM" />
</filter>
<order attribute="contactid" />
</entity>
</fetch>

I get the following error when running the pipeline

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=Should not specify paging related arributes in your Fetch Xml query.,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,'

I have tested the FetchXml in XRM Toolbox using FetchXml Builder and it works just fine.

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,432 questions
{count} votes

Your answer

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