FetchXml query in ADF Copy Activity with count and page fails

Timothy Allott 1 Reputation point
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.
10,196 questions
{count} votes